Yum installs lamp environment and management, YUMLAMP environment
Prepare the Environment
Yum Add 163 Source
Address:
Http://mirrors.163.com/.help/centos.html
Download mode:
wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
Use Yum Program installation Required Development Package (below is the standard RPM package name)
Yum install gcc gcc-c++ gcc-g77 Flex Bison autoconf automake bzip2-develzlib-devel ncurses-devel libjpeg-devel libpng-deve L libtiff-develfreetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel Net-snmp-develcurl-devel PERL-DBI
installation MySQL
Yum-y install MySQL Mysql-server
Self-booting:
Chkconfig--level 235 mysqld on
Start the service:
/etc/init.d/mysqld start
Configure the password for MySQL:
mysqladmin-u Root Password 123456 (modify it yourself!)
MySQL configuration file:
/etc/my.cnf
Installing Apache
Yum-y Install httpd
Self-booting:
Chkconfig--level 235 httpd on
Start the service:
/ETC/INIT.D/HTTPD start
Apache Web Hosting 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 Index.html.var
Install PHP
Yum-y Install PHP
Restart the httpd service to activate PHP:
/ETC/INIT.D/HTTPD restart
Test whether PHP is installed and finished
vim/var/www/html/info.php
Phpinfo ();
?>
Components for installing PHP
Search for PHP Components:
Yum Search PHP
To 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=128m
Post_max_size=8m
Upload_max_filesize=2m
one command to install :
Yum-y Install gcc gcc-c++ gcc-g77 Flex Bison autoconf automake bzip2-develzlib-devel ncurses-devel libjpeg-devel libpng-de Vel libtiff-develfreetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel Net-snmp-develcurl-devel perl-dbi mysql mysql-server httpdphp php-mysql php-gd php-imap php-ldap php-odbc php-pear PHP-XM L PHP-XMLRPC Php-bcmath php-mbstring
Then configure the MySQL password and change the Apache configuration file.
http://www.bkjia.com/PHPjc/1068254.html www.bkjia.com true http://www.bkjia.com/PHPjc/1068254.html techarticle Yum Install lamp environment and management, YUMLAMP environment preparation Environment Yum Add 163 source Address: http://mirrors.163.com/.help/centos.html Download method: wget/HTTP Mirrors.163.com/.help/ce ...