yum installation LAMP environment and management, yumlamp environment_PHP tutorial

WBOY
Release: 2016-07-12 09:05:43
Original
824 people have browsed it

yum installation LAMP environment and management, yumlamp environment

Prepare the environment

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

Installmysql

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

Install apache

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

Install php

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();
?>

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1068254.htmlTechArticleyum installation 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...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!