Redis related __linux in Linux (CentOS7)

Source: Internet
Author: User
Tags rollback safe mode
Redis InstallationYou need to install the GCC compiler before installing Redis. Then download the Redis from the official website of the extract package, upload to the server specified directory, and then unzip, compile. Specify the installation directory when installing. Install the GCC compiler, install using the Yum Source, mount the image, install the local Yum source, and install it if it is not installed online. Command: Yum install gcc-c++ Decompression installation package Command: TAR-ZXVF filename compilation Redis into the extract directory, and then compile the Redis command: Make installation Redis to the specified directory command: Make prefix= path instal redis configuration file ModificationAfter the installation is complete, you can start the Redis. But this is the foreground boot, Redis is started in front of the foreground and is started in Safe mode (only through native access). If you want another computer to access Redis, you need to modify the configuration file. In the compilation directory above, locate the redisconf file and copy it to the Redis installation directory. Edit the redis.conf file, find the daemnoize no option, and set the No to Yes to start the Redis as a daemon. Find bind 127.0.0.1 to comment it out, turn off native IP binding find protected-moded Yes to add a port, you need to open the Redis running port in the system so that it can be accessed by another computer redis,centos6.5 for repair Change the iptables file, add content to the file to open the port, and then reload the file to take effect. Centos7 is the need to use the Firewall-cmd command to open the port and then restart the service for the modification to take effect. Then you can run it in the background.


Redis CharacteristicsRedis a single instance has up to 16 database instances (subscript: 0-15), the user can specify a connected database. The default connection database is database number No. 0. In the Redis client, you can specify the library you want to connect to by using the Select [Library subscript].
Key in each library can be moved to another library, using the command move key [library subscript]
Redis AffairsMulti: means to open a transaction, to ensure the execution of the atomization, all subsequent commands are stored in the command queue until the EXEC command is encountered. EXEC: Equivalent to commit commit discard in relational databases: rollback rollback equivalent in relational databases Redis Persistence There are 2 ways of RedisThe Rdb method is persisted by default. Writes in-memory data to disk for persistence within a specified time interval.
AoF the way to log every operation that the server handles, and when the server is started, read the file and rebuild the database. This ensures that the data in the database is complete.

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.