Nacos集群配置


1. 预备环境准备

请确保是在环境中安装使用:

  1. 64 bit OS Linux/Unix/Mac,推荐使用Linux系统。
  2. 64 bit JDK 1.8+;下载.配置
  3. Maven 3.2.x+;下载.配置
  4. 3个或3个以上Nacos节点才能构成集群。

上述是naco官网要求(https://nacos.io/zh-cn/docs/cluster-mode-quick-start.html),本次安装以CentOS7为例

2.Nginx安装及配置

# 安装rz工具,将windows中的文件拷贝给linux
[root@localhost ~]# yum -y install lrzsz

# 准备目录
[root@localhost ~]# mkdir /usr/local/nginx
[root@localhost ~]# cd /usr/local/nginx/

# 解压nginx
[root@localhost ~]# tar -zxvf nginx-1.10.2.tar.gz 

#解压完毕后,移至目录
[root@localhost ~] # cd nginx-1.10.2

#设置nginx安装路径,如果不设置,默认为/usr/local/nginx
[root@localhost nginx-1.10.2]# ./configure --prefix=/usr/local/nginx

# 运行结果
checking for OS
 + Linux 3.10.0-1127.13.1.el7.x86_64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) 
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for gcc builtin 64 bit byteswap ... 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 EPOLLRDHUP ... found
checking for O_PATH ... 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_REUSEPORT ... found
checking for SO_ACCEPTFILTER ... not found
checking for IP_RECVDSTADDR ... not found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for eventfd() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint32_t ... found
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 byte ordering ... little endian
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for pwritev() ... 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 getaddrinfo() ... found
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for md5 in system md library ... not found
checking for md5 in system md5 library ... not found
checking for md5 in system OpenSSL crypto library ... found
checking for sha1 in system md library ... not found
checking for sha1 in system OpenSSL crypto library ... found
checking for zlib library ... found
creating objs/Makefile

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

  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx modules path: "/usr/local/nginx/modules"
  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: "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@localhost nginx-1.10.2] # yum -y install gcc gcc-c++ autoconf automake make

#如果还报错,再执行这条命令
[root@localhost nginx-1.10.2] # yum -y install openssl openssl-devel

# 编译 make (make的过程是把各种语言写的源码文件,变成可执行文件和各种库文件)
[root@localhost nginx-1.10.2]# make

make执行结果

  1 make -f objs/Makefile
  2 make[1]: Entering directory `/root/nginx-1.10.2'
  3 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  4     -o objs/src/core/nginx.o \
  5     src/core/nginx.c
  6 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
  7     -o objs/src/core/ngx_log.o \
  8     src/core/ngx_log.c
  9 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 10     -o objs/src/core/ngx_palloc.o \
 11     src/core/ngx_palloc.c
 12 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 13     -o objs/src/core/ngx_array.o \
 14     src/core/ngx_array.c
 15 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 16     -o objs/src/core/ngx_list.o \
 17     src/core/ngx_list.c
 18 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 19     -o objs/src/core/ngx_hash.o \
 20     src/core/ngx_hash.c
 21 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 22     -o objs/src/core/ngx_buf.o \
 23     src/core/ngx_buf.c
 24 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 25     -o objs/src/core/ngx_queue.o \
 26     src/core/ngx_queue.c
 27 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 28     -o objs/src/core/ngx_output_chain.o \
 29     src/core/ngx_output_chain.c
 30 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 31     -o objs/src/core/ngx_string.o \
 32     src/core/ngx_string.c
 33 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 34     -o objs/src/core/ngx_parse.o \
 35     src/core/ngx_parse.c
 36 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 37     -o objs/src/core/ngx_parse_time.o \
 38     src/core/ngx_parse_time.c
 39 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 40     -o objs/src/core/ngx_inet.o \
 41     src/core/ngx_inet.c
 42 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 43     -o objs/src/core/ngx_file.o \
 44     src/core/ngx_file.c
 45 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 46     -o objs/src/core/ngx_crc32.o \
 47     src/core/ngx_crc32.c
 48 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 49     -o objs/src/core/ngx_murmurhash.o \
 50     src/core/ngx_murmurhash.c
 51 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 52     -o objs/src/core/ngx_md5.o \
 53     src/core/ngx_md5.c
 54 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 55     -o objs/src/core/ngx_rbtree.o \
 56     src/core/ngx_rbtree.c
 57 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 58     -o objs/src/core/ngx_radix_tree.o \
 59     src/core/ngx_radix_tree.c
 60 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 61     -o objs/src/core/ngx_slab.o \
 62     src/core/ngx_slab.c
 63 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 64     -o objs/src/core/ngx_times.o \
 65     src/core/ngx_times.c
 66 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 67     -o objs/src/core/ngx_shmtx.o \
 68     src/core/ngx_shmtx.c
 69 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 70     -o objs/src/core/ngx_connection.o \
 71     src/core/ngx_connection.c
 72 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 73     -o objs/src/core/ngx_cycle.o \
 74     src/core/ngx_cycle.c
 75 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 76     -o objs/src/core/ngx_spinlock.o \
 77     src/core/ngx_spinlock.c
 78 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 79     -o objs/src/core/ngx_rwlock.o \
 80     src/core/ngx_rwlock.c
 81 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 82     -o objs/src/core/ngx_cpuinfo.o \
 83     src/core/ngx_cpuinfo.c
 84 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 85     -o objs/src/core/ngx_conf_file.o \
 86     src/core/ngx_conf_file.c
 87 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 88     -o objs/src/core/ngx_module.o \
 89     src/core/ngx_module.c
 90 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 91     -o objs/src/core/ngx_resolver.o \
 92     src/core/ngx_resolver.c
 93 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 94     -o objs/src/core/ngx_open_file_cache.o \
 95     src/core/ngx_open_file_cache.c
 96 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
 97     -o objs/src/core/ngx_crypt.o \
 98     src/core/ngx_crypt.c
 99 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
100     -o objs/src/core/ngx_proxy_protocol.o \
101     src/core/ngx_proxy_protocol.c
102 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
103     -o objs/src/core/ngx_syslog.o \
104     src/core/ngx_syslog.c
105 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
106     -o objs/src/event/ngx_event.o \
107     src/event/ngx_event.c
108 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
109     -o objs/src/event/ngx_event_timer.o \
110     src/event/ngx_event_timer.c
111 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
112     -o objs/src/event/ngx_event_posted.o \
113     src/event/ngx_event_posted.c
114 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
115     -o objs/src/event/ngx_event_accept.o \
116     src/event/ngx_event_accept.c
117 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
118     -o objs/src/event/ngx_event_connect.o \
119     src/event/ngx_event_connect.c
120 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
121     -o objs/src/event/ngx_event_pipe.o \
122     src/event/ngx_event_pipe.c
123 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
124     -o objs/src/os/unix/ngx_time.o \
125     src/os/unix/ngx_time.c
126 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
127     -o objs/src/os/unix/ngx_errno.o \
128     src/os/unix/ngx_errno.c
129 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
130     -o objs/src/os/unix/ngx_alloc.o \
131     src/os/unix/ngx_alloc.c
132 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
133     -o objs/src/os/unix/ngx_files.o \
134     src/os/unix/ngx_files.c
135 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
136     -o objs/src/os/unix/ngx_socket.o \
137     src/os/unix/ngx_socket.c
138 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
139     -o objs/src/os/unix/ngx_recv.o \
140     src/os/unix/ngx_recv.c
141 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
142     -o objs/src/os/unix/ngx_readv_chain.o \
143     src/os/unix/ngx_readv_chain.c
144 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
145     -o objs/src/os/unix/ngx_udp_recv.o \
146     src/os/unix/ngx_udp_recv.c
147 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
148     -o objs/src/os/unix/ngx_send.o \
149     src/os/unix/ngx_send.c
150 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
151     -o objs/src/os/unix/ngx_writev_chain.o \
152     src/os/unix/ngx_writev_chain.c
153 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
154     -o objs/src/os/unix/ngx_udp_send.o \
155     src/os/unix/ngx_udp_send.c
156 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
157     -o objs/src/os/unix/ngx_channel.o \
158     src/os/unix/ngx_channel.c
159 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
160     -o objs/src/os/unix/ngx_shmem.o \
161     src/os/unix/ngx_shmem.c
162 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
163     -o objs/src/os/unix/ngx_process.o \
164     src/os/unix/ngx_process.c
165 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
166     -o objs/src/os/unix/ngx_daemon.o \
167     src/os/unix/ngx_daemon.c
168 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
169     -o objs/src/os/unix/ngx_setaffinity.o \
170     src/os/unix/ngx_setaffinity.c
171 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
172     -o objs/src/os/unix/ngx_setproctitle.o \
173     src/os/unix/ngx_setproctitle.c
174 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
175     -o objs/src/os/unix/ngx_posix_init.o \
176     src/os/unix/ngx_posix_init.c
177 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
178     -o objs/src/os/unix/ngx_user.o \
179     src/os/unix/ngx_user.c
180 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
181     -o objs/src/os/unix/ngx_dlopen.o \
182     src/os/unix/ngx_dlopen.c
183 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
184     -o objs/src/os/unix/ngx_process_cycle.o \
185     src/os/unix/ngx_process_cycle.c
186 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
187     -o objs/src/os/unix/ngx_linux_init.o \
188     src/os/unix/ngx_linux_init.c
189 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
190     -o objs/src/event/modules/ngx_epoll_module.o \
191     src/event/modules/ngx_epoll_module.c
192 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
193     -o objs/src/os/unix/ngx_linux_sendfile_chain.o \
194     src/os/unix/ngx_linux_sendfile_chain.c
195 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
196     -o objs/src/core/ngx_regex.o \
197     src/core/ngx_regex.c
198 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
199     -o objs/src/http/ngx_http.o \
200     src/http/ngx_http.c
201 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
202     -o objs/src/http/ngx_http_core_module.o \
203     src/http/ngx_http_core_module.c
204 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
205     -o objs/src/http/ngx_http_special_response.o \
206     src/http/ngx_http_special_response.c
207 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
208     -o objs/src/http/ngx_http_request.o \
209     src/http/ngx_http_request.c
210 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
211     -o objs/src/http/ngx_http_parse.o \
212     src/http/ngx_http_parse.c
213 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
214     -o objs/src/http/modules/ngx_http_log_module.o \
215     src/http/modules/ngx_http_log_module.c
216 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
217     -o objs/src/http/ngx_http_request_body.o \
218     src/http/ngx_http_request_body.c
219 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
220     -o objs/src/http/ngx_http_variables.o \
221     src/http/ngx_http_variables.c
222 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
223     -o objs/src/http/ngx_http_script.o \
224     src/http/ngx_http_script.c
225 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
226     -o objs/src/http/ngx_http_upstream.o \
227     src/http/ngx_http_upstream.c
228 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
229     -o objs/src/http/ngx_http_upstream_round_robin.o \
230     src/http/ngx_http_upstream_round_robin.c
231 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
232     -o objs/src/http/ngx_http_file_cache.o \
233     src/http/ngx_http_file_cache.c
234 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
235     -o objs/src/http/ngx_http_write_filter_module.o \
236     src/http/ngx_http_write_filter_module.c
237 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
238     -o objs/src/http/ngx_http_header_filter_module.o \
239     src/http/ngx_http_header_filter_module.c
240 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
241     -o objs/src/http/modules/ngx_http_chunked_filter_module.o \
242     src/http/modules/ngx_http_chunked_filter_module.c
243 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
244     -o objs/src/http/modules/ngx_http_range_filter_module.o \
245     src/http/modules/ngx_http_range_filter_module.c
246 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
247     -o objs/src/http/modules/ngx_http_gzip_filter_module.o \
248     src/http/modules/ngx_http_gzip_filter_module.c
249 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
250     -o objs/src/http/ngx_http_postpone_filter_module.o \
251     src/http/ngx_http_postpone_filter_module.c
252 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
253     -o objs/src/http/modules/ngx_http_ssi_filter_module.o \
254     src/http/modules/ngx_http_ssi_filter_module.c
255 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
256     -o objs/src/http/modules/ngx_http_charset_filter_module.o \
257     src/http/modules/ngx_http_charset_filter_module.c
258 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
259     -o objs/src/http/modules/ngx_http_userid_filter_module.o \
260     src/http/modules/ngx_http_userid_filter_module.c
261 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
262     -o objs/src/http/modules/ngx_http_headers_filter_module.o \
263     src/http/modules/ngx_http_headers_filter_module.c
264 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
265     -o objs/src/http/ngx_http_copy_filter_module.o \
266     src/http/ngx_http_copy_filter_module.c
267 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
268     -o objs/src/http/modules/ngx_http_not_modified_filter_module.o \
269     src/http/modules/ngx_http_not_modified_filter_module.c
270 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
271     -o objs/src/http/modules/ngx_http_static_module.o \
272     src/http/modules/ngx_http_static_module.c
273 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
274     -o objs/src/http/modules/ngx_http_autoindex_module.o \
275     src/http/modules/ngx_http_autoindex_module.c
276 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
277     -o objs/src/http/modules/ngx_http_index_module.o \
278     src/http/modules/ngx_http_index_module.c
279 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
280     -o objs/src/http/modules/ngx_http_auth_basic_module.o \
281     src/http/modules/ngx_http_auth_basic_module.c
282 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
283     -o objs/src/http/modules/ngx_http_access_module.o \
284     src/http/modules/ngx_http_access_module.c
285 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
286     -o objs/src/http/modules/ngx_http_limit_conn_module.o \
287     src/http/modules/ngx_http_limit_conn_module.c
288 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
289     -o objs/src/http/modules/ngx_http_limit_req_module.o \
290     src/http/modules/ngx_http_limit_req_module.c
291 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
292     -o objs/src/http/modules/ngx_http_geo_module.o \
293     src/http/modules/ngx_http_geo_module.c
294 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
295     -o objs/src/http/modules/ngx_http_map_module.o \
296     src/http/modules/ngx_http_map_module.c
297 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
298     -o objs/src/http/modules/ngx_http_split_clients_module.o \
299     src/http/modules/ngx_http_split_clients_module.c
300 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
301     -o objs/src/http/modules/ngx_http_referer_module.o \
302     src/http/modules/ngx_http_referer_module.c
303 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
304     -o objs/src/http/modules/ngx_http_rewrite_module.o \
305     src/http/modules/ngx_http_rewrite_module.c
306 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
307     -o objs/src/http/modules/ngx_http_proxy_module.o \
308     src/http/modules/ngx_http_proxy_module.c
309 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
310     -o objs/src/http/modules/ngx_http_fastcgi_module.o \
311     src/http/modules/ngx_http_fastcgi_module.c
312 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
313     -o objs/src/http/modules/ngx_http_uwsgi_module.o \
314     src/http/modules/ngx_http_uwsgi_module.c
315 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
316     -o objs/src/http/modules/ngx_http_scgi_module.o \
317     src/http/modules/ngx_http_scgi_module.c
318 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
319     -o objs/src/http/modules/ngx_http_memcached_module.o \
320     src/http/modules/ngx_http_memcached_module.c
321 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
322     -o objs/src/http/modules/ngx_http_empty_gif_module.o \
323     src/http/modules/ngx_http_empty_gif_module.c
324 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
325     -o objs/src/http/modules/ngx_http_browser_module.o \
326     src/http/modules/ngx_http_browser_module.c
327 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
328     -o objs/src/http/modules/ngx_http_upstream_hash_module.o \
329     src/http/modules/ngx_http_upstream_hash_module.c
330 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
331     -o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
332     src/http/modules/ngx_http_upstream_ip_hash_module.c
333 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
334     -o objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
335     src/http/modules/ngx_http_upstream_least_conn_module.c
336 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
337     -o objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
338     src/http/modules/ngx_http_upstream_keepalive_module.c
339 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
340     -o objs/src/http/modules/ngx_http_upstream_zone_module.o \
341     src/http/modules/ngx_http_upstream_zone_module.c
342 cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
343     -o objs/ngx_modules.o \
344     objs/ngx_modules.c
345 cc -o objs/nginx \
346 objs/src/core/nginx.o \
347 objs/src/core/ngx_log.o \
348 objs/src/core/ngx_palloc.o \
349 objs/src/core/ngx_array.o \
350 objs/src/core/ngx_list.o \
351 objs/src/core/ngx_hash.o \
352 objs/src/core/ngx_buf.o \
353 objs/src/core/ngx_queue.o \
354 objs/src/core/ngx_output_chain.o \
355 objs/src/core/ngx_string.o \
356 objs/src/core/ngx_parse.o \
357 objs/src/core/ngx_parse_time.o \
358 objs/src/core/ngx_inet.o \
359 objs/src/core/ngx_file.o \
360 objs/src/core/ngx_crc32.o \
361 objs/src/core/ngx_murmurhash.o \
362 objs/src/core/ngx_md5.o \
363 objs/src/core/ngx_rbtree.o \
364 objs/src/core/ngx_radix_tree.o \
365 objs/src/core/ngx_slab.o \
366 objs/src/core/ngx_times.o \
367 objs/src/core/ngx_shmtx.o \
368 objs/src/core/ngx_connection.o \
369 objs/src/core/ngx_cycle.o \
370 objs/src/core/ngx_spinlock.o \
371 objs/src/core/ngx_rwlock.o \
372 objs/src/core/ngx_cpuinfo.o \
373 objs/src/core/ngx_conf_file.o \
374 objs/src/core/ngx_module.o \
375 objs/src/core/ngx_resolver.o \
376 objs/src/core/ngx_open_file_cache.o \
377 objs/src/core/ngx_crypt.o \
378 objs/src/core/ngx_proxy_protocol.o \
379 objs/src/core/ngx_syslog.o \
380 objs/src/event/ngx_event.o \
381 objs/src/event/ngx_event_timer.o \
382 objs/src/event/ngx_event_posted.o \
383 objs/src/event/ngx_event_accept.o \
384 objs/src/event/ngx_event_connect.o \
385 objs/src/event/ngx_event_pipe.o \
386 objs/src/os/unix/ngx_time.o \
387 objs/src/os/unix/ngx_errno.o \
388 objs/src/os/unix/ngx_alloc.o \
389 objs/src/os/unix/ngx_files.o \
390 objs/src/os/unix/ngx_socket.o \
391 objs/src/os/unix/ngx_recv.o \
392 objs/src/os/unix/ngx_readv_chain.o \
393 objs/src/os/unix/ngx_udp_recv.o \
394 objs/src/os/unix/ngx_send.o \
395 objs/src/os/unix/ngx_writev_chain.o \
396 objs/src/os/unix/ngx_udp_send.o \
397 objs/src/os/unix/ngx_channel.o \
398 objs/src/os/unix/ngx_shmem.o \
399 objs/src/os/unix/ngx_process.o \
400 objs/src/os/unix/ngx_daemon.o \
401 objs/src/os/unix/ngx_setaffinity.o \
402 objs/src/os/unix/ngx_setproctitle.o \
403 objs/src/os/unix/ngx_posix_init.o \
404 objs/src/os/unix/ngx_user.o \
405 objs/src/os/unix/ngx_dlopen.o \
406 objs/src/os/unix/ngx_process_cycle.o \
407 objs/src/os/unix/ngx_linux_init.o \
408 objs/src/event/modules/ngx_epoll_module.o \
409 objs/src/os/unix/ngx_linux_sendfile_chain.o \
410 objs/src/core/ngx_regex.o \
411 objs/src/http/ngx_http.o \
412 objs/src/http/ngx_http_core_module.o \
413 objs/src/http/ngx_http_special_response.o \
414 objs/src/http/ngx_http_request.o \
415 objs/src/http/ngx_http_parse.o \
416 objs/src/http/modules/ngx_http_log_module.o \
417 objs/src/http/ngx_http_request_body.o \
418 objs/src/http/ngx_http_variables.o \
419 objs/src/http/ngx_http_script.o \
420 objs/src/http/ngx_http_upstream.o \
421 objs/src/http/ngx_http_upstream_round_robin.o \
422 objs/src/http/ngx_http_file_cache.o \
423 objs/src/http/ngx_http_write_filter_module.o \
424 objs/src/http/ngx_http_header_filter_module.o \
425 objs/src/http/modules/ngx_http_chunked_filter_module.o \
426 objs/src/http/modules/ngx_http_range_filter_module.o \
427 objs/src/http/modules/ngx_http_gzip_filter_module.o \
428 objs/src/http/ngx_http_postpone_filter_module.o \
429 objs/src/http/modules/ngx_http_ssi_filter_module.o \
430 objs/src/http/modules/ngx_http_charset_filter_module.o \
431 objs/src/http/modules/ngx_http_userid_filter_module.o \
432 objs/src/http/modules/ngx_http_headers_filter_module.o \
433 objs/src/http/ngx_http_copy_filter_module.o \
434 objs/src/http/modules/ngx_http_not_modified_filter_module.o \
435 objs/src/http/modules/ngx_http_static_module.o \
436 objs/src/http/modules/ngx_http_autoindex_module.o \
437 objs/src/http/modules/ngx_http_index_module.o \
438 objs/src/http/modules/ngx_http_auth_basic_module.o \
439 objs/src/http/modules/ngx_http_access_module.o \
440 objs/src/http/modules/ngx_http_limit_conn_module.o \
441 objs/src/http/modules/ngx_http_limit_req_module.o \
442 objs/src/http/modules/ngx_http_geo_module.o \
443 objs/src/http/modules/ngx_http_map_module.o \
444 objs/src/http/modules/ngx_http_split_clients_module.o \
445 objs/src/http/modules/ngx_http_referer_module.o \
446 objs/src/http/modules/ngx_http_rewrite_module.o \
447 objs/src/http/modules/ngx_http_proxy_module.o \
448 objs/src/http/modules/ngx_http_fastcgi_module.o \
449 objs/src/http/modules/ngx_http_uwsgi_module.o \
450 objs/src/http/modules/ngx_http_scgi_module.o \
451 objs/src/http/modules/ngx_http_memcached_module.o \
452 objs/src/http/modules/ngx_http_empty_gif_module.o \
453 objs/src/http/modules/ngx_http_browser_module.o \
454 objs/src/http/modules/ngx_http_upstream_hash_module.o \
455 objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
456 objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
457 objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
458 objs/src/http/modules/ngx_http_upstream_zone_module.o \
459 objs/ngx_modules.o \
460 -ldl -lpthread -lcrypt -lpcre -lcrypto -lcrypto -lz \
461 -Wl,-E
462 sed -e "s|%%PREFIX%%|/usr/local/nginx|" \
463     -e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \
464     -e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \
465     -e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \
466     < man/nginx.8 > objs/nginx.8
467 make[1]: Leaving directory `/root/nginx-1.10.2'
468 [root@localhost nginx-1.10.2]# make install
469 make -f objs/Makefile install
470 make[1]: Entering directory `/root/nginx-1.10.2'
471 test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx'
472 test -d '/usr/local/nginx/sbin' \
473     || mkdir -p '/usr/local/nginx/sbin'
474 test ! -f '/usr/local/nginx/sbin/nginx' \
475     || mv '/usr/local/nginx/sbin/nginx' \
476         '/usr/local/nginx/sbin/nginx.old'
477 cp objs/nginx '/usr/local/nginx/sbin/nginx'
478 test -d '/usr/local/nginx/conf' \
479     || mkdir -p '/usr/local/nginx/conf'
480 cp conf/koi-win '/usr/local/nginx/conf'
481 cp conf/koi-utf '/usr/local/nginx/conf'
482 cp conf/win-utf '/usr/local/nginx/conf'
483 test -f '/usr/local/nginx/conf/mime.types' \
484     || cp conf/mime.types '/usr/local/nginx/conf'
485 cp conf/mime.types '/usr/local/nginx/conf/mime.types.default'
486 test -f '/usr/local/nginx/conf/fastcgi_params' \
487     || cp conf/fastcgi_params '/usr/local/nginx/conf'
488 cp conf/fastcgi_params \
489     '/usr/local/nginx/conf/fastcgi_params.default'
490 test -f '/usr/local/nginx/conf/fastcgi.conf' \
491     || cp conf/fastcgi.conf '/usr/local/nginx/conf'
492 cp conf/fastcgi.conf '/usr/local/nginx/conf/fastcgi.conf.default'
493 test -f '/usr/local/nginx/conf/uwsgi_params' \
494     || cp conf/uwsgi_params '/usr/local/nginx/conf'
495 cp conf/uwsgi_params \
496     '/usr/local/nginx/conf/uwsgi_params.default'
497 test -f '/usr/local/nginx/conf/scgi_params' \
498     || cp conf/scgi_params '/usr/local/nginx/conf'
499 cp conf/scgi_params \
500     '/usr/local/nginx/conf/scgi_params.default'
501 test -f '/usr/local/nginx/conf/nginx.conf' \
502     || cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf'
503 cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf.default'
504 test -d '/usr/local/nginx/logs' \
505     || mkdir -p '/usr/local/nginx/logs'
506 test -d '/usr/local/nginx/logs' \
507     || mkdir -p '/usr/local/nginx/logs'
508 test -d '/usr/local/nginx/html' \
509     || cp -R html '/usr/local/nginx'
510 test -d '/usr/local/nginx/logs' \
511     || mkdir -p '/usr/local/nginx/logs'
512 make[1]: Leaving directory `/root/nginx-1.10.2'
View Code

安装make install  (make install是把这些编译出来的可执行文件和库文件复制到合适的地方)

# make install

修改配置

# 进入配置修改

[root@localhost conf]# vim /usr/local/nginx/conf/nginx.conf

# 重点修改以下内容

#gzip on;
upstream cluster{
server 127.0.0.1:3333;
server 127.0.0.1:4444;
server 127.0.0.1:5555;
}
server {
# listen 80;
listen 1111;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
#root html;
#index index.html index.htm;
# 2020-07-05 zp
proxy_pass http://cluster;
}

启动

参数 -c 指定了配置文件的路径,如果不加的话就是使用默认的配置文件
[root@localhost nginx-1.10.2]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

 

停止

停止操作是通过向nginx进程发送信号(什么是信号请参阅linux文 章)来进行的

查询nginx主进程号

ps -ef | grep nginx

在进程列表里 面找master进程,它的编号就是主进程号了。

发送信号

从容停止Nginx

kill -QUIT 主进程号

快速停止Nginx

kill -TERM 主进程号

强制停止Nginx

pkill -9 nginx
另外, 若在nginx.conf配置了pid文件存放路径则该文件存放的就是Nginx主进程号,如果没指定则放在nginx的logs目录下。有了pid文 件,我们就不用先查询Nginx的主进程号,而直接向Nginx发送信号了,命令如下:
kill -信号类型 '/usr/nginx/logs/nginx.pid'

平滑重启

如果更改了配置就要重启Nginx,要先关闭Nginx再打开?不是的,可以向Nginx 发送信号,平滑重启。
平滑重启命令:
kill -HUP 主进程号或进程号文件路径

或者使用

/usr/nginx/sbin/nginx -s reload

注意,修改了配置文件后最好先检查一下修改过的配置文件是否正 确,以免重启后Nginx出现错误影响服务器稳定运行。

判断Nginx配置是否正确命令

nginx -t -c /usr/nginx/conf/nginx.conf

或者

/usr/nginx/sbin/nginx -t

3.JDK安装及配置

(1)下载linux版本的SDK jdk-8u251-linux-x64.tar.gz

(2)解压SDK

jdk-8u251-linux-x64.tar.gz

(3)移动解压的文件

mv jdk1.8.0_251/ /usr/local/javajdk

(4)编辑配置

vim /etc/profile


文件结尾---javajdk是我的安装目录
#Java Env
export JAVA_HOME=/usr/local/javajdk
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
export PATH=$PATH:$JAVA_HOME/bin

# 保存退出

(5)让配置文件立即生效

source /etc/profile

(6)输入java 和java   -version能输出信息,就已经成功了

[root@localhost ~]# java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

4.Nacos安装及配置

(1)下载Nacos ,我安装的是1.2.0,目前最新版本是1.3.0。下载地址:https://github.com/alibaba/nacos/tags

(2)拷贝至Linux并解压

tar -zxvf nacos-server-1.2.0.tar.gz

(3)修改application.properties及cluster.conf,修改前记得备份。

# 进入解压目录
cd nacos

# 查看所有文件
[root@localhost nacos]# ls
bin  conf  data  LICENSE  logs  NOTICE  status  target

#进入conf 并编辑application.properties
vim conf/application.properties

# 按照官方文档提示,在结尾处添加
db.num=1
db.url.0=jdbc:mysql://127.0.0.1:3306/nacos_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
db.user=root
db.password=root

# 新建cluster.conf,因为官方为我们提供了cluster.conf.example
cp cluster.conf.example cluster.conf

# 编辑cluster.conf
vim cluster.conf

#根据需求填写配置
#it is ip
#example
#10.10.109.214
#11.16.128.34
#11.16.128.36
192.168.100.148:3333
192.168.100.148:4444
192.168.100.148:5555

(4)修改startup.sh

第一处修改(如果没有更改过配置,应该在第57行):

# 此处增加了p:  以及 p)等等。
while getopts ":m:f:s:p:" opt
do
    case $opt in
        m)
            MODE=$OPTARG;;
        f)
            FUNCTION_MODE=$OPTARG;;
        s)
            SERVER=$OPTARG;;
        p)
            PORT=$OPTARG;;
        ?)
        echo "Unknown parameter"
        exit 1;;
    esac
done

第二处修改(倒数第二行):

# 增加了 -Dserver.port=${PORT}
nohup $JAVA -Dserver.port=${PORT} ${JAVA_OPT} nacos.nacos >> ${BASE_DIR}/logs/start.out 2>&1 &

第三处修改:修改JVM(87行,可选配置,因为我配置完前两项保存后,启动程序,一直报内存溢出。所以进行修改)

原配置如下

    JAVA_OPT="${JAVA_OPT} -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m

-Xms -Xmx -Xmn 这里默认给了2g、2g、1g,我修改了如下配置:

     JAVA_OPT="${JAVA_OPT} -server -Xms512m -Xmx512m -Xmn256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"

(5)保存退出,并启动实例(前提是mysql相关配置都已经完成,如未完成移步MYSQL安装)

[root@localhost bin]# bash startup.sh -p 3333

[root@localhost bin]# bash startup.sh -p 4444

[root@localhost bin]# bash startup.sh -p 5555

# 这里需要注意的是,在控制台输出成功不可信,一定要去logs下看下是否成功
[root@localhost bin]# vim ../logs/start.out
 ,--. ,--.'| 
   ,--,:  : |                                           Nacos 1.2.0 ,`--.'`|  ' :                       ,---. Running in cluster mode, All function modules |   :  :  | |                      '   ,'\   .--.--.    Port: 5555 : |   \ | :  ,--.--.     ,---.  /   /   | /  /    '   Pid: 2420
|   : '  '; | /       \   /     \.   ; ,. :|  :  /`./   Console: http://192.168.100.148:5555/nacos/index.html
'   ' ;.    ;.--.  .-. | /    / ''   | |: :| : ;_ |   | | \   | \__\/: . ..    ' / '   | .; : \  \    `.      https://nacos.io
'   : |  ; .' ," .--.; |'   ; :__|   :    |  `----.   \
|   | '`--'  /  /  ,.  |'   | '.'|\   \  /  /  /`--'  /
'   : |     ;  :   .'   \   :    : `----'  '--'.     /
;   |.'     |  ,     .-./\   \  /            `--'---' '---'        `--`---'     `----'
    
2020-07-05 21:26:49,857 INFO Nacos is starting... "../logs/start.out" [readonly] 249L, 7887C                       

(6)访问对应路径,在此之前一定要关闭防火墙

http://192.168.100.148:3333/nacos

http://192.168.100.148:4444/nacos

http://192.168.100.148:5555/nacos

(7)启动nginx(这里就是我们之前配置的nginx)

# 按照指定配置启动nginx 
[root@localhost nginx-1.10.2]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

启动成功后,访问http://192.168.100.148:1111/nacos,可以正常访问nacos页面即为正常。

5.Maven安装及配置

暂时到这里还没用上maven,所以还没有进行配置,如需配置,暂时参考下面配置,后续如果我配置了再补充。

https://www.cnblogs.com/kuoAT/p/7560267.html

 

6.MySQL安装

因为我的mysql是用docker安装的,所以没有详细说,我就把docker安装的步骤贴一下

# 安装镜像
[root@192 ~]# docker pull mysql:5.7.29
# 运行
[root@192 ~]# docker run -p 3306:3306 --name mysql01 -e MYSQL_ROOT_PASSWORD=root -d 

创建nacos_config数据库,并执行官方提供的数据库代码,在nacos/conf/nacos-mysql.sql

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info   */
/******************************************/
CREATE TABLE `config_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) DEFAULT NULL,
  `content` longtext NOT NULL COMMENT 'content',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(20) DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) DEFAULT NULL,
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) DEFAULT NULL,
  `c_use` varchar(64) DEFAULT NULL,
  `effect` varchar(64) DEFAULT NULL,
  `type` varchar(64) DEFAULT NULL,
  `c_schema` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info_aggr   */
/******************************************/
CREATE TABLE `config_info_aggr` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) NOT NULL COMMENT 'group_id',
  `datum_id` varchar(255) NOT NULL COMMENT 'datum_id',
  `content` longtext NOT NULL COMMENT '内容',
  `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  `app_name` varchar(128) DEFAULT NULL,
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';


/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info_beta   */
/******************************************/
CREATE TABLE `config_info_beta` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL COMMENT 'content',
  `beta_ips` varchar(1024) DEFAULT NULL COMMENT 'betaIps',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(20) DEFAULT NULL COMMENT 'source ip',
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info_tag   */
/******************************************/
CREATE TABLE `config_info_tag` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
  `tag_id` varchar(128) NOT NULL COMMENT 'tag_id',
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL COMMENT 'content',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(20) DEFAULT NULL COMMENT 'source ip',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_tags_relation   */
/******************************************/
CREATE TABLE `config_tags_relation` (
  `id` bigint(20) NOT NULL COMMENT 'id',
  `tag_name` varchar(128) NOT NULL COMMENT 'tag_name',
  `tag_type` varchar(64) DEFAULT NULL COMMENT 'tag_type',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
  `nid` bigint(20) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nid`),
  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = group_capacity   */
/******************************************/
CREATE TABLE `group_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `group_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = his_config_info   */
/******************************************/
CREATE TABLE `his_config_info` (
  `id` bigint(64) unsigned NOT NULL,
  `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) NOT NULL,
  `group_id` varchar(128) NOT NULL,
  `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
  `content` longtext NOT NULL,
  `md5` varchar(32) DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `src_user` text,
  `src_ip` varchar(20) DEFAULT NULL,
  `op_type` char(10) DEFAULT NULL,
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`nid`),
  KEY `idx_gmt_create` (`gmt_create`),
  KEY `idx_gmt_modified` (`gmt_modified`),
  KEY `idx_did` (`data_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';


/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = tenant_capacity   */
/******************************************/
CREATE TABLE `tenant_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `tenant_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';


CREATE TABLE `tenant_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `kp` varchar(128) NOT NULL COMMENT 'kp',
  `tenant_id` varchar(128) default '' COMMENT 'tenant_id',
  `tenant_name` varchar(128) default '' COMMENT 'tenant_name',
  `tenant_desc` varchar(256) DEFAULT NULL COMMENT 'tenant_desc',
  `create_source` varchar(32) DEFAULT NULL COMMENT 'create_source',
  `gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
  `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';

CREATE TABLE `users` (
    `username` varchar(50) NOT NULL PRIMARY KEY,
    `password` varchar(500) NOT NULL,
    `enabled` boolean NOT NULL
);

CREATE TABLE `roles` (
    `username` varchar(50) NOT NULL,
    `role` varchar(50) NOT NULL,
    UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE
);

CREATE TABLE `permissions` (
    `role` varchar(50) NOT NULL,
    `resource` varchar(512) NOT NULL,
    `action` varchar(8) NOT NULL,
    UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
);

INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);

INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');
View Code

如果执行失败,则去修改mysql相关配置

root@409e4ca6760c:/etc/mysql# vim /etc/mysql/mysql.conf.d/mysqld.cnf

增加了sql_mode。。。

重启Mysql即可。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM