我已经成功安装了 TeamCity ib CentOS 6.2 Minimal。我一直在尝试在系统启动时自动运行脚本:
/opt/TeamCity/bin/teamcity-server.sh start
Run Code Online (Sandbox Code Playgroud)
我用谷歌搜索并尝试了各种方法,但似乎都失败了。大多数方法都指向将启动脚本添加到 rc.local 文件之一:
/etc/rc.d/rc.local
/etc/rc.local
Run Code Online (Sandbox Code Playgroud)
并且 rc.local 的内容包含以下行:
/opt/TeamCity/bin/teamcity-server.sh start
Run Code Online (Sandbox Code Playgroud)
没有一个会启动teamcity服务器
如果我手动运行脚本没有问题。
看起来很简单,但如何让 shell 脚本自动运行?