Before you begin to connect CentOS 7 with SECURECRT, the connection steps are too simple to introduce, if you do not know the CentOS IP can be viewed with the command IP addr
First, download the Redis installation package
1. Enter the command:
Go to Catalog
CD USR/LOCAL/SRC
Create a Redis folder
mkdir Redis
Enter the Redis directory CD Redis that you just created
//Download the Redis installation package wget http with the wget command: // download.redis.io/releases/redis-4.0.9.tar.gz
结果如下包错了,原因是没有安装wget
-Y Install wget
Run the wget command again after you have finished installing wget
wget http://download.redis.io/releases/redis-4.0.9.tar.gz
After the download is complete, use the LS command to view the file in the directory LS
//Unzip Redis package tar xzf redis-4.0. 9. tar.gz
View Catalog
Ls
See if GCC and C + + are installed
// See if GCC installs gcc--version// See if C + + installs g++-V
If not installed, the following error will occur. GCC command not found
Installing GCC and C + +
// installing the GCC compiler Yum Install gcc // Install C + +Yum Install gcc-c++
Enter the redis-4.0.9 directory, compile
CD redis-4.0. 9 // Compilation Note: It is possible to pack the wrong malloc=libc without adding a
Make MALLOC=LIBC
Installing Redis
// default installation to/usr/local/bin/make install
Start Redis
// go to Bin directory cd/usr/local/bin/// start Redis service Redis-server &
Display information stating that the installation was successful
Keyboard Input CTRL + C exit, in the input command with the client connection
Redis-cli
Indicates that Redis has been successfully connected
// test it, add a record Set name ABC // get the record you just added Get Name
Enter the cd/usr/local/src/redis/redis-4.0.9 directory
// Enter the Redis source directory cd/usr/local/src/redis/redis-4.0. 9
Create a folder in the/etc/redis directory to put the redis.conf configuration file
mkdir/etc/Redis// copy redis.conf file to/etc/rediscp redis.conf/etc/redis/6379. conf
// go to utils directory CD utils/// copy redis_init_script file to/etc/init.d/CP REDIS_INIT_SCRIPT/ETC/INIT.D /redisd
Modify the REDISD file
// enter the following command by typing the keyboard letter I into edit mode on the second line of the file plus #chkconfig: 2345// Press the ESC key to exit edit, and then enter: Wq Save and exit the C13>vi REDISD// Save and exit : Wq
// set to boot from server chkconfig REDISD on
// Open Service Service REDISD Start // Close service REDISD stop
// Check if the background process is running Ps-ef | grep Redis
. NET build Distributed Framework (ii) installation of Redis under CentOS