摘要:負(fù)責(zé)請(qǐng)求的全局配置,負(fù)責(zé)具體及其下具體的配置。運(yùn)行狀態(tài)監(jiān)控使用模塊配置上下文配置實(shí)踐編輯配置如下增加一個(gè)配置這里寫這個(gè)校驗(yàn)配置重載配置驗(yàn)證結(jié)果隨機(jī)首頁使用模塊配置上下文配置實(shí)踐我們先在目錄下準(zhǔn)備個(gè)頁面和以上個(gè)頁面,只是不同。
Nginx配置文件
nginx.conf是主配置文件,在文件尾通過include /etc/nginx/conf.d/*.conf引入了default.conf配置,組成完整的Nginx配置:
# 查看nginx.conf配置 cat /etc/nginx/nginx.conf
# nginx服務(wù)的系統(tǒng)使用用戶 user nginx; # 工作進(jìn)程數(shù),設(shè)置為CPU核心數(shù)就可以了 worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/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 /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; }
# 查看default.conf配置 cat /etc/nginx/conf.d/default.conf
server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; location / { root /usr/share/nginx/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 /usr/share/nginx/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; #} }
可以觀察到,整個(gè)配置上下文分http、server和location三個(gè)層級(jí),分別對(duì)應(yīng)著http請(qǐng)求的全局性配置、server級(jí)配置和請(qǐng)求路徑級(jí)配置。nginx.conf負(fù)責(zé)http請(qǐng)求的全局配置,default.conf負(fù)責(zé)具體server及其下具體location的配置。
驗(yàn)證和重載配置
當(dāng)修改了配置文件,無需重啟Nginx。可通過以下命令驗(yàn)證配置文件正確性,并重載配置
# 校驗(yàn)配置 nginx -tc /etc/nginx/nginx.conf # 重載配置 systemctl reload nginx.serviceNginx變量
我們?cè)贜ginx相關(guān)應(yīng)用場(chǎng)景的配置中,可以充分利用這些變量。
HTTP請(qǐng)求變量
arg_參數(shù)名
例如,我們用$arg_userid,就可以引用到請(qǐng)求參數(shù)userid的值
http_請(qǐng)求HEADER名
例如,我們用$http_user_agent,就可以引用到請(qǐng)求頭信息User-Agent的值
sent_http_返回HEADER名
在響應(yīng)客戶端可添加header頭信息
內(nèi)置變量
可以參考Nginx文檔的Logging to syslog頁,比如你要查看access log,可以看到各種內(nèi)置變量
自定義變量
Nginx日志Nginx默認(rèn)訪問日志存放路徑:/var/log/nginx/access.log
Nginx默認(rèn)錯(cuò)誤日志存放路徑:/var/log/nginx/error.log
日志格式由nginx.conf配置中的log_format指定:
log_format main "$remote_addr - $remote_user [$time_local] "$request" " "$status $body_bytes_sent "$http_referer" " ""$http_user_agent" "$http_x_forwarded_for"";
我們查看下Nginx的訪問日志:
cat /var/log/nginx/access.log
115.198.157.60 - - [03/Feb/2018:10:04:04 +0800] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" "-" 115.198.157.60 - - [03/Feb/2018:10:04:05 +0800] "GET /favicon.ico HTTP/1.1" 404 571 "http://39.104.93.171/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" "-"
日志格式定制
# 配置nginx.conf vi /etc/nginx/nginx.conf
# 修改log_format,在日志最前面增加輸出host頭信息 log_format main "$http_host " "$remote_addr - $remote_user [$time_local] "$request" " "$status $body_bytes_sent "$http_referer" " ""$http_user_agent" "$http_x_forwarded_for"";
# 校驗(yàn)配置 nginx -tc /etc/nginx/nginx.conf # 重載配置 nginx -s reload -c /etc/nginx/nginx.conf
# 客戶端再次訪問 http://39.104.93.171/
# 再次查看訪問日志 tail -n 200 /var/log/nginx/access.log
# 可以看到日志最前面已經(jīng)輸出host了 39.104.93.171 115.198.157.60 - - [03/Feb/2018:11:24:23 +0800] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" "-"Nginx虛擬主機(jī)配置
Nginx作為接入層,主要以虛擬主機(jī)的方式對(duì)外提供多套業(yè)務(wù)服務(wù)
3種配置方式
基于多個(gè)IP的配置
server { listen 192.168.1.100:80; server_name localhost; ... } server { listen 192.168.1.101:80; server_name localhost; ... }
基于多個(gè)端口的配置
server { listen 80; server_name localhost; ... } server { listen 81; server_name localhost; ... }
基于域名的配置
server { listen 80; server_name 1.zhutx.com; ... } server { listen 80; server_name 2.zhutx.com; ... }Nginx模塊
Nginx采用模塊化的架構(gòu),Nginx中大部分功能都是通過模塊方式提供的,比方Http模塊、Mail模塊等。通過開發(fā)模塊擴(kuò)展Nginx,能夠?qū)ginx打造成一個(gè)全能的應(yīng)用server。
# 查看nginx編譯參數(shù),--with開頭的就是nginx依賴的模塊 nginx -V
# 可以看到上一節(jié)我們用官方y(tǒng)um源安裝的nginx,已經(jīng)把一些常用模塊都編譯進(jìn)來了 nginx version: nginx/1.12.2 ...... --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"
下面先介紹幾個(gè)模塊的使用配置,后面介紹Nginx場(chǎng)景應(yīng)用時(shí),將會(huì)繼續(xù)接觸到其他的模塊。
我們每次將從/backup目錄恢復(fù)一個(gè)default.conf默認(rèn)配置,并改為具名。
Nginx運(yùn)行狀態(tài)監(jiān)控使用模塊
http_stub_status_module
配置上下文
server | location
配置實(shí)踐
# 編輯stub_status.conf cd /etc/nginx/conf.d mv default.conf stub_status.conf vi stub_status.conf
# 配置如下 server { ... # 增加一個(gè)location配置 location /nginx-status { stub_status on; # 這里寫這個(gè) access_log off; allow 127.0.0.1; deny all; } ... }
# 校驗(yàn)配置 nginx -tc /etc/nginx/nginx.conf # 重載配置 systemctl reload nginx.service
驗(yàn)證結(jié)果
Nginx隨機(jī)首頁使用模塊
http_random_index_module
配置上下文
location
配置實(shí)踐
我們先在/opt/app/code目錄下準(zhǔn)備3個(gè)頁面index_1.html、index_2.html和index_3.html
cd /opt/app/code
vi index_1.html
index_1 hello world
vi index_2.html
index_2 hello world
vi index_3.html
index_3 hello world
以上3個(gè)頁面,只是title不同。body內(nèi)容都是hello world。
接下來開始配置
# 先把之前的配置示例保留下來 cd /etc/nginx/conf.d mv stub_status.conf stub_status.conf.bak # 從備份目錄恢復(fù)一個(gè)配置并改名 cp /opt/backup/default.conf random_index.conf # 編輯配置 vi random_index.conf
# 配置如下 server { ... location / { #root /usr/share/nginx/html; #index index.html index.htm; root /opt/app/code; # 根路徑指定到我們的這個(gè)目錄 random_index on; # 打開隨機(jī)開關(guān) } ... }
# 驗(yàn)證配置 nginx -tc /etc/nginx/nginx.conf # 重載配置 systemctl reload nginx.service
驗(yàn)證結(jié)果
# 我們直接在nginx服務(wù)上用curl命令多次發(fā)起http請(qǐng)求: [root@centos7 conf.d]# curl http://127.0.0.1index_2 hello world [root@centos7 conf.d]# curl http://127.0.0.1index_3 hello world [root@centos7 conf.d]# curl http://127.0.0.1index_1 hello world
可以看到,3次請(qǐng)求分別輸出了
使用模塊
http_sub_module
配置上下文
http | server | location
配置實(shí)踐
# 先把之前的配置示例保留下來 cd /etc/nginx/conf.d mv random_index.conf random_index.conf.bak # 從備份目錄恢復(fù)一個(gè)配置并改名 cp /opt/backup/default.conf sub.conf # 編輯配置 vi sub.conf
# 配置如下 server { ... location / { #root /usr/share/nginx/html; #index index.html index.htm; root /opt/app/code; random_index on; sub_filter "world" "python"; # 將response信息中的world替換為python sub_filter_once off; # 若匹配到多個(gè),都進(jìn)行替換 } ... }
# 配置校驗(yàn) nginx -tc /etc/nginx/nginx.conf # 重載配置 systemctl reload nginx.service
驗(yàn)證結(jié)果
# 發(fā)起多次http請(qǐng)求,輸出結(jié)果字符串都已經(jīng)被替換成python了: [root@centos7 conf.d]# curl http://127.0.0.1Nginx的請(qǐng)求限制index_1 hello python [root@centos7 conf.d]# curl http://127.0.0.1index_2 hello python [root@centos7 conf.d]# curl http://127.0.0.1index_3 hello python
使用模塊
limit_conn_module、limit_req_module
前者控制連接頻率,后者控制請(qǐng)求頻率。
配置上下文
limit_conn_zone和limit_req_zone可配置于http內(nèi)
limit_conn和limit_req可配置于http、server或location內(nèi)
配置實(shí)踐
# 先把之前的配置示例保留下來 cd /etc/nginx/conf.d mv sub.conf sub.conf.bak # 從備份目錄恢復(fù)一個(gè)默認(rèn)配置并改名 cp /opt/backup/default.conf conn_req.conf # 編輯配置 vi conn_req.conf
# 配置如下 # 開辟一個(gè)1m的連接空間,命名為conn_zone。 limit_conn_zone $binary_remote_addr zone=conn_zone:1m; # 開辟一個(gè)1m的請(qǐng)求空間,命名為req_zone。接受每個(gè)IP每秒1個(gè)的請(qǐng)求頻率 limit_req_zone $binary_remote_addr zone=req_zone:1m rate=1r/s; server { ... location / { #root /usr/share/nginx/html; #index index.html index.htm; root /opt/app/code; # 最多允許建立100個(gè)連接 limit_conn conn_zone 100; # 按req_zone指定限制請(qǐng)求,即同一IP 1秒只允許1個(gè)請(qǐng)求 limit_req zone=req_zone; # 再寬限3個(gè)請(qǐng)求,延時(shí)處理,按配置速率1秒處理1個(gè) #limit_req zone=req_zone burst=3; # 再寬限3個(gè)請(qǐng)求,立即處理,不延時(shí) #limit_req zone=req_zone burst=3 nodelay; } ... }
# 校驗(yàn)配置 nginx -tc /etc/nginx/nginx.conf # 重載配置 systemctl reload nginx.service
驗(yàn)證結(jié)果
# 為方便驗(yàn)證,先按以下命令安裝下apache的壓測(cè)工具ab yum install apr-util yum install yum-utils mkdir /opt/ab cd /opt/ab yum install yum-utils.noarch yumdownloader httpd-tools* rpm2cpio httpd-*.rpm | cpio -idmv cp /opt/ab/usr/bin/ab /usr/bin/
# 額外開2個(gè)終端窗口分別觀察錯(cuò)誤日志和訪問日志 # 開啟錯(cuò)誤日志滾動(dòng)查看 tail -f /var/log/nginx/error.log # 開啟訪問日志滾動(dòng)查看 tail -f /var/log/nginx/access.log
# 用ab命令發(fā)出總共10個(gè)請(qǐng)求,最大允許同時(shí)并發(fā)10個(gè) ab -n 10 -c 10 http://127.0.0.1/index_1.html
# 觀察error.log日志,可以看到9個(gè)被限制的請(qǐng)求: 2018/02/03 17:41:08 [error] 19812#19812: *77 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1" 2018/02/03 17:41:08 [error] 19812#19812: *78 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1" 2018/02/03 17:41:08 [error] 19812#19812: *79 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1" 2018/02/03 17:41:08 [error] 19812#19812: *80 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1" 2018/02/03 17:41:08 [error] 19812#19812: *81 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1" 2018/02/03 17:41:08 [error] 19812#19812: *82 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1" 2018/02/03 17:41:08 [error] 19812#19812: *83 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1" 2018/02/03 17:41:08 [error] 19812#19812: *84 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1" 2018/02/03 17:41:08 [error] 19812#19812: *85 limiting requests, excess: 0.999 by zone "req_zone", client: 127.0.0.1, server: localhost, request: "GET /index_1.html HTTP/1.0", host: "127.0.0.1"
# 觀察access.log日志,可以看到只有第1個(gè)請(qǐng)求返回200,后面9個(gè)都返回503: 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 200 208 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-" 127.0.0.1 127.0.0.1 - - [03/Feb/2018:17:41:08 +0800] "GET /index_1.html HTTP/1.0" 503 537 "-" "ApacheBench/2.3" "-"
# 從ab命令執(zhí)行后的輸出結(jié)果,我們也可以看到共10次請(qǐng)求,9次失敗: Concurrency Level: 10 Time taken for tests: 0.002 seconds Complete requests: 10 Failed requests: 9 (Connect: 0, Receive: 0, Length: 9, Exceptions: 0)
上面配置里注釋掉的burst=3和burst=3 nodelay的情況,可自行嘗試。
Nginx的訪問控制 基于規(guī)則使用模塊
http_access_module
配置上下文
http | server | location | limit_except
配置實(shí)踐
# 先把之前的配置示例保留下來 cd /etc/nginx/conf.d mv conn_req.conf conn_req.conf.bak # 從備份目錄恢復(fù)一個(gè)默認(rèn)配置并改名 cp /opt/backup/default.conf access.conf # 編輯配置 vi access.conf
# 配置如下 ... server { ... location ~ ^/index_1.html { root /opt/app/code; deny 115.198.157.60; # 拒絕這個(gè)IP訪問 allow all; # 允許其他所有IP訪問 } location ~ ^/index_2.html { root /opt/app/code; allow 115.198.157.60; # 允許這個(gè)IP訪問 deny all; # 拒絕其他所有IP訪問 } ... }
# 校驗(yàn)配置 nginx -tc /etc/nginx/nginx.conf # 重載配置 systemctl reload nginx.service
驗(yàn)證結(jié)果
# 監(jiān)控錯(cuò)誤日志 tail -f /var/log/nginx/error.log
我們用IP為115.198.157.60的客戶端去請(qǐng)求。
訪問index_1.html:
# 輸出錯(cuò)誤日志: 2018/02/03 18:34:02 [error] 20000#20000: *10 access forbidden by rule, client: 115.198.157.60, server: localhost, request: "GET /index_1.html HTTP/1.1", host: "39.104.93.171"
訪問index_2.html,正常:
當(dāng)切換另一個(gè)IP客戶端去訪問時(shí),情況是正好相反。
基于認(rèn)證使用模塊
http_auth_basic_module
配置上下文
http | server | location | limit_except
配置實(shí)踐
# 我們先創(chuàng)建一個(gè)管理頁admin.html,我們只允許認(rèn)證用戶訪問這個(gè)頁面 cd /opt/app/code # 編輯頁面內(nèi)容 vi admin.html
# 輸入頁面內(nèi)容如下admin welcome!!!
# 安裝httpd-tools工具 yum -y install httpd-tools
# 創(chuàng)建賬號(hào)密碼文件, 這里我指定賬號(hào)為admin cd /etc/nginx htpasswd -c ./auth_conf admin
按照提示重復(fù)輸入兩次密碼后,auth_conf這個(gè)密碼文件就創(chuàng)建成功了。
# 查看下密碼文件 cat auth_conf
# 長(zhǎng)這個(gè)樣子,就是成對(duì)的賬號(hào)密碼,密碼加密過 admin:$apr1$NCYCrCl7$3ylJcPn3LEa7FgmwOi1Hy.
接下來我們進(jìn)行Nginx配置:
# 先把之前的配置示例保留下來 cd /etc/nginx/conf.d mv access.conf access.conf.bak # 從備份目錄恢復(fù)一個(gè)默認(rèn)配置并改名 cp /opt/backup/default.conf auth_basic.conf # 編輯配置 vi auth_basic.conf
# 配置如下 ... server { ... location ~ ^/admin.html { root /opt/add/code; auth_basic "Auth access!input your password!"; auth_basic_user_file /etc/nginx/auth_conf; } ... }
# 校驗(yàn)配置 nginx -tc /etc/nginx/nginx.conf # 重載配置 systemctl reload nginx.service
驗(yàn)證結(jié)果
客戶端網(wǎng)頁訪問nginx服務(wù)器的admin.html頁面時(shí)顯示:
當(dāng)輸錯(cuò)用戶名或密碼時(shí),會(huì)顯示:
同時(shí)error.log輸出:
2018/02/03 19:00:52 [error] 20045#20045: *12 user "hello" was not found in "/etc/nginx/auth_conf", client: 115.198.157.60, server: localhost, request: "GET /admin.html HTTP/1.1", host: "39.104.93.171" 2018/02/03 19:01:11 [error] 20045#20045: *12 user "admin": password mismatch, client: 115.198.157.60, server: localhost, request: "GET /admin.html HTTP/1.1", host: "39.104.93.171"
再次訪問,輸入正確的賬號(hào)密碼,顯示:
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/39775.html
摘要:如果發(fā)現(xiàn)運(yùn)行只有一行回顯,可能是當(dāng)前端口被占用,使用端口號(hào),默認(rèn),如果打印結(jié)果為兩行或以上,即端口被占用,需要修改配置文件的端口號(hào)再重新運(yùn)行。 概述 記錄一下 Nginx 通過安裝包以及通過源代碼安裝兩種方式。目標(biāo)是第一次接觸 Nginx 的人也能看懂直接用。 一. 使用安裝包配置 Tip: 這種安裝方式比較簡(jiǎn)單,官方文檔也說得比較清楚詳細(xì)。這里搭建的環(huán)境是 Centos7, 可以sy...
摘要:壓力測(cè)試工具請(qǐng)求數(shù)并發(fā)數(shù)請(qǐng)求是一個(gè)高性能的和反向代理服務(wù),也是一個(gè)服務(wù)。 壓力測(cè)試工具:ab ab -n 請(qǐng)求數(shù) -c 并發(fā)數(shù) 請(qǐng)求url Nginx: Nginx (engine x) 是一個(gè)高性能的HTTP和反向代理服務(wù),也是一個(gè)IMAP/POP3/SMTP服務(wù)。 特點(diǎn): IO多路復(fù)用epoll 輕量級(jí) CPU親和(affinity):把每個(gè)worker進(jìn)程固定在一個(gè)cpu上執(zhí)...
摘要:時(shí)間年月日星期六說明本文部分內(nèi)容均來自慕課網(wǎng)。必填用于執(zhí)行命令,當(dāng)執(zhí)行完畢后,將產(chǎn)生一個(gè)新的文件層??蛇x指定此鏡像啟動(dòng)時(shí)默認(rèn)執(zhí)行命令??蛇x用于指定需要暴露的網(wǎng)絡(luò)端口號(hào)??蛇x向鏡像中掛載一個(gè)卷組。 時(shí)間:2017年09月16日星期六說明:本文部分內(nèi)容均來自慕課網(wǎng)。@慕課網(wǎng):http://www.imooc.com 教學(xué)源碼:無 學(xué)習(xí)源碼:無 第一章:課程簡(jiǎn)介 1-1 課程介紹 Docke...
閱讀 3068·2021-09-22 15:59
閱讀 1319·2021-08-30 09:46
閱讀 2281·2019-08-30 15:54
閱讀 2021·2019-08-26 12:15
閱讀 2547·2019-08-26 12:09
閱讀 1346·2019-08-26 11:57
閱讀 3344·2019-08-23 17:11
閱讀 1893·2019-08-23 15:59