#redis 安装命令

redis 安装命令

cd /usr/local
sudo wget http://download.redis.io/releases/redis-4.0.11.tar.gz
sudo tar xf redis-4.0.11.tar.gz
sudo mv redis-4.0.11 redis
cd redis/
sudo make
sudo ln -s /usr/local/redis/src/redis-cli /usr/local/bin/
sudo ln -s /usr/local/redis/src/redis-server /usr/local/bin/
echo 'alias redis_start="/usr/local/bin/redis-server /usr/local/redis/redis.conf"' >> ~/.bashrc


cd /usr/local/php/include/php/ext/
sudo wget https://github.com/phpredis/phpredis/archive/4.3.0.tar.gz
sudo tar xf 4.3.0.tar.gz
cd phpredis-4.3.0/
sudo phpize
sudo ./configure --with-php-config=/usr/local/php/bin/php-config
sudo make
sudo make install
posted @ 2019-06-15 19:43  roverliang  阅读(255)  评论(0编辑  收藏  举报