我是一个从源代码设置NGINX的新手,我尝试的每个.sh配置都有某种类型的错误 - 我已经在这几天了! - 大声笑
我需要使用pageSpeed,OppenSSL,SPDY和Naxsi mods进行设置,以便在网站上驱动相同数量的静态和动态php文件。
以下是我最近的尝试,但我得到了“ .configure command not found ”:P
如果有人可以通过它(我也不确定依赖关系)并看看我有什么问题?此外,任何建议也将不胜感激。日Thnx!
# Since I am not going to be using a distribution to install Nginx,
# I need to ensure all the necessary dependencies are installed for it
# as well as for PageSpeed and SPDY:
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev libbz2-dev libssl-dev tar unzip openssl
# create a directory root directory called src to download all the filles to,
# including Nginx:
sudo mkdir src
cd src
# NGINX
wget http://nginx.org/download/nginx-1.7.4.tar.gz
tar -xvzf nginx-1.7.4.tar.gz
# Google PageSpeed:
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-1.8.31.4-beta.zip
unzip release-1.8.31.4-beta.zip
cd ngx_pagespeed-release-1.8.31.4-beta/
wget https://dl.google.com/dl/page-speed/psol/1.8.31.4.tar.gz
sudo tar -xzvf 1.8.31.4.tar.gz
# Switch back to src directory
cd
cd src
# HTTP Substitutions Module:
wget https://github.com/arut/nginx-dav-ext-module/archive/master.zip
unzip master.zip
# Now let’s grab the Headers More Mod:
wget https://github.com/agentzh/headers-more-nginx-module/archive/v0.25.tar.gz
tar -xvzf v0.25.tar.gz
# and the naxsi module:
wget https://github.com/nbs-system/naxsi/archive/0.53-2.tar.gz
tar -xvzf 0.53-2.tar.gz
# cd to the uncompresses Nginx directory
cd
cd nginx-1.7.4
# Run a .configure command:
.configure \
--add-module=/src/naxsi-0.53-2 \
--prefix=/usr/share/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--user=www-data \
--group=www-data \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--http-log-path=/var/log/nginx/access.log \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-scgi-temp-path=/var/lib/nginx/scgi \
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
--lock-path=/var/lock/nginx.lock \
--pid-path=/run/nginx.pid \
--with-pcre-jit \
--with-debug \
--with-http_addition_module \
--with-http_dav_module \
--with-http_geoip_module \
--with-http_gzip_static_module \
--with-http_image_filter_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_sub_module \
--with-http_xslt_module \
--with-ipv6 \
--with-http_spdy_module \
--add-module=/src/nginx-dav-ext-module-master \
--add-module=/src/ngx_http_substitutions_filter_module \
--add-module=/src/ngx_pagespeed-release-1.8.31.4-beta \
--add-module=/src/headers-more-nginx-module-0.25
# Now create the Makefile:
make
答案 0 :(得分:1)
你确定这不是拼写错误吗?它应该是./configure(而不是.configure)。