升级安装 php 5.4.0 和 nginx 1.1.17 

阳光明媚的下午,闲来无事。正好想起上周nginx 发布了一个修复内存泄漏的漏洞,再加上php 的5.4正好也正式发布了。于是,便打算升级跟进。

下载源码:
16 wget http://cn2.php.net/distributions/php-5.4.0.tar.bz2
17 wget http://nginx.org/download/nginx-1.1.17.tar.gz

删除久档:
[root@PowerPC pub]# rm php*
rm:是否删除 一般文件 “php-5.4.0RC4.tar.bz2”? y
rm:是否删除 一般文件 “php-5.4.0.tar.bz2”? n
rm:是否删除 一般文件 “phpinfo.php”? n
[root@PowerPC pub]# rm nginx*
rm:是否删除 一般文件 “nginx-1.1.11.tar.gz”? y
rm:是否删除 一般文件 “nginx-1.1.17.tar.gz”? n

停掉服务器,删除旧版本程序文件,顺便备份下配置文件。

先是php,解压源码包,进入目录:
我的configure:
[root@PowerPC php-5.4.0]# ./configure \
> --prefix=/usr/local/php \
> --exec-prefix=/usr/local \
> --sysconfdir=/etc/sysconfig/php \
> --localstatedir=/var \
> --disable-cli \
> --enable-embed=shared \
> --enable-fpm \
> --with-fpm-user=http \
> --with-fpm-group=web \
> --with-config-file-path=/etc/sysconfig/php \
> --with-config-file-scan-dir=/etc/sysconfig/php \
> --enable-sigchild \
> --disable-ipv6 \
> --with-pcre-regex \
> --with-zlib \
> --with-bz2 \
> --enable-calendar \
> --with-curl \
> --enable-dba=shared \
> --enable-exif \
> --enable-ftp \
> --with-gd \
> --with-mhash \
> --enable-intl \
> --enable-mbstring \
> --with-mcrypt \
> --with-mysql=/usr/local/mysql \
> --with-mysql-sock=/tmp/mysql.sock \
> --with-mysqli=/usr/local/bin/mysql_config \
> --disable-pdo \
> --with-libedit \
> --enable-soap \
> --enable-sockets \
> --enable-wddx \
> --with-xmlrpc \
> --with-xsl \
> --enable-zip \
> --without-pear

检查依赖,无问题。make 编译。时间较长,差点死机~
Linux mint 真是不给力阿~

完成后,make install 安装。
紧接着,恢复配置文件。

查看版本号:
[root@PowerPC php-5.4.0]# php-fpm -v
PHP 5.4.0 (fpm-fcgi) (built: Mar 24 2012 17:40:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

然后是nginx,解压,进入目录:
我的configure:
[root@PowerPC nginx-1.1.17]# ./configure \
> --prefix=/usr/local/nginx \
> --sbin-path=/usr/local/sbin/nginx \
> --conf-path=/etc/sysconfig/nginx/nginx.conf \
> --error-log-path=/var/log/nginx/error.log \
> --pid-path=/var/run/nginx.pid \
> --lock-path=/var/run/nginx.lock \
> --user=http \
> --group=web \
> --with-select_module \
> --with-poll_module \
> --with-http_image_filter_module \
> --with-http_dav_module \
> --with-http_flv_module \
> --with-http_mp4_module \
> --with-http_gzip_static_module \
> --without-http_geo_module \
> --without-http_rewrite_module \
> --without-http_proxy_module \
> --without-http_fastcgi_module \
> --without-http_uwsgi_module \
> --without-http_scgi_module \
> --http-log-path=/var/log/nginx/access.log \
> --http-client-body-temp-path=/tmp/nginx/request \
> --without-mail_pop3_module \
> --without-mail_imap_module \
> --without-mail_smtp_module \
> --with-pcre

检查依赖,通过。给出编译概况:
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/sbin/nginx"
nginx configuration prefix: "/etc/sysconfig/nginx"
nginx configuration file: "/etc/sysconfig/nginx/nginx.conf"
nginx pid file: "/var/run/nginx.pid"
nginx error log file: "/var/log/nginx/error.log"
nginx http access log file: "/var/log/nginx/access.log"
nginx http client request body temporary files: "/tmp/nginx/request"

确认无误,开始编译安装。
make && make install

最后恢复下配置文件,OK了。

查看版本号:
[root@PowerPC nginx-1.1.17]# nginx -v
nginx version: nginx/1.1.17

恩,看起来,一切都很顺利。

重新启动服务,网站正常。至此,升级成功。
[ ] ( 3266 次浏览 ) 永久链接 ( 3 / 2449 )

<< <上一页 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 下一页> >>