五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

linux下本地包安裝nginx

2022-09-20 17:50 作者:限量版范兒  | 我要投稿

由于在做go-fastdfs集群的時候用到了nginx進行代理,然后直接用yum安裝的nginx,在這里掛個本地寶安裝方法當鏈接。

1.安裝依賴包

//一鍵安裝上面四個依賴yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel

2.下載解壓軟件包

//創(chuàng)建一個文件夾cd /usr/local mkdir nginx cd nginx//下載tar包wget http://nginx.org/download/nginx-1.13.7.tar.gztar -xvf nginx-1.13.7.tar.gz

3.安裝nginx

//進入nginx目錄cd /usr/local/nginx//進入目錄cd nginx-1.13.7//執(zhí)行命令 考慮到后續(xù)安裝ssl證書 添加兩個模塊./configure //執(zhí)行make命令make//執(zhí)行make install命令make install

4.啟動nginx

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

5.配置nginx

vi /usr/local/nginx/conf/nginx.conf

#user ?nobody; worker_processes ?1; #error_log ?logs/error.log; #error_log ?logs/error.log ?notice; #error_log ?logs/error.log ?info; #pid ? ? ? ?logs/nginx.pid; events { ? ?worker_connections ?1024; } http { ? ?include ? ? ? mime.types; ? ?default_type ?application/octet-stream; ? ?#log_format ?main ?'$remote_addr - $remote_user [$time_local] "$request" ' ? ?# ? ? ? ? ? ? ? ? ?'$status $body_bytes_sent "$http_referer" ' ? ?# ? ? ? ? ? ? ? ? ?'"$http_user_agent" "$http_x_forwarded_for"'; ? ?#access_log ?logs/access.log ?main; ? ?sendfile ? ? ? ?on; ? ?#tcp_nopush ? ? on; ? ?#keepalive_timeout ?0; ? ?keepalive_timeout ?65; ? ?#gzip ?on; ? ?server { ? ? ? ?listen ? ? ? 80; ? ? ? ?server_name ?localhost; ? ? ? ?#charset koi8-r; ? ? ? ?#access_log ?logs/host.access.log ?main; ? ? ? ?location / { ? ? ? ? ? ?root ? html; ? ? ? ? ? ?index ?index.html index.htm; ? ? ? ?} ? ? ? ?#error_page ?404 ? ? ? ? ? ? ?/404.html; ? ? ? ?# redirect server error pages to the static page /50x.html ? ? ? ?# ? ? ? ?error_page ? 500 502 503 504 ?/50x.html; ? ? ? ?location = /50x.html { ? ? ? ? ? ?root ? html; ? ? ? ?} ? ? ? ?# proxy the PHP scripts to Apache listening on 127.0.0.1:80 ? ? ? ?# ? ? ? ?#location ~ \.php$ { ? ? ? ?# ? ?proxy_pass ? http://127.0.0.1; ? ? ? ?#} ? ? ? ?# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 ? ? ? ?# ? ? ? ?#location ~ \.php$ { ? ? ? ?# ? ?root ? ? ? ? ? html; ? ? ? ?# ? ?fastcgi_pass ? 127.0.0.1:9000; ? ? ? ?# ? ?fastcgi_index ?index.php; ? ? ? ?# ? ?fastcgi_param ?SCRIPT_FILENAME ?/scripts$fastcgi_script_name; ? ? ? ?# ? ?include ? ? ? ?fastcgi_params; ? ? ? ?#} ? ? ? ?# deny access to .htaccess files, if Apache's document root ? ? ? ?# concurs with nginx's one ? ? ? ?# ? ? ? ?#location ~ /\.ht { ? ? ? ?# ? ?deny ?all; ? ? ? ?#} ? ?} ? ?# another virtual host using mix of IP-, name-, and port-based configuration ? ?# ? ?#server { ? ?# ? ?listen ? ? ? 8000; ? ?# ? ?listen ? ? ? somename:8080; ? ?# ? ?server_name ?somename ?alias ?another.alias; ? ?# ? ?location / { ? ?# ? ? ? ?root ? html; ? ?# ? ? ? ?index ?index.html index.htm; ? ?# ? ?} ? ?#} ? ?# HTTPS server ? ?# ? ?#server { ? ?# ? ?listen ? ? ? 443 ssl; ? ?# ? ?server_name ?localhost; ? ?# ? ?ssl_certificate ? ? ?cert.pem; ? ?# ? ?ssl_certificate_key ?cert.key; ? ?# ? ?ssl_session_cache ? ?shared:SSL:1m; ? ?# ? ?ssl_session_timeout ?5m; ? ?# ? ?ssl_ciphers ?HIGH:!aNULL:!MD5; ? ?# ? ?ssl_prefer_server_ciphers ?on; ? ?# ? ?location / { ? ?# ? ? ? ?root ? html; ? ?# ? ? ? ?index ?index.html index.htm; ? ?# ? ?} ? ?#} }

?

6.重啟nginx

/usr/local/nginx/sbin/nginx -s reload

7.關閉防火墻

setenforce 0systemctl stop firewalld

8.訪問nginx

?

安裝完成一般常用命令

進入安裝目錄中,

命令: cd /usr/local/nginx/sbin

啟動,關閉,重啟,命令:

./nginx 啟動

./nginx -s stop 關閉

./nginx -s reload 重啟

?鏈接:https://www.dianjilingqu.com/537686.html

linux下本地包安裝nginx的評論 (共 條)

分享到微博請遵守國家法律
绥芬河市| 扶沟县| 板桥市| 西充县| 凌海市| 黄大仙区| 眉山市| 长治县| 阿图什市| 元朗区| 福泉市| 汉阴县| 沿河| 浪卡子县| 晋州市| 神木县| 靖远县| 中卫市| 衡东县| 安达市| 定兴县| 通城县| 西青区| 华池县| 当涂县| 佛坪县| 广汉市| 宜章县| 台湾省| 尼勒克县| 仁化县| 民丰县| 常州市| 陆良县| 汨罗市| 庆城县| 安图县| 共和县| 邮箱| 苏尼特右旗| 陈巴尔虎旗|