How to install Redis in Ubuntu and PHP install Redis extensions, CI framework sess using Redis

Source: Internet
Author: User
Tags install redis

Once again misled by those tutorials on the web decided to write one yourself. I've been misled by the strange tutorials a few times, and I've been studying other things before. The egg hurts.

Installing Redis

You can use the Apt-get command directly

sudo apt-get install Redis-server

The installation will ask you a thing, enter Y on the line.

The Redis service will start automatically after installation, and you can see whether the process has started by following the command below.

Ps-aux|grep Redis

Then check the status of the Redis service to see if it is runing.

Redis-server is running


Installing PHP Extensions

With Apt-get, you can install the

sudo apt-get install Php5-redis

Then reboot the Apache.

Service Apache Restart


Use Redis storage in CI session

In CI 3.0 (2.0 is not supported with Redis storage session) in the application\config\config.php two configuration changed to the following

$config [' sess_driver '] = ' redis '; $config [' sess_save_path '] = ' tcp://127.0.0.1:6379 ';


How to install Redis in Ubuntu and PHP install Redis extensions, CI framework sess using Redis

Related Article

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.