1. Install centos 7. Remember to check the Web server or other tools with full functions during installation. Otherwise, the most basic ifconfig cannot be used.
2. Check whether iptables is available under/etc/sysconfig/. Check whether service iptables start can be started normally. If it cannot be started, use root user and Yum-install iptables to install the firewall.
3. After installation, there are two ways to allow external access: 1. Disable the firewall chkconfig iptables off (effective after restart) 2, open port access permission VI/etc/sysconfig/iptables add-A input-M state -- state new-m tcp-p tcp -- dport port number-J accept remember, this sentence must be added before reject.
4. Download redis and put it to the directory you want to install. Decompress tar-xfv redis.xxx.tar to enter the decompressed directory and enter make./install-server if there is a utils directory;
5. If the installation directory is not customized, the startup file will be under/usr/local/bin, and the configuration file will be under/etc/redis. You can edit the configuration file (whether to print the console, port number, database directory, etc.). By default, logs are stored in/var/log/redisxxx. log.
6. Enter/usr/local/bin/and enter ". /redis-server configuration file path ", for example :. /redis-server/etc/redis/reids. after entering the Config Key, you can start it.
7. Enter PS-Ef | grep redis to check whether the corresponding process exists. If no process exists, the configuration file may be modified incorrectly and can be corrected by yourself.
8. Enter./reids-CLI to access the client tool provided by redis.
9. Enter set user jacksparrow, and then get user to perform the test. Exit the quit input or press Ctrl + C.
10. If you want to stop the redis service,./redis-cli shutdown!