分类: 系统运维
2015-06-29 22:57:16
实验:启动服务httpd与telnet
1、判断是临时服务还是独立服务
[root@localhost ~]# rpm -ql httpd |grep init
/etc/rc.d/init.d/httpd (独立服务目录)
[root@localhost ~]# rpm -ql telnet-server |grep xinetd
/etc/xinetd.d/telnet (临时服务目录)
2、启动服务
启动独立服务
1)[root@localhost ~]# service httpd start
启动 httpd: [确定]
[root@localhost ~]# service httpd status
httpd (pid 7822) 正在运行...
2)[root@localhost ~]# /etc/init.d/httpd start
启动 httpd:
[root@localhost ~]# /etc/init.d/httpd status
httpd (pid 7822) 正在运行...
[root@localhost ~]# chkconfig --list httpd (确保服务跟随服务器启动而启动)
httpd 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭
[root@localhost ~]# chkconfig --level 35 httpd on
[root@localhost ~]# chkconfig --list httpd
httpd 0:关闭 1:关闭 2:关闭 3:启用 4:关闭 5:启用 6:关闭
启动临时服务
[root@localhost ~]# chkconfig --list telnet
telnet 关闭
[root@localhost ~]# chkconfig telnet on
[root@localhost ~]# chkconfig --list telnet
telnet 启用
[root@localhost ~]# service xinetd restart (确保临时服务已启用)
停止 xinetd: [失败]
启动 xinetd: