Linux servers configure Redis and enable PHP support

Source: Internet
Author: User

# # # #安装redis -2.8.3.tar.gzcd/usr/local/src/tar-zxvf redis-2.8.3.tar.gzcd  redis-2.8.3make #or make Test  # Test compile make install #开始编译安装

# Set up Database folder mkdir/var/lib/redis_db/-pvim/etc/redis.conf# Modify the following variables daemonize Yes   # daemon run logfile "/var/log/redis.log"  # log file dir/var/lib/redis_db/      # Data Persistence folder
Running Redis
Redis-server/etc/redis.conf

Compiling Phpredis

git clone https://github.com/phpredis/phpredis.git phprediscd phpredis/usr/local/php/bin/phpize./configure# The old high environment variable is not imported so the compile command is./configure--with-php-config=/usr/local/php/bin/php-configmake && make install
cp/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/redis.so/usr/local/php/lib/php/extensions/
Turn on Redis extensions
vim/etc/php.ini# add[redis]extension=redis.so

After restarting Apache or PHP-FPM, Phpinfo page

Linux servers configure Redis and enable PHP support

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.