Compile and install Nginx + PHP + Mysql in CentOS6
Source: Internet
Author: User
[1]. install Nginx1 and add a user who cannot log on and does not have a main directory: 1 # useraddwww-M-s/sbin/nologin2, necessary component # wgetftp: // ftp. csx. cam. ac. uk/pub/software/programming/pcre/pcre-8.13.zip # unzippcre-8... [1]. install Nginx
1. add a user who cannot log on and does not have a home directory:
1 # useradd www-M-s/sbin/nologin
2. necessary components
# Wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.zip
# Unzip pcre-8.13.zip
# Cd pcre-8.13
#./Configure
# Make & make install
3. Compile and install nginx
# Tar-zxvf nginx-1.1.2.tar.gz
# Cd nginx-1.1.2
#./Configure -- prefix =/usr/local/nginx -- user = www -- group = www -- with-http_stub_status_module -- with-http_ssl_module
# Make & make install
[2]. install PHP
1. install necessary components
# Yum-y install libjpeg-devel libpng-devel
# Wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz
# Tar-zxvf libmcrypt-2.5.7.tar.gz
# Cd libmcrypt-2.5.7
#./Configure
# Make & make install
# Cp php. ini-production/usr/local/php/lib/php. ini or/usr/local/lib/php. ini
# Cp/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf
#/Usr/local/php/bin/php -- ini // test whether the ini file is loaded
Modify php. ini
[PHP]
Safe_mode = On
Register_globals = Off
Magic_quotes_gpc = Off
Allow_url_fopen = Off
Allow_url_include = Off
Expose_php = Off
Disable_functions = shell_exec, system, exec, passthru, show_source, curl_exec, curl_multi_exec, get_assist_var
[Date]
Date. timezone = "Asia/Shanghai"
Statement for modifying the password
1: UPDATE mysql. user SET Password = PASSWORD ('newpwd') WHERE User = 'root'; (New Password)
2: flush privileges; (refresh permission)
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