[root@localhost opt]# cd redis-5.0.5
[root@localhost redis-5.0.5]# make test
[root@localhost redis-5.0.5]# make
[root@localhost redis-5.0.5]# make install
install
[root@localhost redis-5.0.5]# cd utils
[root@localhost utils]# ll
total 52
-rw-rw-r--. 1 root root 593 May 16 00:07 build-static-symbols.tcl
-rw-rw-r--. 1 root root 1303 May 16 00:07 cluster_fail_time.tcl
-rw-rw-r--. 1 root root 1098 May 16 00:07 corrupt_rdb.c
drwxrwxr-x. 2 root root 60 May 16 00:07 create-cluster
-rwxrwxr-x. 1 root root 2149 May 16 00:07 generate-command-help.rb
drwxrwxr-x. 3 root root 31 May 16 00:07 graphs
drwxrwxr-x. 2 root root 39 May 16 00:07 hashtable
drwxrwxr-x. 2 root root 70 May 16 00:07 hyperloglog
-rwxrwxr-x. 1 root root 9567 May 16 00:07 install_server.sh
drwxrwxr-x. 2 root root 63 May 16 00:07 lru
-rw-rw-r--. 1 root root 1277 May 16 00:07 redis-copy.rb
-rwxrwxr-x. 1 root root 1352 May 16 00:07 redis_init_script
-rwxrwxr-x. 1 root root 1047 May 16 00:07 redis_init_script.tpl
-rw-rw-r--. 1 root root 1762 May 16 00:07 redis-sha1.rb
drwxrwxr-x. 2 root root 135 May 16 00:07 releasetools
-rwxrwxr-x. 1 root root 3787 May 16 00:07 speed-regression.tcl
-rwxrwxr-x. 1 root root 693 May 16 00:07 whatisdoing.sh
[root@localhost utils]# ./install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server
Please select the redis port for this instance: [6379]
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf]
Selected default - /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log]
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379]
Selected default - /var/lib/redis/6379
Please select the redis executable path [/usr/local/bin/redis-server]
Selected config:
Port : 6379
Config file : /etc/redis/6379.conf
Log file : /var/log/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
/var/run/redis_6379.pid exists, process is already running or crashed
Installation successful!
设置开机启动
[root@localhost utils]# chkconfig redis_6379 on
重启
[root@localhost utils]# service redis_6379 restart
安装另外一个实例
[root@localhost utils]# ./install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server
Please select the redis port for this instance: [6379] 2379
Please select the redis config file name [/etc/redis/2379.conf]
Selected default - /etc/redis/2379.conf
Please select the redis log file name [/var/log/redis_2379.log]
Selected default - /var/log/redis_2379.log
Please select the data directory for this instance [/var/lib/redis/2379]
Selected default - /var/lib/redis/2379
Please select the redis executable path [/usr/local/bin/redis-server]
Selected config:
Port : 2379
Config file : /etc/redis/2379.conf
Log file : /var/log/redis_2379.log
Data dir : /var/lib/redis/2379
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/2379.conf => /etc/init.d/redis_2379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!