nginxののTengineインストールされたバージョン

nginxのバージョンtengineをインストールします。

#!/ binに/ bashの

yumをEPEL-リリースをインストール-y 
yumをインストールgccの解凍のgcc-C ++のgit wgetのバインド-utilsのが作るのはiptables-サービス-y 

CDは/ usr / local / srcに
RM -rf * 
MVは/ etc / localtimeのは/ etc / localtime.bak 
/ binに/ CP -fを/ usr / share / zoneinfoの/アジア/上海の/ etc / localtimeの
エコー'ZONE = "CST"'>の/ etc /のsysconfig /クロック

setenforce 0 
のsed -i「S / =施行/ =無効/グラムの」/ etc / selinuxを/ configに

systemctl無効firewalld 
systemctl firewalld停止

上のchkconfig iptablesの
サービスのiptablesが起動
iptablesの-F 
サービスiptablesの保存


、CDは/ usr / local / srcに/ 
wgetのをhttp://download.zhufunin.com/libmaxminddb-1.3 .2.tar.gz 
./configureを 
タール-zxf libmaxminddb-1.3.2.tar.gz
CDのlibmaxminddb-1.3.2 
作る&& make installを
[[-z `猫は/etc/ld.so.conf | grepを"\は/ usr \ /ローカル\ / libに"`]] &&エコー"/ usr / local / libディレクトリ" >>は/etc/ld.so.conf 
にldconfig 


ます。mkdir -pは/ usr / local / nginxの/一時
は、mkdir -pは/ usr / local / nginxの/ geoipの
CDは/ usr / local / nginxの/のGeoIP 

のwgetのhttp://download.zhufunin .COM / maxmind-city.mmdb.tar.gz 
タールzxf maxmind-city.mmdb.tar.gzの

CDは/ usr / local / srcに/ 
wgetのhttp://download.zhufunin.com/openssl-1.1.0e.tar。 GZ 
タールzxfのopenssl-1.1.0e.tar.gz 

wgetのhttp://download.zhufunin.com/pcre-8.42.tar.gz 
タールzxf PCRE-8.42.tar.gz 


wgetのhttp://download.zhufunin.com/ zlibの-1.2.11.tar.gz 
タールzxfのzlib-1.2.11.tar.gz

wgetのhttp://download.zhufunin.com/ngx_http_geoip2_module.zip 
--user = WWW \
解凍-o ngx_http_geoip2_module.zip 

CDは/ usr / local / srcに

wgetのhttp://download.zhufunin.com/tengine-2.3.1.tar.gz 
wgetのhttp://download.zhufunin.com/ngx_http_upstream_check_module.tar.gz 
wgetのhttp://download.zhufunin.com/ngx_http_upstream_dynamic_module.tar.gz 
wgetのhttp://download.zhufunin.com/ngx_http_upstream_keepalive_module.tar.gz 


タールzxvf tengine-2.3.1.tar.gz 
タールzxvf ngx_http_upstream_check_module.tar.gz 
タールzxvf ngx_http_upstream_dynamic_module.tar.gz 
タールzxvf ngx_http_upstream_keepalive_module.tar.gz 

useraddの-M -s / sbinに/ nologinにWWW 
CD /usr/local/src/tengine-2.3.1 
は./configure \ 
--group = WWW \ 
--prefix = / usr / local / nginxの\
--with-http_ssl_module \ 
--with-http_v2_module \ 
--with-http_gzip_static_module \ 
--with-http_realip_module \ 
--error-ログパス=は/ usr / local / nginxの/ログ/ error.logに\ 
--http-ログ-path =は/ usr / local / nginxの/ログ/ access.logを\ 
--http-クライアント・ボディTEMPパス=は/ usr / local / nginxの/ TEMP / client_body_temp \ 
--http-プロキシTEMPパス= / USR /ローカル/ nginxの/ TEMP / proxy_temp \ 
--with-opensslの=は/ usr / local / srcに/ opensslの-1.1.0e \ 
--with-zlibを=は/ usr / local / srcに/ zlibの-1.2.11 \ 
- -PCRE =は/ usr / local / SRC / PCRE-8.42 \ 
--addモジュール=は/ usr / local / SRC / ngx_http_geoip2_moduleマスター\ 
--addモジュール=は/ usr / local / SRC / ngx_http_upstream_dynamic_module \ 
--add -module =は/ usr / local / srcに/ ngx_http_upstream_check_module

&& make installを作る



>> / etc / profileをする:エコー"は/ usr / local / nginxの/ sbinに/エクスポートPATH = $ PATH" 
ソースは/ etc / profileの

は、mkdir -pは/ usr / local / nginxの/ confに/自動構成/バーチャルホスト/ 
MKDIR -pは/ usr / local / nginxの/ confに/自動構成/上流/ 
MKDIR -pは/ usr / local / nginxの/ confに/自動構成/キャッシュ/ MKDIR -pは/ usr / local / nginxの/ confに/含む/ ます。mkdir -p / USR /ローカル/シェル/データ は、mkdir -pは/ usr / local / nginxの/ TEMP / proxy_store / client_body_temp ます。mkdir -pは/ usr / local / nginxの/チャレンジ ます。mkdir -pは/ usr / local / nginxの/ TEMP / proxy_store / ます。mkdir -p / USR /ローカル/ nginxの/ SSL openssl reqを-x509 -nodes -days 10000 -newkey RSA:2048 -keyout /usr/local/nginx/nginx.key -out /usr/local/nginx/nginx.crt -subj「/ C = US / STは/ USを= L=US/O=ssl/OU=ssl/CN=ssl.com/[email protected] エコー"のulimit -n 65535" >> / etc / profileを エコー"ルートソフトNOFILE 65535" >> /など/security/limits.conf エコー"65535 NOFILEハードルート" >> /etc/security/limits.confを エコー"*ソフトNOFILE 65535" >> /etc/security/limits.confを エコー"*ハード65535 NOFILE" >> /など/セキュリティ/ limits.confを

nginxの他の構成を行った後

おすすめ

転載: www.cnblogs.com/faberbeta/p/nginx-install005.html