Yum install LAMP environment and management, yumlamp environment _ PHP Tutorial

Source: Internet
Author: User
Tags imap automake
Install and manage the LAMP environment and yumlamp environment in yum. Yum install LAMP environment and management, yumlamp environment preparation environment yum add 163 source address: mirrors.163.com.helpcentos.html download method: wgetmirrors.163.com. helpCe yum install LAMP environment and management, yumlamp environment
Prepare the environment

YumAdd163Source

Address:

Http://mirrors.163.com/.help/centos.html

Download method:

Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

UseYumDevelopment kits required for program installation(The standard rpm Package name is as follows)
Yum install gcc-c ++ gcc-g77 flex bison autoconf automake bzip2-develzlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-develfreetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre- devel mysql-devel net-snmp-develcurl-devel perl-DBI

Install Mysql

Yum-y install mysql-server

Self-starting:
Chkconfig -- level 235 mysqld on


Start the service:
/Etc/init. d/mysqld start


Configure the mysql password:
Mysqladmin-u root password 123456 (modify it by yourself !!)

Mysql configuration file:
/Etc/my. cnf

Install apache

Yum-y install httpd

Self-starting:
Chkconfig -- level 235 httpd on
Start the service:
/Etc/init. d/httpd start

Apache web storage directory:
/Var/www/html

Apache configuration file:
/Etc/httpd/conf/httpd. conf

Listen 80

ServerName 127.0.0.1: 80

DocumentRoot "/var/www/html"

DirectoryIndex index. php index.html. var

Install php

Yum-y install php

Restart httpd to activate php:
/Etc/init. d/httpd restart

Test whether php installation is complete.
Vim/var/www/html/info. php

Phpinfo ();
?>

Install php components

Search for php components:
Yum search php

Install common components:
Yum-y install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xmlphp-xmlrpc php-bcmath php-mbstring

Remember to restart the httpd service activation component after installation:
/Etc/init. d/httpd restart

Php configuration file:

Vi/etc/php. ini

Memory_limit = 128 M

Post_max_size = 8 M

Upload_max_filesize = 2 M

Install a command:

Yum-y install gcc-c ++ gcc-g77 flex bison autoconf automake bzip2-develzlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-develfreetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel net-snmp-develcurl-devel perl-DBI mysql-server httpdphp-mysql php-gd php-imap php-ldap php-odbc php-pear php -xml php-xmlrpc php-bcmath php-mbstring

Configure the mysql password and change the apache configuration file.

Prepare environment yum add 163 source address: http://mirrors.163.com/.help/centos.html download method: wget http://mirrors.163.com/.help/Ce...

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.