Redis Python Linux Runtime Environment configuration

Source: Internet
Author: User

Recently learning Redis, according to the relevant information on the Redis recommended configuration on a Linux server requires Python language support, the environment configuration process is now organized as follows:

The current Linux operating system has its own python does not need to install itself, now introduce the Python setuptools tool installation

1 Download the corresponding installation package from Https://pypi.python.org/pypi/setuptools This website (i downloaded to setuptools-36.5.0.zip) and place the installation package in the/usr directory

2 Switch to the/usr directory and unzip it with the following command

1 Unzip Setuptools-36.5.0.zip

3 After the decompression is complete, switch to the/usr/setuptools-36.5.0 directory and install it with the following command

Python setup.py Install

4 Download Python-supported files from Https://github.com/andymccurdy/redis-py (redis-py-master.zip), because Python is not supported by default for Redis, Place the downloaded file in the user directory/usr

5 switch to the user directory/USR to decompress with the following command

Unzip Redis-py-master.zip

6 Switch to the/usr/redis-py-master directory and install it with the following command

Python setup.py Install

7 After the above steps have been installed, enter in the command line

Python

Enter the python run environment to see the information such as the prompt

Then enter the following command in the command line order

1 Import Redis 2 conn=Redis. Redis ()3 conn.set (' Hello ', ' World ')4 conn.get (' Hello ')

After entering the above command, if you can see the following proof the operating environment is configured

Redis Python Linux Runtime Environment configuration

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.