yumadded163source
Address:
http://mirrors.163.com/.help/centos.html
Download method:
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
Use the yum program to install the required development package (the following is the standard rpm package name)
yum install gcc gcc-c gcc-g77 flex bison autoconf automake bzip2-devel
zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel
freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel net-snmp-devel
curl-devel perl-DBI
yum -y install mysql mysql-server
Auto-start:
chkconfig --level 235 mysqld on
Start service:
/etc/init.d/mysqld start
Configure mysql password:
mysqladmin -u root password 123456 (modify by yourself!!)
mysql configuration file:
/etc/my.cnf
yum -y install httpd
Auto-start:
chkconfig --level 235 httpd on
Start service:
/etc/init.d/httpd start
apache’s 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 index.html.var
yum -y install php
Restart httpd service to activate php:
/etc/init.d/httpd restart
Test whether php installation is complete
vim /var/www/html/info.php
phpinfo();
?>
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-xml
php-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-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel net-snmp-devel curl-devel perl-DBI mysql mysql-server httpd php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-bcmath php-mbstring
Then configure the mysql password and change the apache configuration file.