Centos quick installation of lamp

Source: Internet
Author: User
: This article describes how to quickly install lamp in centos. For more information about PHP tutorials, see.
Lamp is a free and open-source solution that represents Linux, Apache, MySQL, and php and is mainly used to build feasible and universal web servers. In CentOS6, how does one install Apache + php + Mysql quickly? The specific installation and configuration steps can be as follows: 1. the preparation is to use yum for installation. to improve the speed, you 'd better first change it to the CentOS image server in China. Currently, there are three images available in China: Image of Emy of Science and Technology of China, image of 163 and sohu. we recommend that you select Emy of science and technology from CERNET, and choose 163 from Telecom, their repo files are backed up as follows: http://yupengyan.com/wp-content/uploads/2012/02/CentOS6-Base-163.repo_.txthttp://yupengyan.com/wp-content/uploads/2012/02/CentOS6-Base-sohu.repo_.txthttp://yupengyan.com/wp-content/uploads/2012/02/CentOS6-Base-ustc.repo_.txt The following command backs up the CentOS-Base.repo file and modifies using the 163 image as the yum source: mv/etc/yum. repos. d/CentOS-Base.repo/etc/yum. repos. d/CentOS-Base.repo.savewget http://mirrors.163.com/.help/CentOS6-Base-163.repomv CentOS6-Base-163.repo/etc/yum. repos. d/CentOS-Base.repo2. update the system kernel yum-y update3. install Apahce, Mysql, and phpyum-y install httpd php mysql-server. by default, the mysql data directory is located in/var/lib/mysql4. install related components: yum install php-mysql php-gd php-imap php-ldap php-odbcphp-pear php-xml php-xmlrpc5. install the MySQL management tool phpMyAdminyum-y install phpMyAdmin6. configure Apache to start chkconfig -- levels 235 httpd on/etc/init with the system. d/httpd start7. configure MySQL to start chkconfig with the system -- Levels 235 mysqld on/etc/init. d/mysqld start8. set the database root password/usr/bin/mysqladmin-u root Password 'New + password # www.yupengyan.com '9. test whether PHP is successfully installed. in CentOS, the default Apache root directory is/var/www/html, and the configuration file/etc/httpd/conf/httpd. conf. Other configurations are stored in the/etc/httpd/conf. d/directory.

The above describes how to quickly install lamp in centos, including related content. if you are interested in the PHP Tutorial, please help.

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.