Introduction: This is a detailed page for centos Yum to install Apache + PHP + MySQL. It introduces PHP, Linux, PHP, Apache, MySQL, knowledge, skills, experience, and some PHP Source Code related to installing Apache + PHP + MySql in lamp centos yum.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 360998 'rolling = 'no'>
I. Install MySQL
1. Install
Yum install MySQL mysql-server mysql-devel
2. Start MySQL
/Etc/init. d/mysqld start
3. Set the initial MySQL password
Assume that the password is set to 123456.
Mysqladmin-u Root Password 123456
4. Set remote logon Permissions
Mysql-u root-P
Enter Password
Mysql> grant all privileges on *. * To 'username '@ 'address 'identified by 'Password' with grant option; mysql> flush privileges;
Ii. install Apache
Yum install httpd-devel
3. install PHP and plug-ins
Yum install PHP-mysql PHP-common PHP-Gd PHP-xml php-mbstring PHP-ldap php-pear PHP-XMLRPC
Start Apache
/Etc/init. d/httpd start
Set startup
Chkconfig mysqld onchkconfig httpd on
The webpage after installation is/var/www/html
Disable the firewall if you want to use other machines for access.
Service iptables stop
Or you can set the firewall to allow access to port 80.
Iptables-I RH-Firewall-1-INPUT-M State-State new-M TCP-P TCP-dport 80-J accept
Love J2EE follow Java Michael Jackson video station JSON online tools
http://biancheng.dnbcw.info/php/360998.html pageno: 1