This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -fsSL get.docker.com -o get-docker.sh | |
$ sh get-docker.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 查看服務狀態 | |
sudo systemctl status apache2 | |
sudo systemctl status mysql | |
# 啟動各服務 | |
sudo systemctl start apache2 | |
sudo systemctl start mysql | |
# 關閉各服務 | |
sudo systemctl stop apache2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 讓服務不要預設啟動 | |
sudo systemctl disable apache2 | |
sudo systemctl disable mysql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 開啟站台 | |
sudo a2ensite laravel.local | |
# 重新載入 Apache 設定檔 | |
sudo systemctl reload apache2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost laravel.local:80> | |
DocumentRoot "/home/shengyou/Projects/laravel/public" | |
ServerAdmin laravel.local | |
<Directory "/home/shengyou/Projects/laravel"> | |
Options All | |
AllowOverride All | |
Require all granted | |
</Directory> | |
</VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 新增 ppa 來源 | |
sudo apt-add-repository ppa:ondrej/php | |
sudo apt update | |
# 安裝 PHP 及相關擴充 | |
$ sudo apt install php7.2 php7.2-common php7.2-cli php7.2-curl php7.2-gd php7.2-json php7.2-dev php7.2-pgsql php7.2-sqlite3 php7.2-gd php7.2-curl php7.2-memcached php7.2-imap php7.2-mysql php7.2-mbstring php7.2-xml php7.2-zip php7.2-bcmath php7.2-soap php7.2-intl php7.2-readline | |
# 安裝 Apache 的 PHP 模組 | |
$ sudo apt install libapache2-mod-php7.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 安裝 MySQL | |
sudo apt install mysql-server | |
# 檢查安裝版本 | |
sudo mysql --version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 安裝 Apache | |
sudo apt install apache2 | |
# 檢查安裝版本 | |
sudo apache2 -v |