PHP速学视频免费教程(入门到精通)
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
redis在centos7中的开机自启
在系统服务目录里创建redis.service文件
vi /etc/systemd/system/redis.service
写入以下内容:
[Unit]
Description=redis-server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/bin/redis.conf (这里填写你redis的配置文件所在的路径)
PrivateTmp=true
[Install]
WantedBy=multi-user.target
测试并加入开机自启
先关闭redis-server
systemctl stop redis.service
开启redis-server
systemctl start redis.service #如果服务是开启状态,使用此命令会启动 失败。
开启成功,将服务加入开机自启
systemctl enable redis.service #注意后面不能跟空格
reboot #重启
查看服务运行状态:systemctl status redis.service
全部命令
systemctl start redis.service #启动redis服务
systemctl enable redis.service #设置开机自启动
systemctl disable redis.service #停止开机自启动
systemctl status redis.service #查看服务当前状态
systemctl restart redis.service #重新启动服务
systemctl list-units –type=service #查看所有已启动的服务
备注:上面的方式不仅仅适用于redis,也适用于其他的服务部署
已抢5911个
抢已抢83543个
抢已抢13561个
抢已抢48002个
抢已抢182609个
抢已抢84054个
抢