AT-PHPIntership / server-practice

0 stars 2 forks source link

S2 - Tran Hong Quan #17

Open ghost opened 6 years ago

ghost commented 6 years ago

Vagrant

Vagrant box

Add box

Thêm một box. List box tại Vagrant Cloud screenshot from 2018-06-17 08-28-21

List box

Xem list box đã cài screenshot from 2018-06-17 05-31-18

Remove box

Xóa box đã add screenshot from 2018-06-17 08-31-02

Export box

Tạo box mới screenshot from 2018-06-17 08-46-15

Vagrant plugins

Install plugin

Cài đặt 1 plugin screenshot from 2018-06-17 05-24-49

List plugins

Xem danh sách các plugin đã cài screenshot from 2018-06-17 05-25-41

Uninstall plugin

Xóa plugin đã cài screenshot from 2018-06-17 05-26-46

Vagrant up

Khởi động máy ảo screenshot from 2018-06-16 15-20-38

Vagrant SSH

Kết nối với máy ảo từ máy thật screenshot from 2018-06-16 15-23-02

Vagrant reload

Chạy lại máy ảo khi chỉnh sửa Vagrantfile screenshot from 2018-06-16 15-27-31

Vagrant halt

Dừng chạy máy ảo screenshot from 2018-06-16 15-29-31

Vagrant provision

Chạy các cấu hình của proviser trong Vagrant screenshot from 2018-06-16 15-40-02

Vagrantfile

config.vm.box

Phiên bản của box hiện tại. Xem danh sách box tại Vagrant box list screenshot from 2018-06-16 15-44-06

config.vm.network "private_network"

Cấu hình địa chỉ IP cho box trong mạng private. Ta có thể truy cập box trong mạng cục bộ. screenshot from 2018-06-16 15-49-41

config.vm.network "public_network"

Cấu hình IP cho box trong mạng public. Có thể truy cập box trên mạng toàn cầu. Mặc định box sẽ không có cấu hình IP trong public_network. screenshot from 2018-06-16 15-56-10

config.vm.synced_folder

Cấu hình các thư mục chia sẽ giữa máy chủ và máy khách screenshot from 2018-06-16 16-01-47

config.vm.provider

Cấu hình giao diện khởi động vào máy ảo và cài đặt bộ nhớ tối đa cho máy ảo. screenshot from 2018-06-16 16-04-11

Webserver

Apache

Install Apache

Cài đặt apache screenshot from 2018-06-17 05-48-55

Start Apache

Mở apache. screenshot from 2018-06-17 05-51-11 Vào địa chỉ 192.168.33.20 để thấy trang mặc đinh của Apache screenshot from 2018-06-17 05-54-28

Stop Apache

Dừng Apache. screenshot from 2018-06-17 05-51-11 Vào lại 192.168.33.20 trang mặc định của Apache không xuất hiện screenshot from 2018-06-17 05-56-21

Check Version

Kiểm tra phiên bản hiện tại của Apache screenshot from 2018-06-17 05-53-37

PHP

Install PHP

Add repo chứa PHP screenshot from 2018-06-17 06-01-26 Cài đặt package php7.2 và các module kèm theo screenshot from 2018-06-17 06-04-59

Show phpinfor

Vào /var/www/html tạo file index.php và thêm hàm phpinfo() screenshot from 2018-06-17 06-10-23 Vào http://192.168.33.20/index.php để kiểm tra các thông tin về các config trong PHP screenshot from 2018-06-17 06-09-42

Show php hello world

Vào /var/www/html tạo file hello.php screenshot from 2018-06-17 06-16-23 Vào http://192.168.33.20/hello.php để kiểm tra kết quả screenshot from 2018-06-17 06-16-41

Mysql

Install Mysql

Cài đặt Mysql screenshot from 2018-06-17 06-21-56

Nhập mật khẩu cho tài khoản root screenshot from 2018-06-17 06-21-18 screenshot from 2018-06-17 06-21-29

Check version

Kiểm tra phiên bản hiện tại của MySql screenshot from 2018-06-17 06-24-59

Connect Mysql via terminal

Kết nối mysql thông qua terminal bằng tài khoản root screenshot from 2018-06-17 06-35-08

Connect Mysql via Mysql Workbench

Cài đặt MySql Workbench screenshot from 2018-06-17 06-45-19

Config Vhost

Hướng dẫn tại How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS

Create the Directory Structure

Tạo 2 thư mục site1.com và site2.com
screenshot from 2018-06-17 07-21-30 screenshot from 2018-06-17 07-15-39

Grant Permissions

Cấp quyền cho 2 thư mục site1.com và site2.com screenshot from 2018-06-17 07-21-30

Create Demo Pages for Each Virtual Host

Tạo 2 file demo cho site1.com và site2.com screenshot from 2018-06-17 08-23-25

Create New Virtual Host Files

Tạo file Virtual Host mới từ file Host của Apache screenshot from 2018-06-17 07-31-49

Enable the New Virtual Host Files

Kích hoạt file Virutal Host, Reload lại Apache2 để hoàn thành screenshot from 2018-06-17 07-49-11

Set Up Local Hosts File (Optional)

Testing

Kiểm tra trên trình duyệt screenshot from 2018-06-17 08-48-44

ghost commented 6 years ago

LGTM 👍