1,下載redis
http://nginx.org/en/download.html
2,解包
tar -zxvf redis-3.2.3.tar.gz 【-C 目錄】
3,安裝
make && make install
4蜂奸,運(yùn)行初始化腳本
cd utils/
./install_server.sh
5贵涵,使用systemd
vi ?/etc/systemd/system/redis_6379.service
編寫(xiě)以下內(nèi)容:
Description=Redison port6379
ExecStart=/etc/init.d/redis_6379 start
ExecStop=/etc/init.d/redis_6379 stop
WantedBy=multi-user.target
6礁击,查看redis版本
redis-cli –version
7迹恐,查看redis一切配置信息
grep -Ev ‘^#|^$’ /etc/redis/6379.conf
7.1,將requirepass設(shè)成ilanniredis
8,啟動(dòng)redis
redis-cli -h 127.0.0.1 -p 6379 -a ilanniredis