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...