centos6 steps to install php mysql gd using yum

  • 2020-05-06 12:07:34
  • OfStack

System: Centos6.0 32-bit

1. Install mysql

#yum -y install mysql mysql-server mysql-devel

Configure mysql boot service

chkconfig --add mysqld (add mysql service to the list of services)

chkconfig mysqld on (set mysql service to start with boot)

service mysqld start (start mysql service)

Install PHP

#yum -y install php

service httpd restart (restart apache)

#vi /var/www/html/index.php

Enter the following test code

 
<?php 
phpinfo(); 
?> 


Save exit, access http:// youdomain.com/phpinfo if the phpinfo message is printed, your php installation is successful.

iii. Install php related components

yum search php (search for php related components)

#yum -y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc

Restart apache service
after installation
#service httpd restart

Your lamp environment will be set up. Is it easy to install yum?

I have read other people's articles before, and they have used phpize to recompile after installing php components, which is not necessary, just restart apache and it will load all possible components.

Related articles: