经测试,6.5-7.2的
系统
,安装nginx1.8.1时均会出错,有时能成功装上,不知何故?
安装
脚本为
阿里云
一键sh1.5:
tar zxvf nginx-1.8.1.tar.gz
cd nginx-1.8.1
./configure --user=www \
--group=www \
--prefix=/alidata/server/nginx \
--with-http_stub_status_module \
--without-http-cache \
--with-http_ssl_module \
--with-http_gzip_static_module
CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l)
if [ $CPU_NUM -gt 1 ];then
make -j$CPU_NUM
else
make
fi
make install
chmod 775 /alidata/server/nginx/logs
chown -R www:www /alidata/server/nginx/logs
chmod -R 775 /alidata/www
chown -R www:www /alidata/www
cd ..
cp -fR ./nginx/config-nginx/* /alidata/server/nginx/conf/
sed -i 's/worker_processes 2/worker_processes '"$CPU_NUM"'/' /alidata/server/nginx/conf/nginx.conf
chmod 755 /alidata/server/nginx/sbin/nginx
#/alidata/server/nginx/sbin/nginx
mv /alidata/server/nginx/conf/nginx /etc/init.d/
chmod +x /etc/init.d/nginx
/etc/init.d/nginx start
出错在make语句,如图:
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_gzip_static_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_ssl_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_hash_module.o \
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/src/http/modules/ngx_http_stub_status_module.o \
objs/ngx_modules.o \
-lpthread -lcrypt -lpcre -lssl -lcrypto -ldl -lz
make[1]: Leaving directory `/home/sh/nginx-1.8.1'
make -f objs/Makefile manpage
make[1]: Entering directory `/home/sh/nginx-1.8.1'
sed -e "s|%%PREFIX%%|/alidata/server/nginx|" \
-e "s|%%PID_PATH%%|/alidata/server/nginx/logs/nginx.pid|" \
-e "s|%%CONF_PATH%%|/alidata/server/nginx/conf/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|/alidata/server/nginx/logs/error.log|" \
< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory `/home/sh/nginx-1.8.1'
make -f objs/Makefile install
make[1]: Entering directory `/home/sh/nginx-1.8.1'
test -d '/alidata/server/nginx' || mkdir -p '/alidata/server/nginx'
test -d '/alidata/server/nginx/sbin' || mkdir -p '/alidata/server/nginx/sbin'
test ! -f '/alidata/server/nginx/sbin/nginx' || mv '/alidata/server/nginx/sbin/nginx' '/alidata/server/nginx/sbin/nginx.old'
cp objs/nginx '/alidata/server/nginx/sbin/nginx'
test -d '/alidata/server/nginx/conf' || mkdir -p '/alidata/server/nginx/conf'
cp conf/koi-win '/alidata/server/nginx/conf'
cp conf/koi-utf '/alidata/server/nginx/conf'
cp conf/win-utf '/alidata/server/nginx/conf'
test -f '/alidata/server/nginx/conf/mime.types' || cp conf/mime.types '/alidata/server/nginx/conf'
cp conf/mime.types '/alidata/server/nginx/conf/mime.types.default'
test -f '/alidata/server/nginx/conf/fastcgi_params' || cp conf/fastcgi_params '/alidata/server/nginx/conf'
cp conf/fastcgi_params '/alidata/server/nginx/conf/fastcgi_params.default'
test -f '/alidata/server/nginx/conf/fastcgi.conf' || cp conf/fastcgi.conf '/alidata/server/nginx/conf'
cp conf/fastcgi.conf '/alidata/server/nginx/conf/fastcgi.conf.default'
test -f '/alidata/server/nginx/conf/uwsgi_params' || cp conf/uwsgi_params '/alidata/server/nginx/conf'
cp conf/uwsgi_params '/alidata/server/nginx/conf/uwsgi_params.default'
test -f '/alidata/server/nginx/conf/scgi_params' || cp conf/scgi_params '/alidata/server/nginx/conf'
cp conf/scgi_params '/alidata/server/nginx/conf/scgi_params.default'
test -f '/alidata/server/nginx/conf/nginx.conf' || cp conf/nginx.conf '/alidata/server/nginx/conf/nginx.conf'
cp conf/nginx.conf '/alidata/server/nginx/conf/nginx.conf.default'
test -d '/alidata/server/nginx/logs' || mkdir -p '/alidata/server/nginx/logs'
test -d '/alidata/server/nginx/logs' || mkdir -p '/alidata/server/nginx/logs'
test -d '/alidata/server/nginx/html' || cp -R html '/alidata/server/nginx'
test -d '/alidata/server/nginx/logs' || mkdir -p '/alidata/server/nginx/logs'
make[1]: Leaving directory `/home/sh/nginx-1.8.1'
cp: cannot stat ‘./nginx/config-nginx/*’: No such file or directory
mv: cannot stat ‘/alidata/server/nginx/conf/nginx’: No such file or directory
chmod: cannot access ‘/etc/init.d/nginx’: No such file or directory
./install_nginx+php-1.8.1.sh: line 30: /etc/init.d/nginx: No such file or directory
-------------------------
cp -fR ./nginx/config-nginx/* /alidata/server/nginx/conf/
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。