In order to build a Linux environment conveniently and quickly, we have these articles
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!