Ubuntu System Installation Configuration Redis
Redis is a NoSQL database, and Redis is very efficient in scenarios where the data needs to be updated frequently and where the data has a wide range of access hotspots.
The installation process for Redis is described below, as shown in the following steps.
1. Download and install
| 12345 |
wget http://redis.googlecode.com/files/redis-2.2.13.tar.gztar-zxf redis-2.2.13.tar.gzcd redis-2.2.13makesudo makeinstall |
The Redis executable is then placed in the/usr/local/bin.
2. Download the configuration file and Init startup script
| 12345 |
wget https://github.com/ijonas/dotfiles/raw/master/etc/init.d/redis-serverwget https://github.com/ijonas/dotfiles/raw/master/etc/redis.confsudo mv redis-server /etc/init.d/redis-serversudo chmod +x /etc/init.d/redis-serversudo mv redis.conf /etc/redis.conf |
3. Initialize user and log path
Before you start Redis for the first time, it is recommended that you create a separate user for Redis and create a new data and log folder.
| 12345 |
sudo useradd redis sudo mkdir -p /var/lib/redis sudo mkdir -p /var/log/redis sudo chown redis.redis /var/lib/redis sudo chown redis.redis /var/log/redis |
4, set the boot automatically start, shut down automatically
| 1 |
sudoupdate-rc.d redis-server defaults |
5. Start Redis
| 1 |
sudo/etc/init.d/redis-serverstart |
6. Verify the Startup success
| 123 |
ps-ef | grep redisredis 9544 1 0 21:06 ? 00:00:00 /usr/local/bin/redis-server /etc/redis.confhadoop 9549 7429 0 21:06 pts/3 00:00:00 grep--color=auto redis |
7. Starting Client Clients
| 1234567 |
redis-cliredis 127.0.0.1:6379> helpredis-cli 2.6.14Type: "help @<group>" to get a list of commands in <group> "help <command>" for help on <command> "help <tab>" to get a list of possible help topics "quit" to exit |
Ubuntu System Installation Configuration Redis