环境:CentOS Linux release 7.9.2009 (Core)
oswbb732.tar
安装包解压缩直接可用
tar xf oswbb732.tar -C /home/oracle/script/
服务自起配置:
vi /etc/systemd/system/oswbb.service
[Unit]
Description=oswbb
After=network.target
[Service]
Type=forking
ExecStart=/home/oracle/script/oswbb/startOSWbb.sh 15 168 NONE /home/oracle/script/oswbb/archive
ExecStop=/home/oracle/script/oswbb/stopOSWbb.sh
PrivateTmp=true
[Install]
WantedBy=multi-user.target
重新加载systemctl
systemctl daemon-reload
设置开机自启动
systemctl enable oswbb
至此自动服务器配置完成。
如上配置后,启动会有报错:
解决:
再/home/oracle/script/oswbb安装目录中找到如下文件,增加如图命令
startOSWbb.sh
修改完成启动
systemctl status oswbb结果如下: