Welcome to Rolland Town which Record fire's life.
« »
2009年04月8日代码生活

215 views

sun4v下安装Nginx

  清明期间看到大鱼儿写的Nginx并发逼近1万大关,想想学校的教务系统的web端,应该也可以用到Nginx。因为之前用Apache加载resin来做的负载均衡,但是偶尔会出现登录后500的错误,百思不得其解,但是只要刷新一下就好了。所以后来放弃了用Apache加载resin做负载均衡。所以看了大鱼儿的blog就跃跃欲试。

  1、服务器是sun4v系列的,查看了官方的说明可以支持,直接下载了稳定版。

  2、由于自己只是做一个负载均衡,不需要其他一些模块,所以连PCRE我也放弃了。

  3、需要gcc或者其他来编译,操作系统没装,我就去down了个gcc回来。

  准备工作就绪,把包传到服务器上去。开工。

# gunzip gcc-3.4.6-sol10-sparc-local.gz
# pkgadd -d ./gcc-3.4.6-sol10-sparc-local
# gunzip libiconv-1.11-sol10-sparc-local.gz
# pkgadd -d ./libiconv-1.11-sol10-sparc-local
# PATH=$PATH:/opt/gnome/bin:/usr/local/bin:/opt/netscape:/usr/ccs/bin
# exprot PATH
# gzip -d nginx-0.6.36.tar.gz
# tar xvf nginx-0.6.36.tar
# ./configure –without-http_rewrite_module –user=webadmin –group=webadmin –with-http_stub_status_module
checking for OS
 + SunOS 5.10 sun4v
checking for C compiler … found
 + using GNU C compiler
 + gcc version: 3.4.6
checking for gcc -pipe switch … found
checking for gcc variadic macros … found
checking for C99 variadic macros … found
checking for unistd.h … found
checking for inttypes.h … found
checking for limits.h … found
checking for sys/filio.h … found
checking for crypt.h … found
checking for SunOS specific features
checking for sendfilev() … found
checking for event ports … found
checking for poll() … found
checking for /dev/poll … found
checking for kqueue … not found
checking for crypt() … found
checking for zlib library … found
checking for int size … 4 bytes
checking for long size … 4 bytes
checking for long long size … 8 bytes
checking for void * size … 4 bytes
checking for uint64_t … found
checking for sig_atomic_t … found
checking for sig_atomic_t size … 4 bytes
checking for socklen_t … found
checking for in_addr_t … found
checking for in_port_t … found
checking for rlim_t … found
checking for uintptr_t … uintptr_t found
checking for system endianess … big endianess
checking for size_t size … 4 bytes
checking for off_t size … 8 bytes
checking for time_t size … 4 bytes
checking for setproctitle() … not found
checking for pread() … found
checking for pwrite() … found
checking for strerror_r() … found
checking for gnu style strerror_r() … found but is not working
checking for localtime_r() … found
checking for posix_memalign() … not found
checking for memalign() … found
checking for sched_yield() … found
checking for mmap(MAP_ANON|MAP_SHARED) … found
checking for mmap("/dev/zero", MAP_SHARED) … found
checking for System V shared memory … found
checking for struct msghdr.msg_control … not found
checking for ioctl(FIONBIO) … found
checking for struct tm.tm_gmtoff … not found

Configuration summary
  + PCRE library is not used
  + OpenSSL library is not used
  + md5 library is not used
  + sha1 library is not used
  + using system zlib library

  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "/usr/local/nginx/client_body_temp"
  nginx http proxy temporary files: "/usr/local/nginx/proxy_temp"
  nginx http fastcgi temporary files: "/usr/local/nginx/fastcgi_temp"
# make
make -f objs/Makefile
gcc -c -mcpu=v9 -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g -I src/core  -I src/event  -I src/event/modules  -I src/os/unix  -I objs \
………省略……….
# makeinstall

  要让人笑掉大牙的地方就在make那里,我几乎耗费了整整一天的时间来找原因。我make的时候看到有error字样就以为是错误,屏幕显示问题成了-W在上一行的最后部分,error在第二行开头。我就以为是错误,然后到邮件列表啊什么的里面去海找。

版权声明 »

可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
本文url:http://netfire.name/archives/20090408/328.html

日志信息 »

该日志于2009-04-08 16:05由 NetFire 发表在代码生活分类下, 评论已关闭。

AdSense »

没有评论

抱歉,评论被关闭

返回顶部