- 浏览: 4754115 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
bzhao:
你也应该可以这样:(not tested)./rbtunnel ...
在Bash脚本中怎么关闭文件描述符? -
bzhao:
如果有A进程原代码情况下,通过如下调用,把他的子进程继承关闭则 ...
在Bash脚本中怎么关闭文件描述符? -
Master-Gao:
楼主咋没分析下源码呢?
我使用过的Linux命令之dirname - 截取给定路径的目录部分 -
jiedushi:
tail -F 就可以吧
Linux下实时跟踪log4j日志文件的bash脚本 - 增强了tail -f的功能 -
java_is_new:
新手学习了,就是不明白为一个网卡配多个ip有什么用
我使用过的Linux命令之ifconfig - 网络配置命令
nginx版本:最新版的稳定版 nginx 1.2.1
操作系统:CentOS 5.8
步骤如下:(假定安装在/opt/nginx目录中)
mkdir nginx
cd nginx/
wget http://nginx.org/download/nginx-1.2.1.tar.gz
tar zxf nginx-1.2.1.tar.gz
cd nginx-1.2.1
./configure --prefix=/opt/nginx
make && make install
根据安装过程中的错误提示,可能需要安装pcre开发包
yum install -y pcre-devel
详细记录如下:
[root@www setup]$ mkdir nginx
[root@www setup]$ cd nginx/
[root@www nginx]$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
--2012-06-14 10:29:25-- http://nginx.org/download/nginx-1.2.1.tar.gz
正在解析主机 nginx.org... 206.251.255.63
Connecting to nginx.org|206.251.255.63|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:718161 (701K) [application/octet-stream]
Saving to: `nginx-1.2.1.tar.gz'
100%[=============================================================================================================================>] 718,161 65.8K/s in 15s
2012-06-14 10:29:41 (46.3 KB/s) - `nginx-1.2.1.tar.gz' saved [718161/718161]
[root@www nginx]$ tar zxf nginx-1.2.1.tar.gz
[root@www nginx]$ cd nginx-1.2.1
[root@www nginx-1.2.1]$ ls
auto CHANGES CHANGES.ru conf configure contrib html LICENSE man README src
[root@www nginx-1.2.1]$ ./configure --prefix=/opt/nginx
checking for OS
+ Linux 2.6.18-164.6.1.el5xen i686
checking for C compiler ... found
checking for gcc builtin atomic operations ... not found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_ACCEPTFILTER ... not found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT ... found
checking for TCP_INFO ... not found
checking for accept4() ... not 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 ... little 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 sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... 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 POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
[root@www nginx-1.2.1]$ yum install -y pcre-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.btte.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pcre-devel.i386 0:6.6-6.el5_6.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================
Installing:
pcre-devel i386 6.6-6.el5_6.1 base 181 k
Transaction Summary
=======================================================================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 181 k
Downloading Packages:
pcre-devel-6.6-6.el5_6.1.i386.rpm | 181 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : pcre-devel 1/1
Installed:
pcre-devel.i386 0:6.6-6.el5_6.1
Complete!
[root@www nginx-1.2.1]$
[root@www nginx-1.2.1]$ ./configure --prefix=/opt/nginx
checking for OS
+ Linux 2.6.18-164.6.1.el5xen i686
checking for C compiler ... found
checking for gcc builtin atomic operations ... not found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_ACCEPTFILTER ... not found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT ... found
checking for TCP_INFO ... not found
checking for accept4() ... not 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 ... little 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 sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... 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 POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
checking for PCRE library ... found
checking for PCRE JIT support ... not found
checking for system md library ... not found
checking for system md5 library ... not found
checking for OpenSSL md5 crypto library ... not found
checking for sha1 in system md library ... not found
checking for OpenSSL sha1 crypto library ... not found
checking for zlib library ... found
creating objs/Makefile
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using builtin md5 code
+ sha1 library is not found
+ using system zlib library
nginx path prefix: "/opt/nginx"
nginx binary file: "/opt/nginx/sbin/nginx"
nginx configuration prefix: "/opt/nginx/conf"
nginx configuration file: "/opt/nginx/conf/nginx.conf"
nginx pid file: "/opt/nginx/logs/nginx.pid"
nginx error log file: "/opt/nginx/logs/error.log"
nginx http access log file: "/opt/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
[root@www nginx-1.2.1]$
[root@www nginx-1.2.1]$
[root@www nginx-1.2.1]$ make && make install
make -f objs/Makefile
make[1]: Entering directory `/root/setup/nginx/nginx-1.2.1'
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/nginx.o \
src/core/nginx.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_log.o \
src/core/ngx_log.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_palloc.o \
src/core/ngx_palloc.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_array.o \
src/core/ngx_array.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_list.o \
src/core/ngx_list.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_hash.o \
src/core/ngx_hash.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_buf.o \
src/core/ngx_buf.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_queue.o \
src/core/ngx_queue.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_output_chain.o \
src/core/ngx_output_chain.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_string.o \
src/core/ngx_string.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_parse.o \
src/core/ngx_parse.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_inet.o \
src/core/ngx_inet.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_file.o \
src/core/ngx_file.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_crc32.o \
src/core/ngx_crc32.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_murmurhash.o \
src/core/ngx_murmurhash.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_md5.o \
src/core/ngx_md5.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_rbtree.o \
src/core/ngx_rbtree.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_radix_tree.o \
src/core/ngx_radix_tree.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_slab.o \
src/core/ngx_slab.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_times.o \
src/core/ngx_times.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_shmtx.o \
src/core/ngx_shmtx.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_connection.o \
src/core/ngx_connection.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_cycle.o \
src/core/ngx_cycle.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_spinlock.o \
src/core/ngx_spinlock.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_cpuinfo.o \
src/core/ngx_cpuinfo.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_conf_file.o \
src/core/ngx_conf_file.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_resolver.o \
src/core/ngx_resolver.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_open_file_cache.o \
src/core/ngx_open_file_cache.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_crypt.o \
src/core/ngx_crypt.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/event/ngx_event.o \
src/event/ngx_event.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/event/ngx_event_timer.o \
src/event/ngx_event_timer.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/event/ngx_event_posted.o \
src/event/ngx_event_posted.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/event/ngx_event_busy_lock.o \
src/event/ngx_event_busy_lock.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/event/ngx_event_accept.o \
src/event/ngx_event_accept.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/event/ngx_event_connect.o \
src/event/ngx_event_connect.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/event/ngx_event_pipe.o \
src/event/ngx_event_pipe.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_time.o \
src/os/unix/ngx_time.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_errno.o \
src/os/unix/ngx_errno.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_alloc.o \
src/os/unix/ngx_alloc.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_files.o \
src/os/unix/ngx_files.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_socket.o \
src/os/unix/ngx_socket.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_recv.o \
src/os/unix/ngx_recv.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_readv_chain.o \
src/os/unix/ngx_readv_chain.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_udp_recv.o \
src/os/unix/ngx_udp_recv.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_send.o \
src/os/unix/ngx_send.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_writev_chain.o \
src/os/unix/ngx_writev_chain.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_channel.o \
src/os/unix/ngx_channel.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_shmem.o \
src/os/unix/ngx_shmem.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_process.o \
src/os/unix/ngx_process.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_daemon.o \
src/os/unix/ngx_daemon.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_setaffinity.o \
src/os/unix/ngx_setaffinity.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_setproctitle.o \
src/os/unix/ngx_setproctitle.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_posix_init.o \
src/os/unix/ngx_posix_init.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_user.o \
src/os/unix/ngx_user.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_process_cycle.o \
src/os/unix/ngx_process_cycle.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_linux_init.o \
src/os/unix/ngx_linux_init.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/event/modules/ngx_epoll_module.o \
src/event/modules/ngx_epoll_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/os/unix/ngx_linux_sendfile_chain.o \
src/os/unix/ngx_linux_sendfile_chain.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_regex.o \
src/core/ngx_regex.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http.o \
src/http/ngx_http.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_core_module.o \
src/http/ngx_http_core_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_special_response.o \
src/http/ngx_http_special_response.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_request.o \
src/http/ngx_http_request.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_parse.o \
src/http/ngx_http_parse.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_header_filter_module.o \
src/http/ngx_http_header_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_write_filter_module.o \
src/http/ngx_http_write_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_copy_filter_module.o \
src/http/ngx_http_copy_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_log_module.o \
src/http/modules/ngx_http_log_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_request_body.o \
src/http/ngx_http_request_body.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_variables.o \
src/http/ngx_http_variables.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_script.o \
src/http/ngx_http_script.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_upstream.o \
src/http/ngx_http_upstream.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_upstream_round_robin.o \
src/http/ngx_http_upstream_round_robin.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_parse_time.o \
src/http/ngx_http_parse_time.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_static_module.o \
src/http/modules/ngx_http_static_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_index_module.o \
src/http/modules/ngx_http_index_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_chunked_filter_module.o \
src/http/modules/ngx_http_chunked_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_range_filter_module.o \
src/http/modules/ngx_http_range_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_headers_filter_module.o \
src/http/modules/ngx_http_headers_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_not_modified_filter_module.o \
src/http/modules/ngx_http_not_modified_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_busy_lock.o \
src/http/ngx_http_busy_lock.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_file_cache.o \
src/http/ngx_http_file_cache.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_gzip_filter_module.o \
src/http/modules/ngx_http_gzip_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/ngx_http_postpone_filter_module.o \
src/http/ngx_http_postpone_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_ssi_filter_module.o \
src/http/modules/ngx_http_ssi_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_charset_filter_module.o \
src/http/modules/ngx_http_charset_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_userid_filter_module.o \
src/http/modules/ngx_http_userid_filter_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_autoindex_module.o \
src/http/modules/ngx_http_autoindex_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_auth_basic_module.o \
src/http/modules/ngx_http_auth_basic_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_access_module.o \
src/http/modules/ngx_http_access_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_limit_conn_module.o \
src/http/modules/ngx_http_limit_conn_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_limit_req_module.o \
src/http/modules/ngx_http_limit_req_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_geo_module.o \
src/http/modules/ngx_http_geo_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_map_module.o \
src/http/modules/ngx_http_map_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_split_clients_module.o \
src/http/modules/ngx_http_split_clients_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_referer_module.o \
src/http/modules/ngx_http_referer_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_rewrite_module.o \
src/http/modules/ngx_http_rewrite_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_proxy_module.o \
src/http/modules/ngx_http_proxy_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_fastcgi_module.o \
src/http/modules/ngx_http_fastcgi_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_uwsgi_module.o \
src/http/modules/ngx_http_uwsgi_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_scgi_module.o \
src/http/modules/ngx_http_scgi_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_memcached_module.o \
src/http/modules/ngx_http_memcached_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_empty_gif_module.o \
src/http/modules/ngx_http_empty_gif_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_browser_module.o \
src/http/modules/ngx_http_browser_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
src/http/modules/ngx_http_upstream_ip_hash_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
src/http/modules/ngx_http_upstream_keepalive_module.c
gcc -c -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/ngx_modules.o \
objs/ngx_modules.c
gcc -o objs/nginx \
objs/src/core/nginx.o \
objs/src/core/ngx_log.o \
objs/src/core/ngx_palloc.o \
objs/src/core/ngx_array.o \
objs/src/core/ngx_list.o \
objs/src/core/ngx_hash.o \
objs/src/core/ngx_buf.o \
objs/src/core/ngx_queue.o \
objs/src/core/ngx_output_chain.o \
objs/src/core/ngx_string.o \
objs/src/core/ngx_parse.o \
objs/src/core/ngx_inet.o \
objs/src/core/ngx_file.o \
objs/src/core/ngx_crc32.o \
objs/src/core/ngx_murmurhash.o \
objs/src/core/ngx_md5.o \
objs/src/core/ngx_rbtree.o \
objs/src/core/ngx_radix_tree.o \
objs/src/core/ngx_slab.o \
objs/src/core/ngx_times.o \
objs/src/core/ngx_shmtx.o \
objs/src/core/ngx_connection.o \
objs/src/core/ngx_cycle.o \
objs/src/core/ngx_spinlock.o \
objs/src/core/ngx_cpuinfo.o \
objs/src/core/ngx_conf_file.o \
objs/src/core/ngx_resolver.o \
objs/src/core/ngx_open_file_cache.o \
objs/src/core/ngx_crypt.o \
objs/src/event/ngx_event.o \
objs/src/event/ngx_event_timer.o \
objs/src/event/ngx_event_posted.o \
objs/src/event/ngx_event_busy_lock.o \
objs/src/event/ngx_event_accept.o \
objs/src/event/ngx_event_connect.o \
objs/src/event/ngx_event_pipe.o \
objs/src/os/unix/ngx_time.o \
objs/src/os/unix/ngx_errno.o \
objs/src/os/unix/ngx_alloc.o \
objs/src/os/unix/ngx_files.o \
objs/src/os/unix/ngx_socket.o \
objs/src/os/unix/ngx_recv.o \
objs/src/os/unix/ngx_readv_chain.o \
objs/src/os/unix/ngx_udp_recv.o \
objs/src/os/unix/ngx_send.o \
objs/src/os/unix/ngx_writev_chain.o \
objs/src/os/unix/ngx_channel.o \
objs/src/os/unix/ngx_shmem.o \
objs/src/os/unix/ngx_process.o \
objs/src/os/unix/ngx_daemon.o \
objs/src/os/unix/ngx_setaffinity.o \
objs/src/os/unix/ngx_setproctitle.o \
objs/src/os/unix/ngx_posix_init.o \
objs/src/os/unix/ngx_user.o \
objs/src/os/unix/ngx_process_cycle.o \
objs/src/os/unix/ngx_linux_init.o \
objs/src/event/modules/ngx_epoll_module.o \
objs/src/os/unix/ngx_linux_sendfile_chain.o \
objs/src/core/ngx_regex.o \
objs/src/http/ngx_http.o \
objs/src/http/ngx_http_core_module.o \
objs/src/http/ngx_http_special_response.o \
objs/src/http/ngx_http_request.o \
objs/src/http/ngx_http_parse.o \
objs/src/http/ngx_http_header_filter_module.o \
objs/src/http/ngx_http_write_filter_module.o \
objs/src/http/ngx_http_copy_filter_module.o \
objs/src/http/modules/ngx_http_log_module.o \
objs/src/http/ngx_http_request_body.o \
objs/src/http/ngx_http_variables.o \
objs/src/http/ngx_http_script.o \
objs/src/http/ngx_http_upstream.o \
objs/src/http/ngx_http_upstream_round_robin.o \
objs/src/http/ngx_http_parse_time.o \
objs/src/http/modules/ngx_http_static_module.o \
objs/src/http/modules/ngx_http_index_module.o \
objs/src/http/modules/ngx_http_chunked_filter_module.o \
objs/src/http/modules/ngx_http_range_filter_module.o \
objs/src/http/modules/ngx_http_headers_filter_module.o \
objs/src/http/modules/ngx_http_not_modified_filter_module.o \
objs/src/http/ngx_http_busy_lock.o \
objs/src/http/ngx_http_file_cache.o \
objs/src/http/modules/ngx_http_gzip_filter_module.o \
objs/src/http/ngx_http_postpone_filter_module.o \
objs/src/http/modules/ngx_http_ssi_filter_module.o \
objs/src/http/modules/ngx_http_charset_filter_module.o \
objs/src/http/modules/ngx_http_userid_filter_module.o \
objs/src/http/modules/ngx_http_autoindex_module.o \
objs/src/http/modules/ngx_http_auth_basic_module.o \
objs/src/http/modules/ngx_http_access_module.o \
objs/src/http/modules/ngx_http_limit_conn_module.o \
objs/src/http/modules/ngx_http_limit_req_module.o \
objs/src/http/modules/ngx_http_geo_module.o \
objs/src/http/modules/ngx_http_map_module.o \
objs/src/http/modules/ngx_http_split_clients_module.o \
objs/src/http/modules/ngx_http_referer_module.o \
objs/src/http/modules/ngx_http_rewrite_module.o \
objs/src/http/modules/ngx_http_proxy_module.o \
objs/src/http/modules/ngx_http_fastcgi_module.o \
objs/src/http/modules/ngx_http_uwsgi_module.o \
objs/src/http/modules/ngx_http_scgi_module.o \
objs/src/http/modules/ngx_http_memcached_module.o \
objs/src/http/modules/ngx_http_empty_gif_module.o \
objs/src/http/modules/ngx_http_browser_module.o \
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/ngx_modules.o \
-lpthread -lcrypt -lpcre -lz
make[1]: Leaving directory `/root/setup/nginx/nginx-1.2.1'
make -f objs/Makefile manpage
make[1]: Entering directory `/root/setup/nginx/nginx-1.2.1'
sed -e "s|%%PREFIX%%|/opt/nginx|" \
-e "s|%%PID_PATH%%|/opt/nginx/logs/nginx.pid|" \
-e "s|%%CONF_PATH%%|/opt/nginx/conf/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|/opt/nginx/logs/error.log|" \
< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory `/root/setup/nginx/nginx-1.2.1'
make -f objs/Makefile install
make[1]: Entering directory `/root/setup/nginx/nginx-1.2.1'
test -d '/opt/nginx' || mkdir -p '/opt/nginx'
test -d '/opt/nginx/sbin' || mkdir -p '/opt/nginx/sbin'
test ! -f '/opt/nginx/sbin/nginx' || mv '/opt/nginx/sbin/nginx' '/opt/nginx/sbin/nginx.old'
cp objs/nginx '/opt/nginx/sbin/nginx'
test -d '/opt/nginx/conf' || mkdir -p '/opt/nginx/conf'
cp conf/koi-win '/opt/nginx/conf'
cp conf/koi-utf '/opt/nginx/conf'
cp conf/win-utf '/opt/nginx/conf'
test -f '/opt/nginx/conf/mime.types' || cp conf/mime.types '/opt/nginx/conf'
cp conf/mime.types '/opt/nginx/conf/mime.types.default'
test -f '/opt/nginx/conf/fastcgi_params' || cp conf/fastcgi_params '/opt/nginx/conf'
cp conf/fastcgi_params '/opt/nginx/conf/fastcgi_params.default'
test -f '/opt/nginx/conf/fastcgi.conf' || cp conf/fastcgi.conf '/opt/nginx/conf'
cp conf/fastcgi.conf '/opt/nginx/conf/fastcgi.conf.default'
test -f '/opt/nginx/conf/uwsgi_params' || cp conf/uwsgi_params '/opt/nginx/conf'
cp conf/uwsgi_params '/opt/nginx/conf/uwsgi_params.default'
test -f '/opt/nginx/conf/scgi_params' || cp conf/scgi_params '/opt/nginx/conf'
cp conf/scgi_params '/opt/nginx/conf/scgi_params.default'
test -f '/opt/nginx/conf/nginx.conf' || cp conf/nginx.conf '/opt/nginx/conf/nginx.conf'
cp conf/nginx.conf '/opt/nginx/conf/nginx.conf.default'
test -d '/opt/nginx/logs' || mkdir -p '/opt/nginx/logs'
test -d '/opt/nginx/logs' || mkdir -p '/opt/nginx/logs'
test -d '/opt/nginx/html' || cp -R html '/opt/nginx'
test -d '/opt/nginx/logs' || mkdir -p '/opt/nginx/logs'
make[1]: Leaving directory `/root/setup/nginx/nginx-1.2.1'
[root@www nginx-1.2.1]$
本文地址:http://codingstandards.iteye.com/blog/1560835
[root@www nginx-1.2.1]$
[root@www nginx-1.2.1]$ cd /opt/nginx/
[root@www nginx]$ tree
.
|-- conf
| |-- fastcgi.conf
| |-- fastcgi.conf.default
| |-- fastcgi_params
| |-- fastcgi_params.default
| |-- koi-utf
| |-- koi-win
| |-- mime.types
| |-- mime.types.default
| |-- nginx.conf
| |-- nginx.conf.default
| |-- scgi_params
| |-- scgi_params.default
| |-- uwsgi_params
| |-- uwsgi_params.default
| `-- win-utf
|-- html
| |-- 50x.html
| `-- index.html
|-- logs
`-- sbin
`-- nginx
4 directories, 18 files
[root@www nginx]$
相关推荐
本文将详细介绍如何在CentOS操作系统上安装Nginx,这是一个非常基础且重要的步骤,对于运维人员和开发者来说是必备技能。 首先,确保你的CentOS系统是最新的,可以通过运行`sudo yum update`来更新系统。接下来,...
### CentOS 7 下安装 Nginx (有网络与无网络环境) #### 一、概述 Nginx 是一款广泛使用的高性能 HTTP 和反向代理 Web 服务器,同时也提供了 IMAP/POP3/SMTP 服务。其特点是占有内存少,并发能力强,事实上很多网站...
在非root权限下安装Nginx,即不使用管理员权限进行安装,需要一些额外的步骤和技巧。下面将详细介绍这个过程。 首先,由于在非root环境下安装软件会受到权限限制,因此我们需要确保我们有足够的权限来创建目录、...
本篇文章将详细介绍如何在CentOS 7系统上离线安装Nginx,并着重讲解依赖库的处理方法。 Nginx是一款高性能的HTTP和反向代理服务器,广泛应用于Web服务器领域,尤其以其高效稳定而著称。在CentOS 7系统中安装Nginx时...
### CentOS安装Nginx详细配置知识点 #### 一、安装准备 ...以上就是CentOS上安装Nginx并进行初步配置的详细过程,通过这些步骤,用户可以在自己的服务器上快速部署并运行Nginx,为网站提供高性能的Web服务。
本压缩包“centos7.5离线安装nginx1.17.8全套包.zip”提供了在没有网络连接的情况下在CentOS 7.5上安装Nginx 1.17.8的所有必要文件和步骤。以下将详细介绍如何进行离线安装以及Nginx的一些核心概念。 1. **离线安装...
离线安装Nginx在没有网络的环境下尤其有用,但需要注意的是,这种方式可能会错过一些安全更新和新功能。在能够联网的环境中,推荐使用`yum`或`dnf`等包管理器进行安装和更新,以确保系统的安全性与稳定性。
### CentOS 7 安装 Nginx 1.16.1 #### 一、概述 本篇文章将详细介绍如何在 CentOS 7 上安装 Nginx 1.16.1 版本。Nginx 是一款轻量级的 Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,由俄罗斯的...
本指南将详细解释如何在 CentOS 6.3 环境下安装 Nginx,以及涉及到的源码编译与工具使用。 首先,确保系统是最新的。打开终端,输入以下命令更新系统软件包: ```bash yum update -y ``` 接下来,安装必要的构建...
本压缩包"centOS7离线安装nginx依赖包.zip"显然是为了帮助用户在没有网络连接的环境中在CentOS 7上安装Nginx。离线安装意味着我们需要预先准备所有必要的依赖包,以便在目标机器上进行安装。 首先,了解Nginx的基本...
首先,让我们了解一下在CentOS上手动安装Nginx的基本步骤,这将有助于理解自动安装的过程: 1. **更新系统**:使用`sudo yum update`命令来确保所有已安装的软件包都是最新的,这可以避免兼容性问题。 2. **添加...
### CentOS 下 Nginx 安装操作文档 #### 概述 本文档旨在提供一份详细的指导,帮助用户在 CentOS 系统中成功安装 Nginx 1.11.4 版本及其所需依赖包。Nginx 是一款高性能的 HTTP 和反向代理 Web 服务器,同时也是一...
在Linux环境中,特别是对于服务器操作...总之,离线安装Nginx在CentOS 6.x上需要手动处理更多细节,但通过下载源码包和依赖,并按照正确的步骤进行配置和编译,你可以成功地在无网络的环境中部署这个强大的Web服务器。
通过以上步骤,可以在CentOS7环境下安全有效地升级Nginx。无论是选择YUM upgrade还是源码平滑升级,都应确保升级过程不会影响到现有的Web服务。对于大型生产环境,建议采用源码平滑升级以保持服务的连续性。
### CentOS系统下Nginx服务器的安装步骤及常见问题解决 #### 一、概述 本文档详细介绍了在CentOS操作系统中安装Nginx服务器的具体步骤,并针对安装过程中可能遇到的几个常见错误给出了相应的解决方案。Nginx是一款...
**标题与描述解析** ...以上就是在 CentOS 上安装 Nginx 的详细步骤,包括依赖安装、源代码编译、配置和启动,以及后续的监控和优化。通过这些操作,你可以自定义 Nginx 的功能和性能,满足特定的 Web 服务需求。
#### 二、CentOS8环境下Nginx的安装与配置 ##### 2.1 安装前准备 在安装Nginx之前,我们需要确保系统已经安装了一些必要的编译工具和库文件,这些工具和库文件对于Nginx的成功编译和运行至关重要。 **Nginx依赖...
"CentOS 7.4 下安装 Nginx 1.16.0" 在 CentOS 7.4 操作系统中安装 Nginx 1.16.0 需要遵循以下步骤: 一、下载 Nginx 安装包 首先,需要切换到 `/usr/local` 目录下,然后下载 Nginx 1.16.0 的安装包。可以使用 ...
总的来说,安装Nginx在CentOS 7.2上是一个简单的过程,主要步骤包括添加Nginx仓库、安装Nginx软件包以及启动和配置服务。通过熟练掌握这些步骤,你将能够轻松地在自己的服务器上部署和管理Nginx服务。
在本篇关于在CentOS 7上安装nginx的文档中,详细介绍了从下载、配置到启动Nginx的完整过程,同时涵盖了对防火墙的配置和对Nginx进行基本管理操作的步骤。以下将对这些知识点进行详细阐述: ### 1. 下载Nginx 在...