-
-
Save mannerisman/f1009c6bd4c035e04e47d04bc03a4f05 to your computer and use it in GitHub Desktop.
Install redis on CentOS 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // see | |
| // --- Compiling --- | |
| ```bash | |
| $ yum install gcc make | |
| $ 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 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sudo nano /etc/sysctl.conf | |
| vm.overcommit_memory=1 | |
| $ sysctl vm.overcommit_memory=1 | |
| $ sysctl -w fs.file-max=100000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ chkconfig --add redis | |
| $ chkconfig --level 345 redis on | |
| $ service redis start/stop/restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment