-
yum -y install wget
-
cd /home/software
-
wget https://download.redis.io/releases/redis-6.0.9.tar.gz
-
tar -zxvf redis-6.0.9.tar.gz
-
cd redis-6.0.9
-
yum -y install gcc
-
make && make install PREFIX=/usr/local/redis
-
如果报以下错误
struct redisServer没有名为XXXX的成员
升级gcc
yum -y install centos-release-scl yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils scl enable devtoolset-9 bash
- 执行make test出错解决方案
[root@localhost redis-6.0.6]# yum install tcl [root@localhost redis-6.0.6]# make test
-
vim /etc/profile
export REDIS_HOME=/usr/local/redis export PATH=$PATH:$REDIS_HOME/bin
-
source /etc/profile
-
cd /home/software/redis-6.0.9/utils
-
./install_server.sh (可以执行一次或多次)
运行脚本install_server.sh可能会报如下错误:This systems seems to use systemd. Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!
打开install_server.sh,注释掉下面的内容:
#_pid_1_exe="$(readlink -f /proc/1/exe)" #if [ "${_pid_1_exe##*/}" = systemd ] #then # echo "This systems seems to use systemd." # echo "Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!" # exit 1 #fi #unset _pid_1_exe
a) 一个物理机中可以有多个redis实例(进程),通过port区分
b) 可执行程序就一份在目录,但是内存中未来的多个实例需要各自的配置文件,持久化目录等资源
c) service redis_6379 start/stop/stauts > linux /etc/init.d/
d)脚本还会帮你启动! -
ps -ef | grep redis
linux安装redis
最新推荐文章于 2023-12-14 19:55:46 发布