Last active
November 20, 2017 00:59
-
-
Save lorne-luo/a0e6cf0ec86840b001f819fd15d4dfdd to your computer and use it in GitHub Desktop.
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
| # properly install redis follow official doc on centos | |
| # https://redis.io/topics/quickstart#installing-redis-more-properly | |
| wget http://download.redis.io/redis-stable.tar.gz | |
| tar xvzf redis-stable.tar.gz | |
| cd redis-stable | |
| make | |
| sudo cp src/redis-server /usr/local/bin/ | |
| sudo cp src/redis-cli /usr/local/bin/ | |
| sudo mkdir /etc/redis | |
| sudo mkdir /var/redis | |
| sudo cp utils/redis_init_script /etc/init.d/redis_6379 | |
| sudo cp redis.conf /etc/redis/6379.conf | |
| sudo mkdir /var/redis/6379 | |
| sudo vi /etc/redis/6379.conf | |
| echo " Set daemonize to yes (by default it is set to no)." | |
| echo " Set the pidfile to /var/run/redis_6379.pid (modify the port if needed)." | |
| echo " Change the port accordingly. In our example it is not needed as the default port is already 6379." | |
| echo " Set your preferred loglevel." | |
| echo " Set the dir to /var/redis/6379 (very important step)" | |
| echo " add `# chkconfig: 2345 85 15` into /etc/init.d/redis_6379" | |
| chkconfig --add redis_6379 | |
| chkconfig --level 2345 redis_6379 on | |
| chkconfig --list redis_6379 | |
| sudo /etc/init.d/redis_6379 start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment