之前很少搞过这块,以为直接复制个redis.so过来就行了,应该是版本不对,所以报错了,其实正确的姿势应该如下:
一、安装redis
大部分按照http://blog.youkuaiyun.com/ludonqin/article/details/47211109这个里面的方法就可以了,需要注意几个问题
1、redis已经给我们写好了启动脚本,只需要稍微修改就能用了
拷贝解压包下utils下redis启动脚本至/etc/init.d/
cp redis_init_script /etc/init.d/
2、 设置自启动时候如果报错需要添加的红框中的内容确实需要加上#,这个不是注释
二、安装PHPredis扩展
大部分按照http://blog.youkuaiyun.com/vboy1010/article/details/7756508,需要注意几个问题:
1、phpredis的地址如下:
如果服务器没装Git客户端下载到客户机上再传上去吧
https://github.com/phpredis/phpredis
三、阿里云管理服务器脚本
nginx:
/etc/init.d/nginx start/stop/restart/reload)
apache:
/etc/init.d/httpd start/stop/restart/...
mysql:
/etc/init.d/mysqld start/stop/restart/...
php-fpm:
/etc/init.d/php-fpm start/stop/restart/...
ftp:
/etc/init.d/vsftpd start/stop/restart/...
比如启动nginx:
/etc/init.d/nginx start