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     - Dockerfile use to build a mirror-based CentOS 7 (Linux)

- imp / exp Oracle Database import and export commands (Database)

- How to customize your Linux desktop: Gnome 3 (Linux)

- Achieve single backup of MySQL by innobackupex (Database)

- ORA-12545: Connection failed because the target host or object does not exist (Database)

- Linux SSH login without a password (Linux)

- Java-based data source database access (Programming)

- Java-- get the reflection object information (Programming)

- Linux Learning --- disk partition / relational representation + mount (Linux)

- Django template inheritance child (Programming)

- Linux modify the system time (Linux)

- Binder began to talk about inter-process communication mechanism from Android AIDL (Programming)

- Linux commands to access the cheat sheet (Linux)

- CentOS / Linux NIC set IP address configuration (Linux)

- CV: Linux command displays the progress of the run command (Linux)

- Easy to get hidden administrator account (Linux)

- Awk include binding capacity larger than the specified size of all files directory (Linux)

- Linux system on how to use rsync to synchronize data (Server)

- MySQL is configured to access external networks under Ubuntu (Database)

- OpenSUSE 13.1 OpenSUSE 12.3 and how to install Cinnamon 2.2 Desktop (Linux)

 
         
  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:      
 
- Use Python to perform system commands common usage (Programming)
- Grub2 Boots the openSUSE installation image (Linux)
- To restore the last time applications running when Ubuntu user log in again (Linux)
- How to set up HTTPS policies for older browsers (Server)
- SSH does not require a password to log on to a Linux server (Server)
- Briefly explain the invasion of the four-level denial of service attack DoS Linux server (Linux)
- Configuring xdebug debugging environment in Ubuntu 14.04 under the PhpStorm (Linux)
- Keepalived + HAProxy high availability load balancing (Server)
- Linux systems dmesg command processing failures and system information collected seven usage (Linux)
- Install and configure GO 1.2.1 under CentOS 6.5 (Linux)
- How to install and configure in Ubuntu 14.10 'Weather Information Indicator' (Linux)
- Rely on IP chain established Linux firewall (Linux)
- Reported too many open files Linux solutions (Server)
- 10 easy to use Linux utilities Recommended (Linux)
- Android design patterns - state mode (Programming)
- Linux shell scripts bubble sort (Programming)
- Java reflection technology explain (Programming)
- Mind mapping software installed in CentOS 7 in XMind (Linux)
- Docker Basic Concepts (Linux)
- Redis 3.0.3 Cluster Setup (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.