CentOS下安装nginx步骤

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]$

Centos7安装Nginx的步骤 Centos7安装Nginx准备工作:开始前,请确认gcc g++开发类库是否装好安装make:yum -y install gcc automake autoconf libtool make安装g++:yum install gcc gcc-c++下面正式开始:一、选定安装文件目录  可以选择任何目录,演示选择  cd /usr/local/srccd /usr/local/src二、安装PC... 阅读详情

相关推荐

CentOS下非root用户安装Nginx的详细步骤

CentOS,作为企业级Linux服务器市场中的主流选择之一,提供了稳定、可预测且可高度定制的服务器操作系统。它是基于Red Hat Enterprise Linux (RHEL) 源代码的免费版本,专为那些寻求无需付费的企业级支持的用户而设计。CentOS以其出色的性能和强大的社区支持,在全球范围内拥有庞大的用户群体。Nginx(发音为 “engine-x”)是一个高性能的HTTP和反向代理服务器,它也是一个IMAP/POP3/SMTP服务器。

weixin_32287387的博客 836

linux安装nginx1.18最详细的步骤 笔记

文章目录 1.安装依赖包 //一键安装上面四个依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel wget 2.下载并解压安装包 //创建一个文件夹 cd /usr/local mkdir nginx cd nginx //下载tar包 wget http://nginx.org/download/nginx-1.18.0.tar.gz tar -zxvf nginx-1.18.0.tar.gz 3.安装ngi

qq_38394518的博客 1794

手把手教你用Github提交CVE漏洞(附完整截图流程)

本文提供了在GitHub平台提交CVE漏洞的完整实战指南。从前期准备、目标搜寻与漏洞验证,到撰写规范的GitHub Issue进行披露,最后通过官方渠道完成CVE提交,手把手教你如何将安全研究成果转化为获得国际认可的CVE编号。

weixin_28309571的博客 321

nginx安装及其配置使用

1、Nginx  Nginx是一款轻量级的Web服务器,也是一款轻量级的反向代理服务器。 do: 直接支持Rails和PHP程序 作为HTTP反向代理服务器 作为负载均衡服务器 作为邮件代理服务器 帮助实现前端动静分离      …… 特点:高稳定、高性能、资源占用少、功能丰富、模块化结构、支持热部署 2、Nginx安装---centos7 源码安装 需要gcc 需要pcre...

面朝大海 529

思科华三设备组网思科生成树PVST发BPDU导致全网闪断

一、故障现象 1.思科PVST BPDU报文导致全网闪断。 2.光衰低时不同品牌网络设备无法兼容导致接入交换机中断。 二、网络拓扑 图1 网络拓扑图 组网结构为H3C汇聚,接入交换机有思科,也有H3C,而且与汇聚直连的接入交换机下面串接了较多的交换机,或者hub。 三、排查思路 1.回忆一下最近做了什么事情,什么时候开始出的问题。 将网络汇聚交换机从思科换为H3C,H3C汇聚和思科接入对接出问题...

Silence_always的博客 7470

linux操作系统使用以太网连接ubuntu,设置固定ipv4

首先,您需要确定要配置的网络接口。可以使用ifconfig -a或ip addr命令来列出当前系统上的所有网络接口及其相关信息。找到您要配置的网络接口名称,例如eth0、ens33或enp0s3;保存并关闭文件后,您需要重启网络服务以使更改生效。在linux操作系统中,要使用交换机连接以太网可以直接使用交互界面;如果你的操作系统没有交互界面,你可以使用命令方式配置;点击ipv4,方式为手动,可以设置ip和子网了;开头,后接网络接口名称。第三步:点击有线最右边圆形控件;第二步:点击有线设置;

2301_79311842的博客 2404

centos版本阿里云服务器安装naginx以及相关配置

centos版本阿里云服务器安装naginx以及相关配置

undefined的博客 802

qcc514x-qcc304x调试笔记

qcc514x-qcc304x调试笔记-1-QCC514x系列 qcc514x-qcc304x调试笔记-2-开发环境搭建 qcc514x-qcc304x调试笔记-3-如何修改蓝牙名称 qcc514x-qcc304x调试笔记-4-如何修改蓝牙地址 qcc514x-qcc304x调试笔记-5-如何区分左右耳 qcc514x-qcc304x调试笔记-6-PIO相关操作 ...

leezs的博客 1244

centos7系统安装配置nginx

1、去官网http://nginx.org/en/download.html下载最新nginx安装包,我下载的是nginx-1.10.1.tar.gz版本,将压缩包放入自己的/usr/local/mySoftWare目录下,准备采用编译方式安装。使用Ftp工具上传新建目录的时候注意权限,如果不是管理员用户,需要使用管理员用户对文件夹添加权限,chmod -R 777 mySoftWare。使用ta

不积小流无以成江海,不积跬步无以至千里 8411

Cesium 实战 26 - 自定义纹理材质 - 箭头流动线(图片纹理)

Cesium 实战 - 自定义纹理材质 - 箭头流动线(图片纹理)。

非科班Java出身GISer的博客 1400

COMSOL介电弹性体数值仿真指南:预拉伸圆形DEA的稳态变形分析(II)

本期博客是《COMSOL介电弹性体数值仿真指南》系列博客中的一期。聚焦于介电弹性体驱动器(DEA)中最为经典的预拉伸圆形DEA驱动器构型,对其在COMSOL平台中的具体建模步骤进行介绍与讨论。

忘了面孔的Batou 353

CentOS下安装Nginx的操作步骤

原文:https://www.toutiao.com/i6935301304688345631/ CentOS下安装Nginx步骤如下 1、下载nginx安装包 http://nginx.org/en/download.html 下载nginx-1.14.2稳定版本 2、yum安装nginx基础依赖包pcre-devel,pcre,openssl,openssl-devel [root@localhost ~]# yum install -y pcre pcre-devel opens.

一口Linux的专栏 2559

apollo-慢速车向左绕行

当主车前方出现其他车辆时,通过左侧车道对前车绕行。

是菜鸟o的博客 309

CentOS7安装Nginx详细步骤

CentOS7安装Nginx详细步骤

杨杨吖的博客 1万+

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

centos7安装nginx服务详细步骤

步骤总览1.新建安装目录2.下载nginx服务.gz源码包 1.新建安装目录 linux系统自己安装的软件一般放到/usr/local目录下 进入此目录新建文件夹nginx 2.下载nginx服务.gz源码包 ...

weixin_43801689的博客 928

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

centos 7 安装nginx 详细步骤

1.  gcc 安装 安装 nginx 需要先将官网下载的源码进行编译,编译依赖 gcc 环境,如果没有 gcc 环境,则需要安装: yum install gcc-c++ 2.PCRE pcre-devel 安装 PCRE(Perl Compatible Regular Expressions) 是一个Perl库,包括 perl 兼容的正则表达式库。nginx 的 http 模块使用...

xiaolinlangzi的博客 2888

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Centos7安装Nginx详细安装步骤

Centos7安装Nginx步骤 手动配置nginx的yum仓库 使用yum命令安装nginx 启动nginx 访问nginx 1.指定nginx的yum仓库 说明:centos系统中默认的yum仓库中没有nginx的安装包, 所以要想安装nginx需要单独指定它的仓库地址 1.1 将nginx.repo上传到Linux服务器下的/etc/yum.repos.d/下 nginx.repo文件...

Java开发,人工智能,边缘计算,致力于掌握前沿技术 1906

CentOS下安装Nginx步骤

首先确保gcc g++安装完好

wmengbeyond的专栏 610

CentOS7安装Nginx步骤

Nginx是一款轻量级的Web服务器、反向代理服务器以及电子邮件代理服务器。其特点占有内存少,并发能力强。接下来将在CentOS系统下安装Nginx服务。 更新yum包 yum update 安装pcre-devel、zlib、OpenSSL pcre:一个Perl库,Nginx的HTTP模块需要使用pcre来解析正则表达式。 zlib:Nginx对HTTP的内容进行gzip时需要z...

Ssuper_X的博客 369

Centos下安装nginx步骤解析

Centos下安装nginx步骤解析 最近研究LNMP,首先要在linux下配置nginx服务器,话不多说,上步骤 1、编译环境gcc g++ 开发库之类的需要提前装好   yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel 2、首先安装PCRE  p...

kevin860的博客 347

Centos7 安装、配置、卸载 nginx 步骤解析

wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz

manba 5244

centos安装nginx详细步骤

本文主要介绍了在centos上编译安装nginx的步骤。

weixin_45501219的博客 907

Centos7安装Nginx以及设置开机自启的详细步骤

今天在centos7上安装Nginx遇到了不少麻烦,综合网上的步骤总了总结,希望能够帮助到大家 一.安装环境 1.安装GCC Nginx是C语言开发的,所以需要安装一个可以供C语言运行的环境gcc-c++,中端下输入 yum install gcc-c++ 2.安装PCRE PCRE(Perl Compatible Regular Expressions中文含义:perl语言兼容正则表达式)是一...

轻功水上喵丶的博客 3806

centos7 安装nginx 完整步骤

安装gcc gcc是用来编译下载下来的nginx源码 yum install gcc-c++ 安装pcre和pcre-devel PCRE(Perl Compatible Regular Expressions) 是一个Perl库,包括 perl 兼容的正则表达式库。 nginx 的 http 模块使用 pcre 来解析正则表达式,pcre-devel 是使用 pcre 开发的一个二...

qq_37380288的博客 234
上一篇: 双线云主机不能访问远程服务的问题解决记录
下一篇: 罗列几个关于CentOS的网站,都很值得一看,尤其是...
codingstandards
博客等级 码龄16年 12粉丝 3原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值