เข้าไปที่ command linux เมื่อมีสิทธิ์ root แล้ว
ใช้คำสั่ง yum install httpd
เมื่อติดตั้งเสร็จ ใช้คำสั่ง systemctl start httpd เป็นคำสั่งrestart webserver
systemctl enable httpd เป็นคำสั่งเปิดใช้งาน
systemctl status httpd คำสั่งในการเช็คว่าทำงานรึยัง
จากนั้น นำ ip เช็คที่หน้า webbrowser ด้วยการ ใส่ ip address
ใช้คำสั่ง yum install mariadb-server
เมื่อติดตั้งเสร็จ ใช้คำสั่ง systemctl start mariadb เป็นคำสั่งเริ่มต้นใช้งาน
systemctl enable mariadb เป็นคำสั่งเปิดใช้งาน
systemctl status mariadb คำสั่งในการเช็คว่าทำงานรึยัง
mysql -u root -p คำสั่ง login เข้าไปในฐานข้อมูล "ครั้งแรกที่ล็อคอินเข้าจะไม่มี password"
คำสั่ง show databases; เพื่อแสดงฐานข้อมูล หากต้องการออกให้ใช้คำสั่ง \q
mysql_sacure_installation คำสั่งติดตั้ง password ให้กับ root
ใช้คำสั่ง yum install php php-mysql* เพื่อเพิ่มแพคเกจเสริม
ให้ restart server ใช้คำสั่ง systemctl restart httpd
how to test ให้ค้นหา w3school php connect to mysql นำตัวอย่างโค้ดมาใส่ที่
cd /var/www/html/
สร้างไฟล์.php ใน vi เช่น vi ชื่อไฟล์.php เมื่อเข้าไปที่ vi แล้ว ให้ใส่โค้ด แล้วทดสอบด้วยการ เข้าไปที่ webbrowser ใส่เลข ip เครื่อง / ชื่อไฟล์.php
systemctl stop firewalld
systemctl disable firewalld
systemctl mask –now firewalld
ตรวจสอบว่า Firewall ถูกปิดไปหรือยัง
systemctl status firewalld
คำสั่ง root centos
http://www.doanytech.com/add-create-a-sudo-user-for-centos-8/
คำสั่ง vi
https://secure.jvh.co.th/index.php/knowledgebase/36/Linux-Server-CentOS
สอนติดตั้ง LAMP Stack
https://www.youtube.com/watch?v=cd4gFDQQMDE
Linux commands VI
https://medium.com/@pratya.yeekhaday/linux-vi-command-69bfd522fff
คำสั่ง PHP
https://www.w3schools.com/php/default.asp