[size=large]Linux在启动时,会自动执行[color=red]/etc/rc.d[/color]目录下的初始化程序,因此我们可以把启动任务放到该目录下:
1、因为其中的[color=blue]rc.local[/color]是在完成所有初始化之后执行,因此我们可以把启动脚本写到里面;
2、用root账号登陆Linux,vi /etc/rc.d/rc.local编辑文件,在最后加入需要执行的脚本程序:su -l [color=blue]$username[/color] -c "/nexus/nexus-2.8.0-05/bin/nexus start"
参考:[url]http://www.php100.com/html/webkaifa/Linux/2008/0526/2780.html[/url][/size]
1、因为其中的[color=blue]rc.local[/color]是在完成所有初始化之后执行,因此我们可以把启动脚本写到里面;
2、用root账号登陆Linux,vi /etc/rc.d/rc.local编辑文件,在最后加入需要执行的脚本程序:su -l [color=blue]$username[/color] -c "/nexus/nexus-2.8.0-05/bin/nexus start"
参考:[url]http://www.php100.com/html/webkaifa/Linux/2008/0526/2780.html[/url][/size]