有些时候我们需要在服务器里设置一个脚本,让他一开机就自己启动。方法如下: cd /etc/init.d vi youshell.sh #将youshell.sh修改为你自己的脚本名 编写自己的脚本后保存退出。 在编写脚本的时候,请先加入以下注释 #add for chkconfig #chkconf...
分类:
其他好文 时间:
2015-07-27 07:02:18
阅读次数:
160
编写脚本 1,vi?/etc/init.d/nginx #!/bin/sh? # nginx - this script starts and stops the nginx daemon? #? # chkconfig: - 85 15? # description: Nginx is an HTTP(S) server, HTTP(S) reverse? # pr...
分类:
其他好文 时间:
2015-07-25 20:13:46
阅读次数:
152
1、安装 使用chkconfig --list查看系统是否已经安装有vsftpd服务,若有,跳过此步骤。 使用yum命令直接安装,并为塔创建日志文件 [root@iZ23o5qv2ozZ?/]#?yum?-y?install?vsftpd ......
[root@iZ23o5qv2o...
分类:
其他好文 时间:
2015-07-25 15:24:52
阅读次数:
206
编写shell脚本vi /etc/init.d/nginx#!/bin/sh # # nginx - this script starts and stops the nginx daemon # # chkconfig: - 85 15 # description: Nginx...
分类:
其他好文 时间:
2015-07-24 06:49:22
阅读次数:
147
service iptables status可以查看到iptables服务的当前状态。但是即使服务运行了,防火墙也不一定起作用,你还得看防火墙规则的设置 iptables -L在此说一下关于启动和关闭防火墙的命令:1) 重启后生效开启: chkconfig iptables on关闭: chkco...
分类:
系统相关 时间:
2015-07-22 20:14:28
阅读次数:
148
一、vsftp安装篇 复制代码代码如下: # 安装vsftpd yum -y install vsftpd # 启动 service vsftpd start # 开启启动 chkconfig vsftpd on 二、vsftp相关命令之服务篇 复制代码代码如下: # 启动ftp服务 service vs...
分类:
其他好文 时间:
2015-07-22 14:53:13
阅读次数:
104
The chkconfig command can also be used to activate and deactivate services. The chkconfig --list command displays a list of system services and whethe...
分类:
其他好文 时间:
2015-07-22 01:34:16
阅读次数:
101
#安装需要的包,有依赖关系,自动帮你解决yum install httpd mysql mysql-server php php-gd php-mbstring php-mysql #启动httpdservice httpd start#设为开机启动chkconfig httpd on #启动mys...
分类:
数据库 时间:
2015-07-21 23:44:47
阅读次数:
149
1.yum -y samba 2.chkconfig --level 35 smb on 3./etc/init.d/smb start 服务名称为smb 4. /etc/selinux/config 关闭selinux disabled 5.vi /etc/sam...
分类:
其他好文 时间:
2015-07-21 23:38:02
阅读次数:
112