让vsftpd开机的时候能自动运行

下面我们来介绍三种方法,让vsftpd开机的时候能自动运行,下面我们进行详细的说明。

1、使用chkconfig

[root@localhost ~]# chkconfig --level 35 vsftpd on
[root@localhost ~]# chkconfig --list | grep vsftpd
vsftpd          0:关闭  1:关闭  2:关闭  3:启用  4:关闭  5:启用  6:关闭

这样,vsftpd就在级别3和级别5上面运行啦!

2、修改/etc/rc.local文件,加入/etc/rc.d/init.d/vsftpd start这行。

[root@localhost ~]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/etc/rc.d/init.d/vsftpd start

3、修改/etc/rc.local文件,加入/etc/rc.d/init.d/vsftpd start这行。

[root@localhost ~]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/etc/rc.d/init.d/vsftpd start

以上三种方法的介绍,修改完成之后,重新启动服务器。

[root@localhost ~]# reboot

Broadcast message from root@localhost.localdomain
        (/dev/pts/0) at 16:09 ...

The system is going down for reboot NOW!

重新查看vsftpd的运行状态

[root@localhost ~]# service vsftpd status
vsftpd (pid 1749) 正在运行...

系统显示vsftpd正在运行,至此已经实现vsftpd随linux系统自动启动服务啦!

另外再介绍两种图形化的设置方法

使用ntsysv命令

[root@localhost ~]# ntsysv

找到vsftpd,将前面选项中打“*”,然后确定即可。

如何让vsftpd开机的时候自动运行?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值