mysql安裝參照以前的方法,我這裏爲了測試,從新安裝一遍,如已經安裝則首先須要清理安裝文件,若是mysql已經啓動,首先要關閉mysqlphp
rm -rf /usr/local/mysql rm -rf /data/mysql/* rm -rf /etc/init.d/mysqld
安裝方法詳見
http://www.javashuo.com/article/p-xxaznxst-ck.htmlcss
和LAMP安裝PHP方法有差異,須要開啓php-fpm服務mysql
cd /usr/local/src/ wget http://cn2.php.net/distributions/php-5.6.30.tar.gz tar zxf php-5.6.30.tar.gz cd php-5.6.30
useradd -s /sbin/nologin php-fpm ./configure --prefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl
編譯過程當中缺乏了一個庫文件linux
yum install -y libcurl-devel
make && make install cp php.ini-production /usr/local/php-fpm/etc/php.ini
vi /usr/local/php-fpm/etc/php-fpm.conf //寫入以下內容(參考https://coding.net/u/aminglinux/p/aminglinux-book/git/blob/master/D15Z/php-fpm.conf)nginx
[global] pid = /usr/local/php-fpm/var/run/php-fpm.pid error_log = /usr/local/php-fpm/var/log/php-fpm.log [www] //模塊名字 listen = /tmp/php-fcgi.sock //監聽的地址 或者127.0.0.1:9000 listen.mode = 666 ///sock文件的權限(實際使用時將註釋刪掉) user = php-fpm group = php-fpm pm = dynamic pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 500 rlimit_files = 1024
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod 755 /etc/init.d/php-fpm chkconfig --add php-fpm chkconfig php-fpm on service php-fpm start ps aux |grep php-fpm
Nginx官網 nginx.org,最新版1.13,最新穩定版1.12
Nginx應用場景:web服務、反向代理、負載均衡
Nginx著名分支,淘寶基於Nginx開發的Tengine,使用上和Nginx一致,服務名,配置文件名都同樣,和Nginx的最大區別在於Tenging增長了一些定製化模塊,在安全限速方面表現突出,另外它支持對js,css合併
Nginx核心+lua相關的組件和模塊組成了一個支持lua的高性能web容器openresty,參考http://jinnianshilongnian.iteye.com/blog/2280928git