Ubuntu Install Redis server side
1, enter the following command in the terminal:
sudo apt-get install redis-server after the installation is complete, the Redis server starts automatically and we check the Redis server program.
2, check the Redis server system process,
Input directive: Ps-aux|grep Redis
3. Check Redis server status by starting command.
Input instruction: Netstat-nlt|grep 6379
Using the command-line client to access Redis installation Redis server will automatically install the Redis command-line client program together.
The native Input redis-cli command can be started, and the client program accesses the Redis server.
Input directive: REDIS-CLI
Get the following output:
Redis 127.0.0.1:6379>
Help Entry directives:
Redis 127.0.0.1:6379> Help
4. Modify the configuration
1), modify profile Redis configuration file by default in/etc/redis/redis.conf:
Input instructions:
Vi/etc/redis/redis.conf
Find #requirepass foobared Remove the previous comment,
and modify it to the required password: Requirepass 123123 (where 123123 is the password to set)
Login method:
#redis-cli-h 127.0.0.1-p 6379-a 123123
2), let Redis server be remote access by default, the Redis server does not allow remote access and allows only native access, so we need to set the ability to turn on remote access.
Open the profile redis.conf of the Redis server with VI. Directive Ibid.
Note Bind (add # number) #bind 127.0.0.1
3), restart Redis if Redis is already configured as a service,
Can be restarted in the following ways: Service Redis restart
Ubuntu Install Redis server side