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 .gz tar -zxf redis-2.2.13. tar .gz cd redis-2.2.13 make sudo make install |
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-server
wget https:
//github
.com
/ijonas/dotfiles/raw/master/etc/redis
.conf
sudo mv redis-server
/etc/init
.d
/redis-server
sudo chmod +x
/etc/init
.d
/redis-server
sudo 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 |
sudo update-rc.d redis-server defaults |
5. Start Redis
1 |
sudo /etc/init .d /redis-server start |
6. Verify the Startup success
123 |
ps -ef | grep redis redis 9544 1 0 21:06 ? 00:00:00 /usr/local/bin/redis-server /etc/redis .conf hadoop 9549 7429 0 21:06 pts /3 00:00:00 grep --color=auto redis |
7. Starting Client Clients
1234567 |
redis-cli
redis 127.0.0.1:6379> help
redis-cli 2.6.14
Type: "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