linux - 오프라인 설치 nginx
1、 Nginx
1.1 openssl
#
md5-x86_64.s: Assembler messages:
md5-x86_64.s:41: Error: 0xd76aa478 out range of signed 32bit displacement
md5-x86_64.s:50: Error: 0xe8c7b756 out range of signed 32bit displacement
md5-x86_64.s:68: Error: 0xc1bdceee out range of signed 32bit displacement
md5-x86_64.s:77: Error: 0xf57c0faf out range of signed 32bit displacement
md5-x86_64.s:95: Error: 0xa8304613 out range of signed 32bit displacement
md5-x86_64.s:104: Error: 0xfd469501 out range of signed 32bit displacement
md5-x86_64.s:122: Error: 0x8b44f7af out range of signed 32bit displacement
md5-x86_64.s:131: Error: 0xffff5bb1 out range of signed 32bit displacement
md5-x86_64.s:140: Error: 0x895cd7be out range of signed 32bit displacement
md5-x86_64.s:158: Error: 0xfd987193 out range of signed 32bit displacement
md5-x86_64.s:167: Error: 0xa679438e out range of signed 32bit displacement
md5-x86_64.s:187: Error: 0xf61e2562 out range of signed 32bit displacement
md5-x86_64.s:196: Error: 0xc040b340 out range of signed 32bit displacement
md5-x86_64.s:214: Error: 0xe9b6c7aa out range of signed 32bit displacement
md5-x86_64.s:223: Error: 0xd62f105d out range of signed 32bit displacement
md5-x86_64.s:241: Error: 0xd8a1e681 out range of signed 32bit displacement
md5-x86_64.s:250: Error: 0xe7d3fbc8 out range of signed 32bit displacement
md5-x86_64.s:268: Error: 0xc33707d6 out range of signed 32bit displacement
md5-x86_64.s:277: Error: 0xf4d50d87 out range of signed 32bit displacement
md5-x86_64.s:295: Error: 0xa9e3e905 out range of signed 32bit displacement
md5-x86_64.s:304: Error: 0xfcefa3f8 out range of signed 32bit displacement
md5-x86_64.s:322: Error: 0x8d2a4c8a out range of signed 32bit displacement
md5-x86_64.s:332: Error: 0xfffa3942 out range of signed 32bit displacement
md5-x86_64.s:340: Error: 0x8771f681 out range of signed 32bit displacement
md5-x86_64.s:356: Error: 0xfde5380c out range of signed 32bit displacement
md5-x86_64.s:364: Error: 0xa4beea44 out range of signed 32bit displacement
md5-x86_64.s:380: Error: 0xf6bb4b60 out range of signed 32bit displacement
md5-x86_64.s:388: Error: 0xbebfbc70 out range of signed 32bit displacement
md5-x86_64.s:404: Error: 0xeaa127fa out range of signed 32bit displacement
md5-x86_64.s:412: Error: 0xd4ef3085 out range of signed 32bit displacement
md5-x86_64.s:428: Error: 0xd9d4d039 out range of signed 32bit displacement
md5-x86_64.s:436: Error: 0xe6db99e5 out range of signed 32bit displacement
md5-x86_64.s:452: Error: 0xc4ac5665 out range of signed 32bit displacement
md5-x86_64.s:463: Error: 0xf4292244 out range of signed 32bit displacement
md5-x86_64.s:481: Error: 0xab9423a7 out range of signed 32bit displacement
md5-x86_64.s:490: Error: 0xfc93a039 out range of signed 32bit displacement
md5-x86_64.s:508: Error: 0x8f0ccc92 out range of signed 32bit displacement
md5-x86_64.s:517: Error: 0xffeff47d out range of signed 32bit displacement
md5-x86_64.s:526: Error: 0x85845dd1 out range of signed 32bit displacement
md5-x86_64.s:544: Error: 0xfe2ce6e0 out range of signed 32bit displacement
md5-x86_64.s:553: Error: 0xa3014314 out range of signed 32bit displacement
md5-x86_64.s:571: Error: 0xf7537e82 out range of signed 32bit displacement
md5-x86_64.s:580: Error: 0xbd3af235 out range of signed 32bit displacement
md5-x86_64.s:598: Error: 0xeb86d391 out range of signed 32bit displacement
make[2]: *** [md5-x86_64.o] 1
make[2]: Leaving directory `/home/ncoadmin/openssl-0.9.8j/crypto/md5'
make[1]: *** [subdirs] 1
make[1]: Leaving directory `/home/ncoadmin/openssl-0.9.8j/crypto'
make: *** [build_crypto] 1
# ,openssl-1.0.1a.tar.gz
1.2 pcre
# :make[1]: *** [/usr/local/pcre//Makefile] Error 127
configure
./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre/ --with-openssl=/usr/local/openssl/ --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --http-client-body-temp-path=/var/tmp/nginx/client/ --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --user=nginx --group=nginx
make
[root@nginx nginx-1.0.5]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx/nginx-1.0.5'
cd /usr/local/pcre/ \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
/bin/sh: line 2: ./configure: No such file or directory
make[1]: *** [/usr/local/pcre//Makefile] Error 127
make[1]: Leaving directory `/root/nginx/nginx-1.0.5'
make: *** [build] Error 2
#
[root@nginx nginx-1.0.5]# ./configure --help | grep '\--with-pcre'
--with-pcre force PCRE library usage
--with-pcre=DIR set path to PCRE library sources
--with-pcre-opt=OPTIONS set additional options for PCRE building
source ????????
#
[root@nginx nginx-1.0.5]# ./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.12/ --with-openssl=/usr/local/openssl/ --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --http-client-body-temp-path=/var/tmp/nginx/client/ --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --user=nginx --group=nginx
[root@nginx nginx-1.0.5]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx/nginx-1.0.5'
cd ../pcre-8.12/ \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... make[1]: *** [../pcre-8.12//Makefile]
# ok :--with-pcre=DIR , 。
1.3 zlib
2 nginx
2.1 nginx, nginx :
# groupadd -r nginx
# useradd -r -g nginx nginx
2.2 :
# ./configure \
--prefix=/usr/local/nginx \
--error-log-path=/data/applogs/nginx/error.log \
--http-log-path=/data/applogs/nginx/access.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-client-body-temp-path=/usr/local/nginx/client/ \
--http-proxy-temp-path=/usr/local/nginx/proxy/ \
--http-fastcgi-temp-path=/usr/local/nginx/fcgi/ \
--http-uwsgi-temp-path=/usr/local/nginx/uwsgi \
--http-scgi-temp-path=/usr/local/nginx/scgi \
--with-pcre \
--with-openssl=openssl \
--withpcre=pcre \
--withzlib=zlib
# make && make install
#
# /usr/local/nginx/sbin/nginx -t
# :
# nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
# nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
# :
# 1、Nginx Tmalloc( 、 malloc ) , gperftools, nginx --with-google_perftools_module 。
# 2、 nginx perl , configure --with-http_perl_module , , , , 。 nginx cgi , FCGI , 。
2.3、 nginx SysV init :
/etc/rc.d/init.d/nginx, :
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
# pidfile: /var/run/nginx.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
nginx="/usr/local/nginx/sbin/nginx"
prog=$(basename $nginx)
NGINX_CONF_FILE="/usr/local/nginx/nginx.conf"
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
lockfile=/var/lock/subsys/nginx
make_dirs() {
# make required directories
user=`nginx -V 2>&1 | grep "configure arguments:" | sed 's/[^*]*--user=\([^ ]*\).*/\1/g' -`
options=`$nginx -V 2>&1 | grep 'configure arguments:'`
for opt in $options; do
if [ `echo $opt | grep '.*-temp-path'` ]; then
value=`echo $opt | cut -d "=" -f 2`
if [ ! -d "$value" ]; then
# echo "creating" $value
mkdir -p $value && chown -R $user $value
fi
fi
done
}
start() {
[ -x $nginx ] || exit 5
[ -f $NGINX_CONF_FILE ] || exit 6
make_dirs
echo -n $"Starting $prog: "
daemon $nginx -c $NGINX_CONF_FILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog -QUIT
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
configtest || return $?
stop
sleep 1
start
}
reload() {
configtest || return $?
echo -n $"Reloading $prog: "
killproc $nginx -HUP
RETVAL=$?
echo
}
force_reload() {
restart
}
configtest() {
$nginx -t -c $NGINX_CONF_FILE
}
rh_status() {
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart|configtest)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac
:
# chmod +x /etc/rc.d/init.d/nginx
, :
# chkconfig --add nginx
# chkconfig nginx on
:
# service nginx start
#
# /etc/init.d/functions
# https://www.linuxidc.com/Linux/2017-09/147065.htm
# https://www.cnblogs.com/image-eye/archive/2011/10/26/2220405.html
. /etc/rc.d/init.d/functions
NCNF4:~ # killproc nginx
varpid=nginx
1 pidof -c -m -o 44741 -o 44731 -o %PPID -x nginx
2 pidof -c -m -o 44741 -o 44731 -o %PPID -x nginx
pidof: invalid options on command line!
pidof: invalid options on command line!
# :pidof -c -m
# : __pids_pidof
__pids_pidof() {
# pidof -c -m -o $$ -o $PPID -o %PPID -x "$1" || \
# pidof -c -m -o $$ -o $PPID -o %PPID -x "${1##*/}"
pidof -o $$ -o $PPID -o %PPID -x "$1" || \
pidof -o $$ -o $PPID -o %PPID -x "${1##*/}"
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
간단! Certbot을 사용하여 웹 사이트를 SSL(HTTPS)화하는 방법초보자가 인프라 주위를 정돈하는 것은 매우 어렵습니다. 이번은 사이트를 간단하게 SSL화(HTTP에서 HTTPS통신)로 변경하는 방법을 소개합니다! 이번에는 소프트웨어 시스템 Nginx CentOS7 의 환경에서 S...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.