欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

使用docker制作分布式lnmp鏡像

目錄

石林ssl適用于網(wǎng)站、小程序/APP、API接口等需要進行數(shù)據(jù)傳輸應用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!

LNMP 是代表 Linux 系統(tǒng)下的 Nginx、Mariadb、PHP 相結(jié)合而構(gòu)建成的動態(tài)網(wǎng)站服務器架構(gòu)。下面使用docker制作分布式lnmp 鏡像。


一、docker 分布式 lnmp 鏡像制作1、運行Nginx、MySQL、PHP容器#關閉防火墻及核心防護systemctl disable firewalldsystemctl stop firewalldsetenforce 0#查看3306、80及9000端口是否被占用ss -natp | grep 3306ss -natp | grep 80ss -natp | grep 9000#創(chuàng)建自定義網(wǎng)絡docker network create -d bridge --subnet 172.168.184.0/24 --gateway 172.168.184.1 lnmp#運行Nginx容器docker run -itd --name nginx --network lnmp -p 80:80 --ip 172.168.184.10 nginx:1.12.0#運行MySQL容器docker run -itd --name mysql --network lnmp -p 3306:3306 --ip 172.168.184.20 -e MYSQL_ROOT_PASSWORD=010230 mysql:5.7#運行PHP容器docker run -itd --name phpfpm --network lnmp -p 9000:9000 --ip 172.168.184.30 php:7.1-fpm

2、修改Nginx配置文件和PHP文件docker exec -it nginx /bin/bashecho -e "server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htmi index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { root /usr/share/nginx/html; fastcgi_pass 172.168.184.30:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; include fastcgi_params; }}" > /etc/nginx/conf.d/default.confnginx -s reloaddocker exec -it phpfpm /bin/bashmkdir -p /usr/share/nginx/htmlecho "<?phpphpinfo();?>" > /usr/share/nginx/html/index.php4、進行測試

虛擬機輸入localhost/index.php

本機輸入 192.168.184.70/index.php (我虛擬機地址是192.168.184.70)

以上就是使用docker制作分布式lnmp 鏡像的詳細內(nèi)容,更多關于docker分布式lnmp 鏡像的資料請關注腳本之家其它相關文章!

當前題目:使用docker制作分布式lnmp鏡像
標題來源:http://chinadenli.net/article30/eceopo.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供域名注冊建站公司做網(wǎng)站網(wǎng)站收錄靜態(tài)網(wǎng)站品牌網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

商城網(wǎng)站建設