标签:ted running sysconfig targe conf change port emd echo
[root@izbp18dv3a3metugyd02qxz bin]# rpm -qa | grep memcache [root@izbp18dv3a3metugyd02qxz bin]# yum list installed |grep memcache [root@izbp18dv3a3metugyd02qxz bin]# yum clean all [root@izbp18dv3a3metugyd02qxz bin]# yum -y update [root@izbp18dv3a3metugyd02qxz bin]# echo $? [root@izbp18dv3a3metugyd02qxz bin]# yum list |grep memcached [root@izbp18dv3a3metugyd02qxz bin]# yum -y install memcached [root@izbp18dv3a3metugyd02qxz bin]# locate memcached.service [root@izbp18dv3a3metugyd02qxz bin]# updatedb [root@izbp18dv3a3metugyd02qxz bin]# locate memcached.service /usr/lib/systemd/system/memcached.service [root@izbp18dv3a3metugyd02qxz bin]# ll /etc/sysconfig/memcached -rw-r--r-- 1 root root 88 Nov 12 22:30 /etc/sysconfig/memcached [root@izbp18dv3a3metugyd02qxz bin]# vim /usr/lib/systemd/system/memcached.service ExecStart=/usr/bin/memcached -l $HOST -u $USER -p $PORT -m $CACHESIZE -c $MAXCONN $OPTIONS
[root@izbp18dv3a3metugyd02qxz bin]# cat /usr/lib/systemd/system/memcached.service
[Unit]
Description=Memcached
Before=httpd.service
After=network.target
[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/memcached
ExecStart=/usr/bin/memcached -l $HOST -u $USER -p $PORT -m $CACHESIZE -c $MAXCONN $OPTIONS
[Install]
WantedBy=multi-user.target
[root@izbp18dv3a3metugyd02qxz bin]# vim /etc/sysconfig/memcached HOST="127.0.0.1"
[root@izbp18dv3a3metugyd02qxz bin]# cat /etc/sysconfig/memcached
PORT="11211"
HOST="127.0.0.1"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""
[root@izbp18dv3a3metugyd02qxz bin]# systemctl restart memcached [root@VM_58_118_centos ~]# systemctl restart memcached Warning: memcached.service changed on disk. Run ‘systemctl daemon-reload‘ to reload units. [root@VM_58_118_centos ~]# systemctl daemon-reload [root@izbp18dv3a3metugyd02qxz bin]# systemctl restart memcached [root@izbp18dv3a3metugyd02qxz bin]# systemctl status memcached ● memcached.service - Memcached Loaded: loaded (/usr/lib/systemd/system/memcached.service; disabled; vendor preset: disabled) Active: active (running) since Tue 2019-11-12 22:34:07 CST; 7s ago Main PID: 19329 (memcached) CGroup: /system.slice/memcached.service └─19329 /usr/bin/memcached -u memcached -p 11211 -m 64 -c 1024 Nov 12 22:34:07 izbp18dv3a3metugyd02qxz systemd[1]: Started Memcached.
标签:ted running sysconfig targe conf change port emd echo
原文地址:https://www.cnblogs.com/hnhycnlc888/p/12030680.html