Skip to content

Instantly share code, notes, and snippets.

@pbolduc
Forked from nghuuphuoc/1) Install
Last active July 3, 2023 09:39
Show Gist options
  • Save pbolduc/e7a7e5559d01c4f500cc2ea4e9baf817 to your computer and use it in GitHub Desktop.
Save pbolduc/e7a7e5559d01c4f500cc2ea4e9baf817 to your computer and use it in GitHub Desktop.
Install redis on CentOS 7
# see How to Install Redis Server on CentOS 7 - http://linoxide.com/storage/install-redis-server-centos-7/
# --- Compiling ---
$ yum install gcc make tcl
$ REDIS_VER=3.2.3
$ wget http://download.redis.io/releases/redis-$REDIS_VER.tar.gz
$ tar xzvf redis-$REDIS_VER.tar.gz
$ cd redis-$REDIS_VER
$ make
$ make test
$ make install
// --- Installing ---
$ cd src
$ cp redis-server redis-cli /usr/local/bin
$ cp redis-sentinel redis-benchmark redis-check-aof redis-check-dump /usr/local/bin
$ mkdir /etc/redis
$ mkdir -p /var/lib/redis/6379
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$ yum --enablerepo=remi,remi-test install redis
$ sudo nano /etc/sysctl.conf
vm.overcommit_memory=1
$ sysctl vm.overcommit_memory=1
$ sysctl -w fs.file-max=100000
$ chkconfig --add redis
$ chkconfig --level 345 redis on
$ service redis start/stop/restart
@bevancoleman
Copy link

Are the "Service commands" meant to be;
$ chkconfig --add redis_6379
$ chkconfig --level 345 redis_6379 on
$ service redis_6379 start/stop/restart

Copy link

ghost commented Apr 18, 2017

@bevancoleman assuming you set everything up for multiple redis instances, I believe the answer is yes. The linked tutorial is making the assumption of that setup (which seems ideal). Worth noting, there's a server installation script after you download redis located in /utils/install_server.sh you can use, and it will set those defaults for you and starting the server automatically. At which point if you type chkconfig you will see redis_6379 output from the command.

@WillShek
Copy link

good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment