GORAGOD.com

GORAGOD.com

freelance, web developer, web designer, hosting, domain name

คำสั่งพื้นฐานของ Server CenOS

รวบรวมคำสั่งพื้นฐานของ CenOS ที่ใช้บ่อยๆนะครับ
1. เปลี่ยน Password ของ root
passwd root

เมื่อเรียกคำสั่งนี้ให้กรอกรหัสผ่านใหม่ สองครั้งครับ

2. start, stop หรือ restart MySQL
# ปิด MySql
/etc/init.d/mysqld stop
# เปิด MySql
/etc/init.d/mysqld start
# รีสตาร์ท MySql
/etc/init.d/mysqld restart

เราควร เริ่ม MySQL ใหม่ทุกครั้งที่มีการแก้ไขค่ากำหนดของ MySQL นะครับ

3. start, stop หรือ restart Apache
# ปิด Apache
service httpd stop
# เปิด Apache
service httpd start
# รีสตาร์ท Apache
service httpd restart

เมื่อมีการแก้ไขการตั้งค่าใดๆของ Server ควรสั่งรีสตาร์ท Apache ทุกครั้ง

4. ตรวจสอบว่ามี Process อะไรทำงานอยู่บ้าง
ps -ef|grep httpd

เราสามารถใช้คำสั่ง ps ได้ครับ ตามตัวอย่างด้านบนเป็นการตรวจสอบ Process ของ httpd
0SHAREFacebookLINE it!
^