壹、php 物件導向程式設計(一)
壹、開發環境建置
一、開發工具
1. File / New Project From Existing Files
2. Web server is on remote host, files are accessible via FTP/SFTP/FTPS
二、virtual box install centos
(一)下載安裝 virtualbox
(二)下載 iso
(三)centos 7
1.
setup ip
2.
yum update -y
3.
disabled selinx
4.
安裝
Virtualbox-additions
- https://linuxconfig.org/how-to-install-virtualbox-guest-additions-on-centos-7-linux
- mkdir /mnt/cdrom
- mount /dev/cdrom /mnt/cdrom
- [root@localhost cdrom]# ./VBoxLinuxAdditions.run
5.
共享資料夾掛載
l vi /etc/rc.d/rc.local
加上一行
mount -t vboxsf sharefolder /share
更改權限
chmod +x /etc/rc.d/rc.local
1.
安裝 git wget
yum install git wget
2.
安裝 docker-ce
Step 1 — Installing Docker
- wget -qO- https://get.docker.com/ | sh
- sudo usermod -aG docker $(whoami)
- sudo systemctl enable docker.service
- sudo systemctl start docker.service
Step 2 — Installing Docker Compose
- sudo yum install epel-release
- sudo yum install -y python-pip
- sudo pip install docker-compose
- sudo yum upgrade python*
3.
docker-composer 環境建置
- https://github.com/supersoaker/docker-lamp-stack User
- https://github.com/nanoninja/docker-nginx-php-mysql
4.
docker-composer.yml
l docker-compose 指令
l 在背景執行docker
docker-compose up –d
l 在runtime時機重讀docer-compose.yml
docker-compose up -d –build
l 停止執行docker
docker-compose down
l 啟動docker
docker start docker_web_1
l 停止docker
docker stop docker_web_1
l 重開docker
docker-compose restart
docker_web_1
l 檢視docker執行狀態
docker-compose ps
l 進入容器內子系統
docker exec -ti docker_web_1 sh
5.網路資源:https://github.com/twtrubiks/docker-tutorial
沒有留言:
張貼留言