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安装和配置没啥大的改动

性能和稳定测试有待考验~~~~~

你可能感兴趣的:(数据库,mysql,nginx,休闲,php+mysql+nginx)