`

linux service命令

 
阅读更多

ervice命令,顾名思义,就是用于管理Linux操作系统中服务的命令。

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

分享到:
评论

相关推荐

    service命令 安装包

    centos 7.4 service 命令rpm安装包,centos 7.4 service 命令rpm安装包,centos 7.4 service 命令rpm安装包,centos 7.4 service 命令rpm安装包,

    Linux下常用命令及服务

    Linux下常用命令及服务,just ok!

    linux常用命令

    linux 在secCRT下常用命令 linux命令

    linux常用命令大全.pptx

    此文档格式为ppt格式,支持下载,主要从linux常用的基础命令入手,包含cat、more、ps、touch、rmdir等命令,帮助初学者来学习linux。

    osx-service-cmd:像OSX一样Linux'service'命令

    它为OSX提供类似linux的service命令 安装 git clone https://github.com/nobutakaoshiro/osx-service-cmd.git cd osx-service-cmd # Install 'service' command to /usr/local/bin ./install.sh # Add /usr/local/...

    Linux教程,主要内容:Linux 命令、Linux 系统运维、软件运维、精选常用Shell脚本.zip

    linux教程: 查看 Linux 命令帮助信息 - 关键词:help, whatis, info, which, where...Linux 系统管理 - 关键词:reboot, exit, shutdown, date, mount, umount, ps, kill, systemctl, service, crontab Linux 网络管理

    linux 常用命令

    scp 、chmod 、service 等linux常用命令

    详解Linux 服务管理两种方式service和systemctl

    1.service命令 service命令其实是去/etc/init.d目录下,去执行相关程序 # service命令启动redis脚本 service redis start # 直接启动redis脚本 /etc/init.d/redis start # 开机自启动 update-rc.d redis defaults ...

    常用Linux命令 防火墙 数据库 页面缓存

    常用Linux命令 Linux释放内存 磁盘空间使用情况 内存使用情况 配置MySQL 远程登录 修改密码 服务是否开机启动:# systemctl enable/disable 服务名字 查看服务是否开机启动:systemctl is-enabled postfix.service;...

    linux 服务器 安装及操作常用命令

    自己总结的,这是安装调试服务器用的 。linux服务器操作常用的

    在linux下_利用gSoap开发Web_Service_CC++客户端-good.

    在linux下_利用gSoap开发Web_Service_CC++客户端-good.

    linux命令(网络管理)1

    (网络接口可以使用service命令进行重启,关闭,开启操作||||ifup/ifdown效果同前)在linux中网络接口(网卡)用ethX表示 X为0,1,2

    linux命令.txt

    注册、启动service,应用程序提升权限,压缩解压tar, 打开,关闭防火墙,远程拷贝,修改系统日期,时间,deb文件安装, rpm文件安装,抓包命令,设置网络地址等

    Linux应用技术:Linux服务管理.pptx

    服务的启动与停止——使用service命令;服务的启动与停止——使用service命令;受xinetd管理的服务;xinetd;配置服务的启动状态;配置服务的启动状态;配置服务的启动状态;配置服务的启动状态;配置服务的启动状态

    linux操作命令

    重启网卡:使用命令: service network restart export LANG=en_US 在MySQL中建立用户口令数据库 [root@CentOS5 /]#mysql –u root –p Enter password:我的密码 mysql&gt; create database wwwwhyccn; #建立虚拟用户...

    在Linux中利用Service启动、停止jar,配置开机自启

    #description: test service .... LANG=en_US.UTF-8 #设置编码utf-8 export LANG export JAVA_HOME=/usr/java/jdk1.8.0_231-amd64 export JRE_HOME=/$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar

    Linux系统NFS服务器的配置方法

    一、NFS服务器的安装 检查linux系统中是否安装了nfs-utils和portmap两个软件包(RHEL4系统默认已经安装了这两个软件包) 命令#rpm –q nfs-utils portmap 二、查看NFS服务器是否启动 命令#service nfs starus #...

    Linux常用的命令。。。。。

    -exec(前面的结果相当于后面命令的输入) 连接前后命令 相当于管道符 eg. find / -user username –exec cp [参数] {} /directory \; vim .bash_profile 环境变量文件 bios mbr boot lo(grub.conf 在开机时识别...

    linux命令行小结

    关闭: /sbin/service iptables stop --Linux命令行关闭防火墙 即时生效,重启后失效 2./etc/init.d/iptables stop chkconfig --level 35 iptables off --Linux命令行永久关闭防火墙 重启后生效 开启: ...

    Linux常用命令以及使用样例.pdf

    # 替换所有行的内容: :%s/from/to/g :%s/from/to/g : 对所有行的内容进行替换。 # 关闭防火墙 service iptables stop # 查看目录下有多少个文件 find -type -f|wc -l # 平均负载过高

Global site tag (gtag.js) - Google Analytics