Installing Redis and Java calls to Redis under the Linux system

Source: Internet
Author: User

Relational database: MySQL Oracle

Non-relational database: Redis removes relational databases such as primary foreign keys and other relational properties

1) Install the Redis -compiled C Environment,yum install gcc-c++

2) upload the redis-2.6.16.tar.gz to the Linux system

3) Extract to /usr/local under tar-xvf redis-2.6.16.tar.gz-c/usr/local

4) Enter the redis-2.6.16 directory using the Make command to compile Redis

5) Install with the make prefix=/usr/local/redis install commandin the redis-2.6.16 directory Redis to /usr/local/redis

6) Copy the redis.conf in redis-2.6.16 to the installation directory redis

7) Start redis to execute commands under bin redis-server redis.conf

8) If you need to remotely connect to Redis, you need to configure the redis Port 6379 on linux Development in Firewalls

/sbin/iptables-i input-p TCP--dport 6379-j ACCEPT

/etc/rc.d/init.d/iptables Save

cd/soft/

TAR-XVF redis-2.6.16.tar.gz-c/usr/local

After the compression is complete, you need to go into the compact Redis file and make to compile

There's bin, it's executable.

Using the./redis-server startup belongs to the front-end boot

On port 6379 ports

re-open a connection and use the REDIS-CLI is the client initiated to operate the data

value based on key

Background boot

CTRL + C Stop front desk

Locate The redis configuration file

Use the CP command to copy the redis.conf configuration file from the redis-3.0.0 to the bin under redis in

Modify daemonize Yes in the redis.conf configuration file to start in the backend mode

Start the client operation

How to turn off the client

Exit first

How to turn off the client

Exit first

See Process Pipeline and Redis -related

Kill process

Whether to close under test

Other ways to stop:

shut down with shutdown after startup

simple use of Redis

Connect to redis using Java code

to start redis under/usr/local/redis/bin

Must be open ports installed on Linux

and save it forever.

Installing Redis and Java calls to Redis under the Linux system

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.