Home >Backend Development >PHP Tutorial >How to use yum to install php mysql and gd extension libraries on centos6

How to use yum to install php mysql and gd extension libraries on centos6

WBOY
WBOYOriginal
2016-07-25 08:54:441016browse
  1. #yum -y install mysql mysql-server mysql-devel
Copy the code

Configure the mysql startup service

  1. #chkconfig --add mysqld (Add the mysql service in the service list)
  2. #chkconfig mysqld on (Set the mysql service to start at boot)
  3. #service mysqld start (Start the mysql service)
Copy code

2. Install PHP

  1. #yum -y install php
  2. #service httpd restart (restart apache)
Copy code

#vi /var/www/html/index.php Test code:

  1. phpinfo();
  2. ?>
Copy the code

Save and exit, use IE to visit http://youdomain.com/ If phpinfo information is output, it means php Successful installation.

3. Install php related components

  1. #yum search php (Search for php related components)
  2. #yum -y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
Copy the code

The installation is complete and restart the apache service:

  1. #service httpd restart
Copy the code

The lamp environment is now set up.



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn