升级安装 Hiawatha 7.6、nginx 1.1.1 和 Varnish Cache 3.0.1 RC1 

本周我所使用的web server —— Hiawatha 发布了7.6的版本,重写了关于防止SQL注入方面的模块,官方推荐升级标记为低。考虑到稳定性,我决定还是跟进,因为hiawatha 并不常更新。

还有就是我所使用的缓存服务器varnish 也放出了3.0.1的测试版 RC1,考虑到前一版本的varnishadm 有点问题,我也打算更新到该版本。

最后就是nginx 发布了1.1.1的光棍版,本来我用1.0.4版用的好好的,唯一不爽的就是时区总是不对。我怀疑是在编译安装时被定义死了,所以我便打算重新编译一个版本,看看能不能修复这个问题。

首先,停掉相关所有服务。
killall hiawatha
killall nginx
killall varnishd

删除所有旧程序,备份配置文件。

现在,开始安装新版本。首先是hiawatha.
下载源码包(http://www.hiawatha-webserver.org/files/hiawatha-7.6.tar.gz),解压,进入目录:

我的configure:
[root@PowerPC hiawatha-7.6]# ./configure \
> --prefix=/usr/local/hiawatha \
> --exec-prefix=/usr/local \
> --sysconfdir=/etc/sysconfig \
> --localstatedir=/var \
> --disable-largefile \
> --enable-chroot \
> --enable-command \
> --disable-ipv6 \
> --disable-monitor \
> --disable-ssl

检查依赖,没有问题,接下来make && make install安装.一切顺利。之后,覆盖掉新生成的配置文件即可。

便可以启动hiawatha服务器了。

接来下是nginx,下载源码包(http://nginx.org/download/nginx-1.1.1.tar.gz),解压,进入目录:

我的configure:
[root@PowerPC nginx-1.1.1]# ./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=/tmp/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_gzip_static_module \
> --without-http_ssi_module \
> --without-http_auth_basic_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 \
> --without-pcre

检查依赖,没有任何问题。之后configure给出了编译概况,见下:

Configuration summary
+ PCRE library is disabled
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1 library is not used
+ 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 编译安装至指定目录。然后在恢复下配置文件,即 nginx.conf 文件。便可以启动nginx 服务器了~

最后就是varnish cache 了,下载源码包(http://repo.varnish-cache.org/source/varnish-3.0.1-rc1.tar.gz),解压,进入目录:

我的configure:
[root@PowerPC varnish-3.0.1-rc1]# ./configure \
> --prefix=/usr/local/varnish \
> --exec-prefix=/usr/local \
> --sysconfdir=/etc/sysconfig \
> --localstatedir=/var \
> --disable-largefile

检查依赖,没有问题,之后便编译安装 make && make install.完了之后就是恢复下之前备份的配置文件,即 default.vcl 文件.

一切OK后。便可以启动varnish 服务器了。

试了一下,所有网站访问正常。唯一的问题……就是nginx,肿么时区还是UTC?为神马??晕了~

评论