Installation and configuration of redis under centos7

Redis is no longer a rare thing, but it is definitely an artifact.

1 ready

1、 A computer that can connect to the Internet (this article takes centos7 as an example)

2 start installation

1、 Check if it has been installed before (ps -ef|grep redis)

Because I have installed it locally, so there is the above record, otherwise it is empty

2、 Install gcc-c++ (needed by redis compilation environment)

sudo yum install gcc-c++

3、 Download the source code locally (wget http://download.redis.io/releases/redis-the version you need.tar.gz---I downloaded 3.2.8)

I downloaded it to user/local

4、 Unzip (tar -zxvf redis-3.2.8.tar.gz)

5、 Compile

Enter redis-3.2.8 (cd redis-3.2.8)

Execute make && make install

At this time, there will be a few more files in the src directory (green in the figure below)

3 Configuration

1、 Create redis/etc and redis/bin directories under local to store configuration files and startup files respectively

2、 Copy redis-3.2.8/redis.conf to redis/etc

3、 Move the green file generated in step 5 above into redis/bin

4、 Configure redis/etc/redis.conf

Mainly revised:

bind 127.0.0.1 (comment out this line, otherwise other machines cannot connect to the redis service)

requirepass 123456789 (Let go of this line and configure your own password)

daemonize yes (redis running in the background)

5、 Start (./user/local/redis/bin/redis-server /user/local/redis/etc/redis.conf)

Note: Because it is running in the background, the redis startup diagram (startup log and other information) will not appear here

4 test

Test the connection with redis manager desktop locally

5 Problems encountered

**Q1: **An error is reported when executing make:

cc: Error: ../deps/hiredis/libhiredis.a: No such file or directory

cc: Error: ../deps/lua/src/liblua.a: No such file or directory

cc: Error: ../deps/geohash-int/geohash.o: No such file or directory

cc: Error: ../deps/geohash-int/geohash_helper.o: No such file or directory

make[1]: *** [redis-server] Error 1

make[1]: leave the directory "/usr/local/redis-3.2.8/src"

make: *** [all] Error 2

**A1: **Enter redis-3.2.8/deps, execute make geohash-int hiredis jemalloc linenoise lua

**Q2: **The configuration is all right, but the local connection cannot be made

**A2: **Most are firewall problems

systemctl stop firewalld.service #Stop firewall

systemctl disable firewalld.service #Prohibit firewall from booting up

Recommended Posts

Installation and configuration of redis under centos7
Installation and configuration of rsync server under CentOS 6.5
Centos7 installation and configuration of Jenkins
Java-JDK installation and configuration under CentOS
Redis3 installation under Centos7
Installation and use of Mysql under CentOS
Tomcat installation and configuration under CentOS 7 (Tomcat startup)
MySQL 8.0 installation, deployment and configuration under CentOS 6/7
Detailed explanation of Spark installation and configuration tutorial under centOS7
Installation and configuration of JDK in CentOS 7 system
Centos mysql installation and configuration
Redis cluster installation under CentOS
Centos7 installation and configuration prometheus
CentOS 7 installation and configuration PPTP
CentOS installation and configuration cmake
Centos7.5 installation and configuration MongoDB4.0.4
Redis cluster installation under CentOS
CentOS 7 installation and configuration PPTP
CentOS 7 installation and configuration graphic tutorials under VMware10
Installation and configuration of CentOS 7 in VMware Workstation
Installation and cracking of confluence6.3 operation records under Centos
Environment configuration of JDK, mysql and tomcat under Centos7
Centos6.5 installation and deployment of KVM
Installation under centos6.9 of jenkins learning
Centos7 hadoop cluster installation and configuration
CentOS7 installation and maintenance of Gitlab
Redis installation under ubuntu and windows
CentOS 7 Tomcat service installation and configuration
CentOS NTP server installation and configuration
Erlang 20.2 installation and deployment under CentOS 7
Centos7 mysql database installation and configuration
CentOS 7 system installation and configuration graphic tutorial
Centos-6.5 installation and deployment of LNMP environment
Centos7 installation and deployment of gitlab server
Installation and uninstallation of CUDA under Ubuntu 16.04
Zabbix installation and deployment and localization under CentOS
Centos7 hive stand-alone mode installation and configuration
Jenkins installation and deployment tutorial under CentOS 7
KVM installation and preliminary use under CentOS 7.2
DLNA/UPnP Server installation and configuration under Ubuntu 12.04
Centos7 installation and deployment of Airflow detailed
Detailed explanation of quick installation and configuration of Subversion (SVN) under Ubuntu
OpenMPI-Ubuntu installation and configuration
Graphical installation of CentOS8
Mysql8.0.15 installation configuration (centos7)
CentOS 6.5 system installation and configuration graphic tutorial (detailed graphic)
Installation of pulseaudio and API usage under Ubuntu 12.04
Centos7 installation of PHP and Nginx tutorial detailed
Install svn and configuration through yum under CentOS
Kaldi installation and configuration graphic tutorials under Ubuntu
Installation, configuration and uninstallation of GitLab in Ubuntu19.1
MySQL 8.0 installation and deployment under CentOS, super detailed!
Installing CentOS 6 and SSH configuration under Windows 8 Hyper-V
Non-Root installation of Microsoft R Open under Centos
Distributed deployment of Apollo configuration center under CentOS8
MySQL 8.0 installation, deployment and configuration tutorial on CentOS 8
From installation to entry of FastDFS under Centos7
Ubuntu16.04 mirror complete installation and configuration tutorial under VMware
Ubuntu16.04 installation and simple configuration
centos7 kvm installation and use
Centos7 silent installation of Oracle11g