多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 一、/proc/sys/net/core/somaxconn is set to the lower value of 128 `net.core.somaxconn = 1024`添加到`/etc/sysctl.conf`中,然后执行`sysctl -p`生效配置; ## 二、overcommit_memory is set to 0 `vm.overcommit_memory = 1`添加到`/etc/sysctl.conf`中,然后执行`sysctl -p`生效配置; ## 三、开机自动启动配置 编写一个脚本`autostart.sh`: ``` ps=`ps -efl|grep redis|grep -v $0|grep -v grep|wc -l` if [ $ps -eq 0 ]; then echo -e "\n$(date '+%Y-%m-%d %H:%M:%S') start " /usr/lib/app/redis/bin/redis-server /usr/lib/app/redis/redis.conf & echo "$(date '+%Y-%m-%d %H:%M:%S') done" else echo $(date +%F%n%T) "redis正在运行..." exit 0; fi ``` ``` chmod +x ``` 脚本`autostart.sh`加入开机自动重启即可: