标签:nts margin 方便 开机 mil pad ica com 设置
未设置开机自启时,每次都会执行命令如下:
redis-server /usr/local/redis-5.0.5/redis.conf
你需要.plist文件来指定需要开机启动的程序。首先来创建一个.plist文件:
sudo vim /Library/LaunchDaemons/io.redis.redis-server.plist
以下是开机启动的.plist配置文件的示例:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>io.redis.redis-server</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/redis-server</string> <string>/usr/local/redis-5.0.5/redis.conf</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
sudo launchctl load /Library/LaunchDaemons/io.redis.redis-server.plist
alias redisstop=‘sudo launchctl stop io.redis.redis-server‘
参考地址:https://www.cnblogs.com/duhuo/p/4260739.html
标签:nts margin 方便 开机 mil pad ica com 设置
原文地址:https://www.cnblogs.com/wanghaokun/p/12268136.html