Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Redis is installed and set up Ubuntu 14.04 from the environment under the main ssdb     - C ++ handling text input (Programming)

- How dependent on Fedora, CentOS, RHEL check RPM packages (Linux)

- Analysis of potential problems through custom Orabbix monitoring Oracle (Database)

- Commonly used Linux system camouflage method (Linux)

- Linux network security backdoor technology and advanced skill practice (Linux)

- Linux file and directory management - ls, cp, mv (Linux)

- The Linux OOM Terminator (Server)

- How do you change the default browser and Email Client in Ubuntu (Linux)

- Enterprise Encrypting File System eCryptfs Comments (Linux)

- How screenshots from the Linux command line (Linux)

- Virtual Judge structures under Ubuntu 14.04 (Server)

- Linux boot process and run level (Linux)

- Java executable file to read information from a database copy (Programming)

- Ubuntu users to install household financial management tools HomeBank 5.0.0 (Linux)

- Installation Yarock 1.1.4 Music Player in Ubuntu (Linux)

- SSH port forwarding application (Server)

- Source MongoDB 3.2.1 installed on CentOS6.5 (Database)

- Linux Getting Started tutorial: build your own Vim (Linux)

- Linux System Getting Started Learning: Linux how to install 7zip (Linux)

- Cache implementation APP interacts with the server-side interface control Session (Server)

 
         
  Redis is installed and set up Ubuntu 14.04 from the environment under the main ssdb
     
  Add Date : 2018-11-21      
         
         
         
  Exposure at work to redis, Redis is a very efficient key-value database, widely used in the project, but it is obvious shortcomings redis for memory processing in the project at the beginning of the line, you must memory planning and reasonable, otherwise memory is prone to burst phenomenon, generally more reasonable amount of memory for the computer's physical memory 3/5.

redis provides a variety of data types, I often use a string, hash, list, set, sorted set, to meet the basic requirements of the project for the data type. We are using redis Java client, providing a series of commands for redis corresponding api. redis persistence provides a variety of strategies, but we do not have the persistence, under their own research, AOF is the most reliable way of feeling, principle and mysql binary log is very similar to the operation information is recorded written document, to read the log from the server and perform operations.

In the usual network development you may often need to adjust the data storage details, so if the previous data is still resident in memory, cause a lot of features not work properly, so after adjustment details, you need to redis database flushdb operation.

redis and ssdb very suitable for use in certain scenarios, such as some data can only remain in the database for 2 minutes, similar to the YY channel T person, after fixing a few minutes to come in, you can use the command setex key seconds value, then determine whether the expired You can exists key command.

redis commonly used commands website: http: //redis.readthedocs.org/en/latest/ covers redis command and demo.

Before take ssdb said redis, because ssdb very good compatibility of the redis api. Redis is a good substitute.

ssdb relative to redis there is a lot of advantages: redis 100 times the capacity of a database that can store the amount of billions of data. Redis relatively speaking, occupy very little memory. So he is to download the ssdb, the following are ssdb build process.
Environment: Ubuntu 14.04

Virtual machine A: 192.168.1.251

VM B: 192.168.1.252

Gateway: 192.168.1.1

My two virtual machines are respectively mounted on different physical machines, but are used in a bridging mode, ip ip addresses are in the same segment.

Online are installed under ssdb in two virtual machines, respectively.

wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip

unzip master

cd ssdb-master

make

sudo make install

These can be found in ssdb official website, http: //www.ideawu.com/ssdb/zh_cn/.

ssdb from the main building is actually very simple, you just need to find ssdb.conf in two virtual machines ssdb installation directory.

sudo vi ssdb.conf

ip modify server virtual machine under the default IP address.

Virtual Machine A:

server:

ip: 192.168.1.251

port: 8888 // I did not change the port, use the default

Virtual machine B:

server:

ip: 192.168.1.252

port: 8888

This is the basic configuration.

Now as long as the basis for the next ssdb.conf A Configuration:

replication:

slaveof:

# To identify a master even if it moved (ip, port changed)

# If set to empty or not defined, ip: port will be used.

id: svc_2

# Sync | mirror, default is sync

type: sync

ip: 192.168.1.252

port: 8888

Note: In the above configuration, do not use the spacebar to use tab.

You can now start the ssdb.

./ssdb-server ssdb.conf

Then you can use the command line tools provided ssdb to operate.

Virtual machine A: ./ssdb-cli -h 192.168.1.251 -p 8888

VM B: ./ssdb-cli -h 192.168.1.252 -p 8888
     
         
         
         
  More:      
 
- JSON Introduction and Usage Summary (Programming)
- Use the vi text editor and copy and paste Linux tips (Linux)
- Linux Monitoring Command (Linux)
- Linux command in the dialog whiptail (Linux)
- Linux system security knowledge (Linux)
- NaSC using simple mathematical operations on Ubuntu and Elementary OS (Linux)
- The headers for the current running kernel were not found when VirtualBox installation enhancements (Linux)
- Android and OpenCV2.4.4 build an image processing framework (2013 edition) (Linux)
- Linux / BSD firewall M0n0wall Profile (Linux)
- Linux Disk and File Management (Linux)
- The difference between vi and nano (Linux)
- Linux RAID Set RAID 10 or 0 + 1 (Linux)
- Linux system components Detailed log (Linux)
- Java and Python use make way dictionary word search script (Programming)
- Construction Spark source and application development environment (Server)
- After reloading the cinder-volume OpenStack not start properly (Server)
- Wi-Fi hackers use to attack your seven methods (Linux)
- CentOS6.5 install SVN & visual management tools iF.SVNAdmin (Server)
- To use yum install VLC under CentOS (Linux)
- Common data structures and functions of Linux process scheduling (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.