1.2 replacement source Open CentOS-Base.repo with vi, clear the content, then copy the following content into it and save it.
2. Use yum to install Apache, Mysql, PHP. 2.1 Install Apache
After the installation is complete, use /etc/init.d/httpd start to start apache Set to start at boot:
2.2 Install mysql 2.2.1
Similarly, after completion, start mysql with /etc/init.d/mysqld start 2.2.2 Set mysql password
2.2 .3 Allow remote login
After completion, you can use mysql-front to remotely manage mysql. 2.2.4 Set to start at boot
3. Install php
4. Test installation results 4.1 Create a new test.php file in /var/www/html/, write the following content, and then save it.
4.2 iptables firewall configuration a. Add. Allow access to ports {21: ftp, 80: http}.
b. Turn off the firewall {not recommended}.
c.Reset loading firewall service iptables restart 4.3 Open http://serverip/test.php in the client browser. If it can be displayed successfully, it means the installation is successful. |