-
- #yum -y install mysql mysql-server mysql-devel
Copy the code
Configure the mysql startup service
-
- #chkconfig --add mysqld (Add the mysql service in the service list)
- #chkconfig mysqld on (Set the mysql service to start at boot)
- #service mysqld start (Start the mysql service)
Copy code
2. Install PHP
-
- #yum -y install php
- #service httpd restart (restart apache)
-
Copy code
#vi /var/www/html/index.php
Test 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
-
- #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
Copy the code
The installation is complete and restart the apache service:
The lamp environment is now set up.
|