找回密码
 注册
查看: 3945|回复: 0

编译安装的etcd服务加入开机启动service文件配置

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2018-9-20 10:59:17 | 显示全部楼层 |阅读模式
vim /usr/lib/systemd/system/etcd.service) e  C# q, L5 K5 J% z' T3 i
[Unit]
! O7 Y3 L3 k2 XDescription=Etcd Server
+ K# e' ?  b, h( |+ gAfter=network.target$ G! W8 I7 u  |* n. O. E% a

/ d3 C6 k' b  B$ a$ K6 ^. R7 b$ j! @[Service]6 G$ s1 |' |/ f/ o
Type=simple1 u& F0 n, K5 t& c5 D
WorkingDirectory=/var/lib/etcd/& Y+ ?8 m+ V1 ~( g9 w
EnvironmentFile=-/etc/etcd/etcd.conf7 I) y  u; o8 f- w, ]
ExecStart=/usr/bin/etcd
  ^) l. U9 n% U, u: I
0 r- C- g3 ?0 P3 v( C[Install]
6 w9 y# F/ n- W0 uWantedBy=multi-user.target
8 m+ B! f! n. O& u- F3 W. n. I/ A8 O. t
启动服务,并设置开机启动; }/ x( W1 L5 r9 z8 T# v* g
systemctl daemon-reload " Z8 y# v8 ^* T5 _+ j$ O3 u0 C
systemctl start etcd.service 1 \4 @6 c( f" J& p
systemctl enable etcd.service
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:55 , Processed in 0.017615 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表