一片冰心在玉壶

那时我们有梦,关于文学,关于爱情,关于穿越世界的旅行, 如今我们深夜饮酒,杯子碰到一起,都是梦破碎的声音. 交往都是初逢,爱情都在心里,往事都在梦中, 希望都带着注释,信仰都带着呻吟. 总有善意的光逃避现世的繁琐而寻找片刻的安宁, 也许,就是你凝视这里的眼睛

博客园 首页 联系 订阅 管理

因为ubuntu18已经没有用rc.local,因为日常用的习惯所以我们下面进行创建

1.创建rc.local软链接(因为system只会读取/etc/systemd/system下的文件)

ln -fs /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service

2.修改/lib/systemd/system/rc-local.service文件

[Install]
WantedBy=multi-user.target #运行级别
Alias=rc-local.service

3.创建rc.local

 

 

touch /etc/rc.local
chmod 755 /etc/rc.local #添加权限

 

4. vi  /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
 
cd /opt/phphome/zdtp
./zdtpServer &
cd /opt/phphome/pm1
./pm1Server &
cd /opt/phphome/beijing
./BJServer &
exit 0
posted on 2021-11-09 09:56  Sankye  阅读(450)  评论(0编辑  收藏  举报