PHP5.3.8 + Mysql5.5.18 + Nginx1.1.8 安装使用感受
2011-11-29 01:19
691 查看
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安装和配置没啥大的改动
性能和稳定测试有待考验~~~~~
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安装和配置没啥大的改动
性能和稳定测试有待考验~~~~~
相关文章推荐
- PHP5.3.8 + Mysql5.5.18 + Nginx1.1.8 安装使用感受
- CentOS 6.0(X64)下编译安装LNMP平台( Nginx1.0.10 + PHP5.3.8 + Mysql5.5.18 )
- linux上nginx的安装启动以及配合php-fpm的使用
- Linux上nginx的安装启动以及配合php-fpm的使用
- 安装Nginx与使用PHP5(和PHP-FPM Nginx)和MySQL在 CentOS支持6.0的支持
- CentOS使用YUM安装php运行环境,包含php,php-fpm,nginx,mysql
- 在CentOs 5.1中使用rpm安装NGINX+php+mysql(一)
- MAC使用brew安装nginx+php+mysql环境
- CentOS使用YUM安装php运行环境,包含php,php-fpm,nginx,mysql
- Centos Nginx+PHP+PHP-FPM安装使用YUM
- 全新安装Mac OSX 开发者环境 同时使用homebrew搭建 PHP,Nginx ,MySQL,Redis,Memcache ... ... (LNMP开发环境)
- 全新安装Mac OSX 开发者环境 同时使用homebrew搭建 PHP,Nginx ,MySQL,Redis,Memcache ... ... (LNMP开发环境)
- Mac OS使用brew安装Nginx、MySQL、PHP-FPM的LAMP开发环境
- 全新安装Mac OSX 开发者环境 同时使用homebrew搭建 PHP,Nginx ,MySQL,Redis,Memcache ... ... (LNMP开发环境)
- 全新安装Mac OSX 开发者环境 同时使用homebrew搭建 PHP,Nginx ,MySQL,Redis,Memcache ... ... (LNMP开发环境)
- 安装php并使用nginx连接PHP
- MAC使用brew安装nginx+php+mysql环境
- CentOS使用YUM安装php运行环境,包含php,php-fpm,nginx,mysql
- ubuntu使用apt get install 安装nginx和php-fpm
- CentOS使用YUM安装php运行环境,包含php,php-fpm,nginx,mysql