1.安裝依賴應用
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-develncurses ncurses-deve curl curl-devel openssl openssl-devel gdbm-devel db4-devel libxpm-devel libx11-devel gd-devel pcre pcre-devel
2.編譯安裝php
#cd /usr/local
#tar zxvf php-5.6.8.tar.gz
#cd php-5.6.8
#./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql --with-mysqli --with-zlib --with-libxml-dir --enable-xml --with-curl --with-jpeg-dir --with-png-dir --enable-fpm --with-gd --with-openssl --with-xmlrpc --enable-zip--with-freetype-dir
//with-apxs2=/usr/local/apache2/bin/apxs,apahce構建環境選項,apahce環境必選,否則不會生成libphp5.so
#make && make installls
3.配置
#cp /usr/local/php-5.6.8/php.ini-production /usr/local/php/etc/php.ini
#cd /usr/local/php/etc
#cp php-fpm.conf.default php-fpm.conf
修改fpm 配置檔案php-fpm
.conf
pm.max_children = 50
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 500
去掉分號
#/usr/local/php/sbin/php-fpm //啟動php-fpm
4.設定php-fpm自啟動
#cp /usr/local/php-5.6.8/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
#chmod +x /etc/init.d/php-fpm
#chkconfig --addphp-fpm
#chkconfigphp-fpm off
#chkconfig --level 345php-fpm on
#service php-fpm restart //測試是否能正常restart
5.nginx和apahce
apache:
(2)directoryindex index.html index.html.var 在後面加 index.php
(3)#servername 把#去掉,後面加上本機ip
nginx:
location ~ \.php$
Centos6 5 原始碼安裝LAMP
z開始安裝之前解除安裝預裝的httpd mysql php。root賬戶下執行rpm qa grep http rpm qa grep mysql rpm qa grep php,檢查是否有預裝的httpd mysql php。執行rpm e nodeps 命令,解除安裝預裝的軟體。準備工作 移動a...
Centos6 5原始碼安裝MySQL
centos 6.5環境原始碼安裝mysql 5.6 1.環境準備工作 編寫shell指令碼安裝環境 development.sh bin bash yum install wget y yum install cmake y yum install gcc c y yum install ncur...
centos6 5下原始碼安裝mysqldb
0.首先安裝mysql,詳細過程鏈結。wget tar xvf mysql python 1.2.3.tar.gz cd mysql python 1.2.3 vi site.cfg 把 mysql config usr local mysql bin mysql config 這一行前的 去掉,並...