标签:state src ram 开机 fun repo 之间 sizeof 自启
[root@iZgt88z6l1kvd7Z nginx-1.10.1]# ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-pcre=../pcre-8.39 --with-zlib=../zlib-1.2.8
[root@iZgt88z6l1kvd7Z nginx-1.10.1]# make
src/core/ngx_murmurhash.c: In function ‘ngx_murmur_hash2’:
src/core/ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
h ^= data[2] << 16;
^~~~~~~~~~~~~~
src/core/ngx_murmurhash.c:38:5: note: here
case 2:
^~~~
src/core/ngx_murmurhash.c:39:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
h ^= data[1] << 8;
^~~~~~~~~~~~~
src/core/ngx_murmurhash.c:40:5: note: here
case 1:
^~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:473: objs/src/core/ngx_murmurhash.o] Error 1
make[1]: Leaving directory ‘/root/nginx-1.10.1‘
make: *** [Makefile:8: build] Error 2
-Wall 表示打开gcc的所有警告
-Werror,它要求gcc将所有的警告当成错误进行处理
src/os/unix/ngx_user.c: In function ‘ngx_libc_crypt’:
src/os/unix/ngx_user.c:36:7: error: ‘struct crypt_data’ has no member named ‘current_salt’
cd.current_salt[0] = ~salt[0];
^
make[1]: *** [objs/Makefile:774: objs/src/os/unix/ngx_user.o] Error 1
make[1]: Leaving directory ‘/root/nginx-1.10.1‘
make: *** [Makefile:8: build] Error 2
[root@iZgt88z6l1kvd7Z nginx-1.10.1]# vim src/os/unix/ngx_user.c
进去找到第36行
src/event/ngx_event_openssl.c: In function ‘ngx_ssl_dhparam’:
src/event/ngx_event_openssl.c:954:11: error: dereferencing pointer to incomplete type ‘DH’ {aka ‘struct dh_st’}
dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
^~
src/event/ngx_event_openssl.c: In function ‘ngx_ssl_connection_error’:
src/event/ngx_event_openssl.c:1941:21: error: ‘SSL_R_NO_CIPHERS_PASSED’ undeclared (first use in this function); did you mean ‘SSL_R_NO_CIPHERS_SPECIFIED’?
|| n == SSL_R_NO_CIPHERS_PASSED /* 182 */
^~~~~~~~~~~~~~~~~~~~~~~
SSL_R_NO_CIPHERS_SPECIFIED
src/event/ngx_event_openssl.c:1941:21: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [objs/Makefile:816: objs/src/event/ngx_event_openssl.o] Error 1
make[1]: Leaving directory ‘/root/nginx-1.10.1‘
make: *** [Makefile:8: build] Error 2
直接安装openssl1.0版本
wget http://www.openssl.org/source/openssl-1.1.0e.tar.gz
//下载openssl
[root@iZgt88z6l1kvd7Z ~]# tar -zxvf openssl-1.1.0e.tar.gz
//解压
[root@iZgt88z6l1kvd7Z ~]# cd openssl-1.1.0e/ &&./config shared zlib --prefix=/usr/local/openssl && make && make install
进入目录把openssl编译安装到 /usr/local/openssl 下
[root@iZgt88z6l1kvd7Z openssl-1.1.0e]# ./config -t
[root@iZgt88z6l1kvd7Z openssl-1.1.0e]# make depend
//一种度makefile的规则,通过扫描仪个目录下的所有C\C++ 代码,从而判专断出文件之间的依赖关系,如a.cc文件中调用了b.h(如以形势include<b.h>),如果之后a.cc文件被改动,那 么只需要重新编属译a.cc文件,不需要编译b.h文件。否则所有的文件都需要重新编译。
[root@localhost openssl-1.1.0e]# cd /usr/local
[root@iZgt88z6l1kvd7Z local]# ln -s openssl ssl
[root@iZgt88z6l1kvd7Z local]# echo "/usr/local/openssl/lib" >>/etc/ld.so.conf
[root@iZgt88z6l1kvd7Z local]# cd -
/root/openssl-1.1.0e
[root@iZgt88z6l1kvd7Z openssl-1.1.0e]# ldconfig
[root@iZgt88z6l1kvd7Z openssl-1.1.0e]# echo $?
0
[root@iZgt88z6l1kvd7Z openssl-1.1.0e]# echo "PATH=$PATH:/usr/local/openssl/bin" >> /etc/profile && source /etc/profile
[root@iZgt88z6l1kvd7Z nginx-1.10.1]# ./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.39 --with-zlib=../zlib-1.2.8 --with-openssl=../opensll-1.1.0e
[root@iZgt88z6l1kvd7Z nginx-1.10.1]# /usr/local/nginx/sbin/nginx
[root@iZgt88z6l1kvd7Z sbin]# echo "PATH=$PATH:/usr/local/nginx/sbin" >> /etc/profile && source /etc/profile
[root@iZgt88z6l1kvd7Z ~]# echo "/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf &" >>/etc/rc.local
(/etc/rc.local 这个文件是系统启动后会自动执行的,我们就将启动命令加入到这个文件中)
如果你发现你的进程没有成功的启动可能是因为你的这个脚本文件没有可以执行的权限 请给该文件增加 其他人可以执行的权限 chmod o+x /etc/rc.local后重启再次查看
标签:state src ram 开机 fun repo 之间 sizeof 自启
原文地址:https://www.cnblogs.com/hxlinux/p/12897869.html