-
linux设开机自启动服务1. 把启动命令放到/etc/rc.local中,编辑:/etc/rc.local文件如下:可以添加直接服务启动,也可以添加SHELL脚本bash /etc/init.d/webstart startbash /etc/init.d/redis以上运行的程序都是以root权限来执行的。如果某些程序要以某个用户的身份去运行,那么可以这样:su show -c /home/show/server/tomcat/bin/startup.sh2. chkconfig命令[root@localhost ~]# chkconfig –list 显示开机可以自动启动的服务[root@localhost ~]# chkconfig –add *** 添加开机自动启动***服务[root@localhost ~]# chkconfig –del *** 删除开机自动启动***服务