Install Apache + PHP + MySQL on centos yum

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.