linux设置开机启动方法
linux设置开机启动方法:
1.切换到root用户2.vi /etc/rc.d/rc.local
增加要执行的命令,
比如redis,将启动命令加入到文件中并保存,这样在下次开启启动时就生效了
#!/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 redis-server /usr/local/redis/etc/redis.conf
3.如果希望立刻执行,则执行/etc/rc.d/rc.local即可。
[root@localhost ~]# /etc/rc.d/rc.local
相关推荐
MRFENGG 2020-11-11
rainandtear 2020-10-30
王道革 2020-11-25
wangdonghello 2020-11-03
Langeldep 2020-11-16
chenhualong0 2020-11-16
聚合室 2020-11-16
koushr 2020-11-12
guoyanga 2020-11-10
fackyou00 2020-11-10
Orangesss 2020-11-03
dongCSDN 2020-10-31
Quietboy 2020-10-30
liuyulong 2020-10-29
fansili 2020-10-29
温攀峰 2020-10-23
jackbon 2020-10-19
kaixinfelix 2020-10-04