Linux installation Redis tutorial

步履不停
Release: 2019-06-18 16:41:32
Original
3696 people have browsed it

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)
Copy after login
yum install gcc gcc-c++(安装g++)
Copy after login

2. Download Redis

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

3. Install Redis

tar xzf redis-4.0.14.tar.gz 
cd redis-4.0.14
make
make install
Copy after login

4. Modify the Redis configuration file

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

5. Start redis

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

7. Stop redis

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template