A. Installation Redis
1. Download the installation package redis
2. Upload to Linux
3. Unzip
tar zxvf redis-5.0.7.tar.gz
cd redis-5.0.7
4. No build file: configure, can be installed directly
make
5. Create a folder
mkdir /usr/local/redis //Redis的安装目录
mkdir /usr/local/redis/bin //存放的是服务器端和客户端
mkdir /usr/local/redis/etc //存放的是配置文件
6. Copy the file to the appropriate directory
cp redis.conf /usr/local/redis/etc
cd src
cp redis-benchmark redis-cli redis-server redis-sentinel /usr/local/redis/bin
7. View redis directory file and started
cd /usr/local/redis/
ls -R
8. Start the server and client redis
./bin/redis-server ./etc/redis.conf
9. redis way to start the daemon to modify redis.conf
vim etc/redis.conf
The daemonize no change daemonize yes
10. Restart the server redis
./bin/redis-server ./etc/redis.conf
11. Review Process
ps -e | grep redis
12. Start redis client
./bin/redis-cli
13. Configure the startup password
vim etc/redis.conf
Add requirepass password
14. Restart the server centos
init 6
15. After a successful start
cd /usr/local/redis/
./bin/redis-server ./etc/redis.conf
./bin/redis-cli
Direct landing failure, you need to enter a password
auth password
Two .redis extensions under Linux
1. Go to the directory software
cd /software
2. Download and extract to the current directory redis
wget http://pecl.php.net/get/redis-3.1.2.tgz
tar -zxvf redis-3.1.2.tgz
3, enter unzipped directory redis
cd redis-3.1.2
4, with phpize generate configure profile (your own phpize where you can find it!)
/usr/bin/phpize
5, configuration
./configure --with-php-config=/usr/bin/php-config
6, compiled
make
7, installation
make install
8. Edit php.ini
vim /etc/php.ini
Adding the extension in php.ini = redis.so;
3. Review the results of php extension
php -m
10. Restart apache
systemctl restart httpd.service
11. The use phpinfo to see if success