PHP5.3.8 + Mysql5.5.18 + Nginx1.1.8 安裝使用感受

1、Mysql,5.5的mysql沒有了configure文件,而採用cmake來編譯,所以在安裝mysql之前需要安裝cmake,我編譯mysql的時候採用了以下配置:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/usr/local/mysql/data \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DEXTRA_CHARSETS=all \
-DMYSQL_TCP_PORT=3306 \
-DWITH_DEBUG=OFF \
-DWITH_READLINE=1 \
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock

具體cmake和configure的對應關係參考:MySQL5.5編譯工具configure向cmake過渡指南

2、php5.3.8將fastcgi集成在一起,編譯時需加上--enable-fpm,新版是方便了一些,但配置不習慣,還有待研究,我的編譯參數如下:

./configure  --prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-iconv-dir=/usr/local \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-safe-mode \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl --with-curlwrappers \
--enable-mbregex \
--enable-fpm \
--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

新版PHP還有語法檢查功能,跟Nginx一樣/usr/local/php/sbin/php-fpm -t

啓動方法:/usr/local/php/sbin/php-fpm

php-fpm.conf配置詳解:http://blog.hexu.org/archives/1078.shtml

php還有一個狀態頁,在php-fpm.conf配置中打開查看狀態頁功能後,可查看PHP狀態:

http://192.168.52.132/status
pool:                 www
process manager:      dynamic
start time:           19/Nov/2011:01:52:18 +0800
start since:          453
accepted conn:        5
listen queue:         0
max listen queue:     0
listen queue len:     0
idle processes:       8
active processes:     1
total processes:      9
max active processes: 1
max children reached: 0

3、Nginx安裝和配置沒啥大的改動

性能和穩定測試有待考驗~~~~~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章