เปิดปิด service บน Debian Ubuntu ด้วย sysvconfig
สำหรับใครที่เคยเล่นลีนุกซ์ตระกูล Red Hat เวลาเปิดปิด service มักจะเคยชินกับการใช้คำสั่ง service เช่น service httpd start | stop | restart พอเปลี่ยนมาใช้ Debian และ Ubuntu มันไม่มีคำสั่งนี้ให้ใช้ เราต้องมาใช้
/etc/init.d/{ชื่อ service} | start | stop | restart
ในการระบุให้ service เปิดตอนบูทก็เช่นกันบนลีนุกซ์ตระกูล Red Hat ใช้ ntsyv หรือ chkconfig บน Debian และ Ubuntu ใช้ rcconf
ใครที่คุ้นเคยอยู่กับลีนุกซ์ตระกูล Red Hat ก็สามารถใช้คำสั่ง service ได้บน Debian และ Ubuntu ได้แล้วนะครับ เมื่อได้ติดตั้ง sysvconfig
root@sothorn:~# apt-get install sysvconfig
โปรแกรมนี้ช่วยอำนวยความสะดวกดังนี้
- Enable or disable services.
- Edit individual links.
- Restore from backup file if you make a mistake.
- Menu or command line interface.
- View all services, each with its status and a brief description.
ถ้าเรียกใช้งานคำสั่ง
root@sothorn:~# sysvconfig
ก็จะได้หน้าตาโปรแกรมแบบนี้
ที่สำคัญใครที่เคยชินกับ Red Hat ก็ใช้คำสั่ง service ได้
root@sothorn:~# service mysql restart
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
ที่มา : cyberciti.biz







