Hardware Environment: Thinkpad T450,intel i5-5200u CPU @ 2.20ghzx4, 8GB RAM
Software Environment: Ubuntu 14.04.4 (trusty)
First, Software Installation
#wget http://download.redis.io/releases/redis-2.8.12.tar.gz#tar xzf redis- 2.8. . Tar . GZ#CD Redis-2.8. A # Make # sudo Make Install
After installation, Redis is installed by default into the/usr/local/bin directory with the following information:
[Email protected]:/usr/local/bin$ cd/usr/local/bin[email protected]lsredis-benchmark redis-check-dump redis-serverredis-check-aof redis-cli
The functions of these procedures are as follows:
redis- Server:redis server daemon boot program redis - CLI:redis Command-line Operations tool. You can also use Telnet to manipulate Redis based on its plain text protocol- Benchmark:Redis Performance testing tool to test Redis's read and write performance in the current system Redis -check- aof: data repair Redis -check-dump:Check the Export tool
Second, system and software configuration
Set up the system:
echo vm.overcommit_memory=1 >>/etc/sysctl.confb) sysctl vm.overcommit_memory= 1 or perform echo vm.overcommit_memory=1 >>/proc/sys/vm/overcommit_memory
Where the numeric meaning of the parameter is:
0, indicates that the kernel will check for sufficient available memory to be used by the process, and if sufficient memory is available, the memory request is allowed; otherwise, the memory request fails and the error is returned to the application process.
1, which means that the kernel allows all physical memory to be allocated regardless of the current memory state.
2, which indicates that the kernel allows allocating memory that exceeds the sum of all physical memory and swap space.
Set up Redis so that it can run in the background:
CP ./redis.conf/etc//vi REDIS.CONFD) Modify daemonize Yes # to make the process run in the background
Third, system start-up and simple test
Start the Redis service, and note that the configuration file parameter (the default is to read the local configuration file) is followed:
[Email protected]:/usr/local/bin$ cd/usr/local/bin/[email protected]-thinkpad-t450:/usr/local/bin$. Redis-server/etc/redis.conf
Start a client and test the effect:
[Email protected]:/usr/local/bin$./redis-127.0. 0.1:6379> set name victook127.0. 0.1:6379> get name"victo"
Getting Started with Redis (i) System installation