Redis is a high-performance key-value database. The emergence of redis has largely compensated for the shortcomings of keyvalue storage such as memcached, and can play a very good supplementary role to relational databases in some situations.
Redis (Remote Dictionary Server), the remote dictionary service, is an open source software written in ANSI C language, supports the network, and can A log-type, Key-Value database based on memory that can also be persisted, and provides APIs in multiple languages. Since March 15, 2010, the development of Redis has been hosted by VMware. Since May 2013, the development of Redis has been sponsored by Pivotal.
wget http://download.redis.io/releases/redis-4.0.8.tar.gz
tar xzvf redis-4.0.8.tar.gz
cd redis-4.0.8 make cd src make install PREFIX=/usr/local/redis
cd ../ mkdir /usr/local/redis/etc mv redis.conf /usr/local/redis/etc
//将daemonize no 改成daemonize yes vi /usr/local/redis/etc/redis.conf
//在里面添加内容:/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf vi /etc/rc.local
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
redis-server /usr/local/redis/etc/redis.conf //启动redis pkill redis //停止redis rm -rf /usr/local/redis //删除安装目录 rm -rf /usr/bin/redis-* //删除所有redis相关命令脚本 rm -rf /root/download/redis-4.0.4 //删除redis解压文件夹
The above is the detailed content of How to install Redis in Linux system. For more information, please follow other related articles on the PHP Chinese website!