Linux installation Redis tutorial

步履不停
步履不停Original
2019-06-18 16:41:323704browse

Linux installation Redis tutorial

In order to build a Linux environment conveniently and quickly, we have these articles

  1. CentOS uses yum to install jdk
  2. CentOS installs tomcat
  3. CentOS installation Nginx
  4. CentOS installation MySql
  5. Centos installation Redis

1. Preparation before installing Nginx
Please confirm gcc g Whether the development class library is installed.

yum -y install gcc automake autoconf libtool make(安装make)
yum install gcc gcc-c++(安装g++)

2. Download Redis

cd /usr/local/
wget http://download.redis.io/releases/redis-4.0.14.tar.gz

3. Install Redis

tar xzf redis-4.0.14.tar.gz 
cd redis-4.0.14
make
make install

4. Modify the Redis configuration file

vi redis.conf 
requirepass 123456(修改密码)
port 8888(修改端口号)
daemonize yes(后台启动)

5. Start redis

cd /usr/local/bin
redis-server (正常启动)
redis-server &(命令版后台启动)
redis-server ../redis-4.0.14/redis.conf(指定配置文件启动)

7. Stop redis

(./redis-cli -h 127.0.0.1 -p 8888 -a 123456 然后 shutdown)
ps -ef|grep redis(查看redis进程)
kill -9 pid(杀死进程)

For more Linux-related technical articles, please visit the Linux Tutorial column to learn!

The above is the detailed content of Linux installation Redis tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:ubuntu partition schemeNext article:ubuntu partition scheme

Related articles

See more