重启后不会随系统一起启动
来源:4-3 应用服务化
____xyz
2021-07-17 00:04:04
问题描述:
老师好,这里问题出在哪啊,重启提示这个错误
[/usr/lib/systemd/system/redis.service:12] Unknown lvalue 'WanteBy' in section 'Install'
[Unit]
Description=Redis
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
PIDFile=/run/redis_6379.pid
ExecStart=/usr/local/redis-4.0.14/src/redis-server /usr/local/redis-4.0.14/redis.conf
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WanteBy=multi-user.target
~
~
~
2回答
禾子飞
2021-09-22
WantedBy, 不是WanteBy, 就会自动创建软链接, 不需要再手动创建
____xyz
提问者
2021-07-17
老师好,我百度找到答案了,由于我的没有进行自动创建软连接,要手动创建,暂时不用帮忙了哈
手动创建软连接
ln -s /lib/systemd/system/redis.service /etc/systemd/system/multi-user.target.wants/redis.service
创建之后再重新运行随自动开启,就解决了
相似问题