|
|
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 |
|