./configure arguments: --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
./configure: error: invalid option "arguments:"
cd /tmp/nginxup \\进入原nginx目录
tar xvf openssl-x.x.x.tar.gz \\解包
tar xvf pcre-x.x.x.tar.gz \\解包
tar zxvf zlib-x.x.x.tar.gz \\解包
tar xvf nginx-.x.x.x.tar.gz \\解包
cd nginx-x.x.x \\进入新nginx目录
./configure --user=运行账号 --group=运行账号 --prefix=/nginx的安装路径/nginx --with-pcre=/tmp/nginxup/pcre-x.x.x --with-zlib=/tmp/nginxup/zlib-x.x.x --with-openssl=/tmp/nginxup/openssl-x.x.x --with-http_stub_status_module --with-http_ssl_module --with-rtsig_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-http_stub_status_module --without-http_upstream_ip_hash_module --with-mail --with-mail_ssl_module --with-cpu-opt=opteron \\编译nginx
make \\安装
rm -rf /nginx的安装路径/nginx/sbin/nginx.bak \\删除原nginx目录?
mv /nginx的安装路径/nginx/sbin/nginx /nginx的安装路径/nginx/sbin/nginx.bak 将原nginx目录重命名为nginx.bak?
cp objs/nginx /nginx的安装路径/nginx/sbin/ 复制编译好的objs/nginx到原目录
/nginx的安装路径/nginx/sbin/nginx -s reload 平滑重启nginx
-------------------------
用rpm -qa|grep 查询,这几个软件包都安装过了:
rpm -qa|grep openssl
openssl-1.0.1e-30.el6.11.i686
openssl-devel-1.0.1e-30.el6.11.i686
rpm -qa|grep pcre
pcre-7.8-6.el6.i686
rpm -qa|grep zlib
zlib-1.2.3-29.el6.i686
zlib-devel-1.2.3-29.el6.i686
当初安装nginx1.4.4时的脚本是:#!/bin/bash
rm -rf nginx-1.4.4
if [ ! -f nginx-1.4.4.tar.gz ];then
wget http://oss.aliyuncs.com/aliyunecs/onekey/nginx/nginx-1.4.4.tar.gz
fi
tar zxvf nginx-1.4.4.tar.gz
cd nginx-1.4.4
./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
-------------------------
我按以下命令操作,没有报错,不过目录里没有编译好的文件 ,启动不了nginx:cd /alidata/server/
tar -zcvf nginx1.4.4bak.tar.gz /alidata/server/nginx-1.4.4/*
wget http://nginx.org/download/nginx-1.8.0.tar.gz
tar -zxvf nginx-1.8.0.tar.gz
cd nginx-1.8.0
./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
/alidata/server/nginx-1.4.4/sbin/nginx -s stop
mv /alidata/server/nginx-1.4.4/sbin/nginx /alidata/server/nginx-1.4.4/sbin/nginx.old
cp objs/nginx /alidata/server/nginx-1.4.4/sbin/nginx
/alidata/server/nginx-1.4.4/sbin/nginx -s start
-------------------------
cd /tmp/nginxup
tar xvf openssl-x.x.x.tar.gz
tar xvf pcre-x.x.x.tar.gz
tar zxvf zlib-x.x.x.tar.gz
tar xvf nginx-.x.x.x.tar.gz
cd nginx-x.x.x
./configure --user=运行账号 --group=运行账号 --prefix=/nginx的安装路径/nginx --with-pcre=/tmp/nginxup/pcre-x.x.x --with-zlib=/tmp/nginxup/zlib-x.x.x --with-openssl=/tmp/nginxup/openssl-x.x.x --with-http_stub_status_module --with-http_ssl_module --with-rtsig_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-http_stub_status_module --without-http_upstream_ip_hash_module --with-mail --with-mail_ssl_module --with-cpu-opt=opteron
make
rm -rf /nginx的安装路径/nginx/sbin/nginx.bak
mv /nginx的安装路径/nginx/sbin/nginx /nginx的安装路径/nginx/sbin/nginx.bak
cp objs/nginx /nginx的安装路径/nginx/sbin/
/nginx的安装路径/nginx/sbin/nginx -s reload
-------------------------
看了你的命令,你没有make 怎么可能编译成功
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。