1. Requirements
Build Mysql+php+nginx Environment
2 process
Divided into 5 steps, disk partition, install VSFTPD, install Nginx, install PHP-FPM, install MySQL
3. Disk Partitioning
Http://www.cnblogs.com/dudu/archive/2012/12/07/aliyun-linux-fdisk.html
4. Installing VSFTPD
Yum install VSFTPDA. Close selinux,http://www.cnblogs.com/norm/p/6269338.htmlB, Useradd-d/webserver-s/sbin/nologin webftp New User C, passwd webftp change Password sdafadsf54542016d, chown-R webftp.webftp/webserver Modify permissions for a specified directory E, vi/etc/vsftpd/vsftpd.conf Edit the Vsftp profile in the configuration file "Anonymous_enable=yes "changed to" anonymous_enable=NO "cancels the comment symbol before the following configuration: Local_enable=yeswrite_enable=Yeschroot_local_user=YESF, Xferlog_std_format=Yesxferlog_file=/webserver/logs/vsftpd/ftp.logxferlog_enable=YES
(!! Upload all log files)
Set Boot Chkconfig--level345VSFTPD on
5. Installing Nginx
A, upload nginx-1.8.0. Tar.gzb, tar zxvf nginx-1.8.0. TAR.GZC, installing Yum install-Y zlib zlib-Develd, installing yum install-Y OpenSSL openssl-Devele, installing yum install-Y Pcre pcre-devel installing Yum Install-y gd yum install GD-devel yum Install libatomic_ops-develf, enter Nginx-1.8. 0 directory G,./configure--prefix=/webserver/software/nginx/--with-http_ssl_module--with-http_spdy_module--with-http_realip_ Module--with-http_image_filter_module--with-http_sub_module--with-http_dav_module--with-http_flv_module-- With-http_mp4_module--with-http_gunzip_module--with-http_gzip_static_module--with-http_auth_request_module-- With-http_secure_link_module--with-http_degradation_module--with-http_stub_status_module--with-pcre--with-Libatomich, make make Installi, Nginx service control./nginx boot./nginx-s Reload restart Nginx-t-c/usr/local/nginx/conf/nginx.conf determine if nginx.conf correctly stops PS-ef |grep nginx Kill-quit main process number: gracefully stop Nginx kill-Term Master process number: Fast Stop nginx Pkill-9Nginx: Forced stop nginx
cp/webserver/software/nginx/sbin/nginx/etc/init.d/
+x/etc/init.d/nginx to execute permissions 345 nginx on set to boot start J, configure Nginx site See example nginx.conf
6. Installing PHP-FPM
3, Installation php-FPMD (must be installed before MySQL, or will mysqlclient and other problems will be error) A, upload php-5.3. -. Tar.gzb, unzip tar zxvf php-5.3. -. TAR.GZC, installing the necessary components Yum Install-Y php-mcrypt Yum Install-Y php-MySQL Yum install-Y php-gd Yum Install-Y php-IMAP Yum Install-Y php-LDAP Yum Install-Y php-ODBC Yum Install-Y php-Pear Yum Install-Y php-XML Yum Install-Y php-xmlrpc Yum Install-Y php-mbstring Yum Install-y libmemcached Yum install-Y libmemcached-devel Yum Install-Y php-pecl-memcached Yum Install-Y memcached-devel Yum Install-y memcached Yum install-y libxml2 Yum install-Y libxml2-devel Yum Install-y libcurl Yum install-Y libcurl-devel Yum Install-y openldap Yum install-Y openldap-devel Yum Install-y libmcrypt Yum install-Y libmcrypt-devel Yum Install-Y mysql-devel upload Libiconv-1.14. tar.gz and unzip the tar zxvf libiconv-1.14. tar.gz (to enter into the extracted directory first)./configure--prefix=/webserver/software/Libiconv make make install and install on/usr/local/lib/(/software/libiconv/lib) directory to generate the library file libcharset.so.1, libiconv.so.2. D. Enter the CD/webserver/software_package/php-5.3. -E, CP-frp/usr/lib64/libldap*/usr/lib/F, export Mysql_lib_dir=/usr/lib64/change the MySQL environment variable to the LIB64 bit path (before installing MySQL) e,./configure--PREFIX=/WEBSERVER/SOFTWARE/PHP-FPM--with-config-file-path=/webserver/software/php-fpm/etc-- With-mysql--with-mysqli--with-iconv-dir=/webserver/software/libiconv--with-freetype-dir--with-jpeg-dir-- With-png-dir--with-zlib--with-libxml-dir--enable-xml--disable-rpath--enable-discard-path--enable-safe-mode-- Enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--with-curl--with-curlwrappers-- Enable-mbregex--enable-fastcgi--enable-fpm--enable-force-cgi-redirect--enable-mbstring--with-mcrypt--WITH-GD-- Enable-gd-native-ttf--with-openssl--with-mhash--enable-pcntl--enable-sockets--with-ldap--WITH-LDAP-SASL-- With-xmlrpc--enable-zip--enable-soap--without-pear--with-zlib--enable-pdo--with-pdo-mysql--with-iconv-dir=/ Webserver/software/libiconv--with-libmcrypt--enable-ftp--with-freetype-dir--with-memcached make make install F, copy CP/webserver/software_package/php-5.3. -/php.ini-production/webserver/software/php-fpm/etc/php.ini CP/webserver/software/php-fpm/etc/php-fpm.conf.default/webserver/software/php-fpm/etc/php-fpm.conf g, start/webserver/software/php-fpm/sbin/php-fpm-c/webserver/software/php-fpm/etc/php.ini-y/WEBSERVER/SOFTWARE/PHP-FPM /etc/php-fpm.conf Execute permissions: chmod777/webserver/software/php-fpm H, configure PHP support Zendguardloader upload ZENDGUARDLOADER.SOCP webserver/software_package/zendguardloader.so/webserver/software/php-fpm/lib/Move here:/webserver/software/php-fpm/lib/zendguardloader.so (Go/etc/php.ini) configuration php.ini append zend_extension=/usr/lib64/zendguardloader.so zend_loader.enable=1zend_loader.disable_licensing=0Zend_loader.obfuscation_level_support=3If you open the Support memcached extension add the following extension=/usr/lib64/php/modules/memcached.so Restart PHP-FPD Production service start CP/webserver/software/php-fpm/sbin/php-fpm/etc/init.d/chmod+x/etc/init.d/php-fpm gives execute permission chkconfig--level345php-FPM on (has failed)
Linux Installation Tutorials