1.不是在所有linux發行版本中都有。主要是在redhat、fedora、mandriva和centos中。
2. 命令位於/sbin目錄下,用file命令查看此命令會發現它是一個腳本命令。
3. 分析腳本中命令,主要作用是去/etc/init.d目錄下尋找相應的服務,進行開啓和關閉等操作。
4. 開啓httpd服務器:service httpd start
start可以換成restart表示重新啓動,stop表示關閉,reload表示重新載入配置。
5. 關閉mysql服務器:service mysqld stop
6. 強烈建議大家將service命令替換爲/etc/init.d/mysqld stop (因爲有一些linux的版本不支持service)
Usage: service < option > | --status-all | [ service_name [ command | --full-restart ] ]
service oracle start
service oracle stop
service oracle restart
service oracle status