因為我早就公升級到 php7 了,但是最近又有之前09年的程式需要挪夠來跑,發現很多函式都刪了,根本不支援,所以我得重新裝個 php5 ,所以有了下面的筆記哈。就不做注釋了。自己分析下。# wget -c --progress=bar:force
# tar zxf php-5.3.29.tar.gz
# cd php-5.3.29
# ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl=/usr/local/curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo
# make zend_extra_libs='-liconv'
# make install
# cp php.ini-production /usr/local/php5/etc/php.ini
# sed -i 's/post_max_size =.*/post_max_size = 50m/g' /usr/local/php5/etc/php.ini
# sed -i 's/upload_max_filesize =.*/upload_max_filesize = 50m/g' /usr/local/php5/etc/php.ini
# sed -i 's/;date.timezone =.*/date.timezone = prc/g' /usr/local/php5/etc/php.ini
# sed -i 's/;cgi.fix_pathinfo=.*/cgi.fix_pathinfo=0/g' /usr/local/php5/etc/php.ini
# sed -i 's/max_execution_time =.*/max_execution_time = 300/g' /usr/local/php5/etc/php.ini
# sed -i 's/magic_quotes_gpc =.*/;magic_quotes_gpc = on/g' /usr/local/php5/etc/php.ini
# sed -i 's/disable_functions =.*/disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server/g' /usr/local/php5/etc/php.ini
# cp sapi/fpm/init.d.php-fpm /etc/init.d/php5-fpm
# chmod +x /etc/init.d/php5-fpm
# cd /usr/local/php5/etc
# vim php-fpm.conf
[global]
pid = /usr/local/php5/var/run/php-fpm.pid
error_log = /data/log/php5-fpm.log
log_level = notice
[www]
listen = /tmp/php5-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 6
request_terminate_timeout = 100
request_slowlog_timeout = 0
slowlog = /data/log/php5-slow.log
最後我就可以使用/etc/init.d/php5-fpm start 來啟動了# netstat -lanp|grep php
unix 2 [ acc ] stream listening 478466602 717/php-fpm /tmp/php5-cgi.sock # php5
unix 2 [ acc ] stream listening 443683763 9207/php-fpm /tmp/php-cgi.sock # php7
如果沒有liconvwget
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure -prefix=/usr/local
make
make install
伺服器搭建多個tomcat伺服器
以三個tomcat為例 先配置環境變數 編輯 etc profile 檔案 新增三個tomcat環境變數 value為tomcat目錄 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 第乙個tomcat catalina base usr local tomcat to...
24 裝伺服器
為了更有效地組織磁碟上的資料資訊,通常將磁碟預先劃分成乙個或多個磁碟分割槽,建立對應的檔案系統,以方便計算機對各分割槽分別進行管理。macos 系統自帶乙個圖形化的磁碟管理工具 disk utility 同時還有乙個命令列版本的 diskutil。通過該命令的使用,可以很快捷地對本地磁碟進行擦除資料...
mysql多伺服器 mysql 多伺服器例項
測試環境是在windows下。不同系統啟動和停止命令有所差異 1 修改配置檔案 把需要配置的選項都設定成不一樣的 需要修改的地方有 client password your password port 3308 經過測試,這個埠改不改都沒什麼問題,但是還是改了保險點吧 socket d servic...