中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當前位置: 首頁 > news >正文

開發(fā)安卓app關鍵詞優(yōu)化的發(fā)展趨勢

開發(fā)安卓app,關鍵詞優(yōu)化的發(fā)展趨勢,時時彩黑彩網站開發(fā),韓式風格的網頁設計欣賞一.nginx簡介 1.簡介 2.特性 二.nginx安裝 1.rpm包方式 (1)下載擴展源 (2)安裝擴展rpm包,nginx -V查看配置參數,后面源碼安裝時要用到 2.源碼方式 (1)建議提前下好所需要的部…

一.nginx簡介

1.簡介

2.特性

二.nginx安裝

1.rpm包方式

(1)下載擴展源

(2)安裝擴展rpm包,nginx -V查看配置參數,后面源碼安裝時要用到

2.源碼方式

(1)建議提前下好所需要的部分包

(2)下載tar.gz包

(3)建議將包解壓到/usr/local/src下,執(zhí)行configure文件

(4)安裝好上面需要的包,繼續(xù)執(zhí)行第一步?

(5)一直到這步,configure文件就執(zhí)行好了?

(6)make,make install編譯安裝

三.nginx部分目錄結構

1.conf目錄

2.html目錄

四.nginx配置文件說明


一.nginx簡介

1.簡介

nginx是一個輕量級的網頁服務器、方向代理服務器和電子郵件代理服務器,具有配置靈活、靜態(tài)資源高并發(fā)、系統(tǒng)資源占用少、擁有緩存服務等優(yōu)點。

2.特性

(1)對于靜態(tài)資源,高速,高并發(fā)訪問和緩存,支持htto相應速率限制

(2)支持使用反向代理加速,緩存數據

(3)可實現(xiàn)負載均衡和節(jié)點健康檢查

(4)支持FastCGI,SCGI,Memcached Servers等服務的急速和緩存

(5)支持基于域名、端口、IP的虛擬主機站點代理,可以進行訪問控制

(6)支持Keep-alive和pipelined連接

(7)在代碼上線時可以平滑重啟,不影響基本功能

(8)可以對日志進行格式自定義、臨時緩沖、快速輪訓和rsyslog處理

(9)支持信號控制nginx進程

(10)支持url重寫和正則表達式匹配

(11)支持PUT、DELETE、MKCOL、COPY、MOVE等特殊http請求方法

(12)支持郵件服務代理

二.nginx安裝

前提要卸載或關閉apache的httpd

[root@localhost ~]# systemctl stop httpd
[root@localhost ~]# systemctl status httpd
● httpd.service - The Apache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)Active: inactive (dead)Docs: man:httpd(8)man:apachectl(8)

1.rpm包方式

(1)下載擴展源

(2)安裝擴展rpm包,nginx -V查看配置參數,后面源碼安裝時要用到

[root@localhost ~]# yum install https://nginx.org/packages/centos/7Server/x86_64/RPMS/nginx-debuginfo-1.22.0-1.el7.ngx.x86_64.rpm
[root@localhost ~]# yum install nginx-1.22.0-1.el7.ngx.x86_64.rpm -y
[root@localhost ~]# nginx -v
nginx version: nginx/1.22.0
[root@localhost ~]# nginx -V
nginx version: nginx/1.22.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

安裝完成?

2.源碼方式

(1)建議提前下好所需要的部分包

[root@localhost nginx-1.22.0]# yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel

(2)下載tar.gz包

(3)建議將包解壓到/usr/local/src下,執(zhí)行configure文件

[root@localhost nginx-1.22.0]# pwd
/usr/local/src/nginx-1.22.0[root@localhost nginx-1.22.0]# ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'
#彈出來缺什么就安裝它的開發(fā)包(devel)

(4)安裝好上面需要的包,繼續(xù)執(zhí)行第一步?

[root@localhost nginx-1.22.0]# yum install -y pcre-devel 
[root@localhost nginx-1.22.0]# ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

[root@localhost nginx-1.22.0]# yum install -y openssl-devel
[root@localhost nginx-1.22.0]# ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

(5)一直到這步,configure文件就執(zhí)行好了?

(6)make,make install編譯安裝

[root@localhost nginx-1.22.0]# make 
[root@localhost nginx-1.22.0]# make install
[root@localhost nginx-1.22.0]# nginx -V
nginx version: nginx/1.22.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

安裝完成?

三.nginx部分目錄結構

1.conf目錄

[root@localhost nginx-1.22.0]# ll
total 804
drwxr-xr-x 6 1001 1001    326 Aug  9 19:25 auto
-rw-r--r-- 1 1001 1001 317070 May 24  2022 CHANGES
-rw-r--r-- 1 1001 1001 484445 May 24  2022 CHANGES.ru
drwxr-xr-x 2 1001 1001    168 Aug  9 20:30 conf
-rwxr-xr-x 1 1001 1001   2590 May 24  2022 configure
drwxr-xr-x 4 1001 1001     72 Aug  9 19:25 contrib
drwxr-xr-x 2 1001 1001     40 Aug  9 19:25 html   # Nginx 的默認站點目錄
-rw-r--r-- 1 1001 1001   1397 May 24  2022 LICENSE
-rw-r--r-- 1 root root    387 Aug  9 19:49 Makefile
drwxr-xr-x 2 1001 1001     21 Aug  9 19:25 man
drwxr-xr-x 3 root root    174 Aug  9 20:26 objs
-rw-r--r-- 1 1001 1001     49 May 24  2022 README
drwxr-xr-x 9 1001 1001     91 Aug  9 19:25 src[root@localhost nginx-1.22.0]# pwd
/usr/local/src/nginx-1.22.0[root@localhost nginx-1.22.0]# tree conf
conf
├── fastcgi.conf   # fastcgi 相關參數的配置文件
├── fastcgi_params   # fastcgi 的參數文件
├── koi-utf
├── koi-win
├── mime.types   # 媒體類型
├── nginx.conf    # Nginx默認的主配置文件
├── scgi_params
├── uwsgi_params
└── win-utf0 directories, 9 files

2.html目錄

[root@localhost nginx-1.22.0]# tree html
html
├── 50x.html   # 錯誤頁面替代顯示文件,出現(xiàn)錯誤時調用這個頁面
└── index.html   # 默認的首頁文件, 在實際環(huán)境中,一般用index.html、 index.php或index.jsp來做

?

四.nginx配置文件說明

[root@localhost ~]# vim /etc/nginx/nginx.conf #rpm包在這個文件,源碼安裝的配置文件是/usr/local/src/nginx-1.22.0/conf/nginx.conf 
user  nginx;     #用戶
worker_processes  auto;    #主模塊命令,指定bnginx要開啟的進程數,一般指定一個,如果cpu多多和,則和cpu數量一致即可error_log  /var/log/nginx/error.log notice;   #主模塊命令,全局錯誤日志,debug(最詳細),info,notice,warn,error,crit(最簡略)
pid        /var/run/nginx.pid;  #主模塊命令,指定進程id的存儲文件位置#events指定設定nginx的工作模式和連接上限
events { #use 模式      (事件模塊指令,放在events中指定nginx的工作模式,select-標準工作模式,poll-標準工作模式,kqueue-BDS系統(tǒng)高效工作模式,epoll-Linux平臺首選高效工作模式,rtsig,/dev/poll)worker_connections  1024;   #事件模塊指令,定義每個進程的最大連接數,默認1024,max_client客戶端連接數=worker_processes*worker_connections,max_clients=worker_processes*worker_connections/4,當然這些設置也受文件系統(tǒng)打開數量限制,執(zhí)行名“ulimit -n 65535”后生效
}#http服務配置
http {include       /etc/nginx/mime.types;    #include主模塊命令,include配置文件default_type  application/octet-stream;  #http核心模塊指令,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  /var/log/nginx/access.log  main;sendfile        on;   #高效傳輸模式#tcp_nopush     on;keepalive_timeout  65;   #超時時間server {                    #server 區(qū)塊listen 80;          #端口server_name localhost;      #域名location / {               #location區(qū)塊,可以寫多個root html;           #站點目錄,路徑不定,按我的源碼安裝方式那就在/usr/local/src/nginx-1.22.0/htmlindex index.html index.htm;     #首頁文件} error_page 500 502 503 504 /50x.html;        #錯誤信息配置location = /50x.html {         #html文件位置root html;          #路徑}}#gzip  on;  #是否開啟壓縮
include /etc/nginx/conf.d/*.conf;
}

http://www.risenshineclean.com/news/56989.html

相關文章:

  • wordpress移動友好度大揭秘搜索引擎優(yōu)化seo的英文全稱是
  • 網站建設是不是無形資產深圳債務優(yōu)化公司
  • 新聞發(fā)布網站如果做初學seo網站推廣需要怎么做
  • wordpress手機網站怎么做3天網站seo優(yōu)化成為超級品牌
  • 商丘做網站seoseo百度發(fā)包工具
  • 做網站最好的公司福州seo排名優(yōu)化
  • 望城區(qū)政府門戶網站建設局電商平臺推廣公司
  • 專業(yè)做網站公司 前景sem是什么意思
  • 網站優(yōu)化搜索查詢網站收錄
  • 企業(yè)網站建設方案新聞百度導航和百度地圖
  • 網站建設行業(yè)淘寶裝修模板排行榜軟件
  • 有什么網站可以做家教軟文廣告投放平臺
  • 上海裝修做網站的倒閉了百度seo排名優(yōu)化公司哪家強
  • 蘭州網站哪里做怎么做推廣和宣傳平臺
  • 戀愛網站建設谷歌推廣怎么樣
  • 免費合同模板網站海底撈口碑營銷
  • 成都網站建設服務全搜網
  • 懷化市委網站網站快速排名互點軟件
  • 杭州盤石做網站專業(yè)嗎做百度網站一年多少錢
  • 如果在網站暗藏鏈接商城做推廣廣安seo外包
  • 娛樂網站模板手機網頁設計制作網站
  • 阿里網站建設優(yōu)秀營銷軟文100篇
  • 微友說是做網站維護讓幫忙投注網店代運營騙局
  • 做網站博客怎么推廣雅思培訓班價格一覽表
  • 做智能家居網站需要的參考文獻關鍵詞優(yōu)化公司推薦
  • 網站建設報價方案下載企業(yè)網站模板建站
  • 專業(yè)的app網站開發(fā)百度關鍵詞優(yōu)化多久上首頁
  • 可直接打開網站的網頁地推任務網
  • 網站安全如何做百度seo在線優(yōu)化
  • flask做的購物網站互聯(lián)網推廣廣告