当前位置:网站首页>Installing redis on Linux
Installing redis on Linux
2022-07-16 07:48:00 【Dream, wake up】
1. download redis
redis Official website address :Redis
wget http://download.redis.io/releases/redis-3.2.11.tar.gz2. decompression 、 compile
tar xzvf redis-3.2.11.tar.gz
cd redis-3.2.11
make
cd src make install PREFIX=/usr/local/redismake If compilation fails , Because it's not installed gcc service ;
3. Then start the installation gcc:
yum install gcc-c++Then the download interface will appear , The confirmation interface will appear twice , Input y that will do
The following message appears: installation succeeded :

4. install redis
Get into redis compile
cd redis-3.2.11
make5. Test for successful installation
cd src
make testIf the following error occurs :
You need tcl 8.5 or newer in order to run the Redis test make: *** [test] Error 1You need to install tcl:
Go here to download : http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
Upload to Linux The server decompression tar zxvf tcl8.6.1-src.tar.gz
Get into tcl8.6.1-src :
cd tcl8.6.1Get into unix Folder :
cd unixperform :
./configurecompile :
makeinstall :
make installOnce again into the redis Of src test :( There will be a pile of green OK That's all right. )
make test install redis: ( There is a pile of execution install Successful installation )
make PREFIX=/usr/local/redis install6. Take the decompressed redis The next path redis.conf Copy the file to the installation path
cd redis-3.2.11/
cp redis.conf /usr/local/redis
cd /usr/local/redis7. start-up redis
The first method :
./bin/redis-serverThe front-end start , start-up redis after , Our console can't do anything . Can only ctrl+c Stop starting .
The second method :
1. To compile the first redis.conf
vim redis.conf or vi redis.conffind daemonize no Change it to yes
Save to exit
2. start-up :
./bin/redis-server ./redis.confCheck the process :( See if it starts )
ps -ef | grep -i redis 8. close redis
./bin/redis-cli shutdown9. Important introduction :
bin Key files in the directory :
- redis-benchmark:redis Performance testing tools
- redis-check-aof: Check aof Logging tools
- redis-check-dump: Check rdb Logging tools
- redis-cli: Client for connection
- redis-server:redis Service process
conf Configuration item introduction :
- daemonize: If you need to run in the background , Change the value of the item to yes
- pdifile: hold pid Files in /var/run/redis.pid, Can be configured to other addresses
- bind: Appoint redis Receive only from IP Request , If not set , Then all requests will be processed , It is better to set this item in the production process
- port: Listening port , The default is 6379
- timeout: Sets the timeout time when the client connects , The unit is in seconds
- loglevel: The grade is divided into 4 level ,debug,revbose,notice and warning. Generally open in production environment notice
- logfile: To configure log File address , Default to standard output , That is, it is printed on the port of the command line terminal
- database: Set the number of databases , The default database is 0
- save: Set up redis Frequency of database mirroring
- rdbcompression: When doing a mirror backup , Whether to compress
- dbfilename: The file name of the image backup file
- dir: The path where the database image backup files are placed
- slaveof: Set this database as a slave to other databases
- masterauth: When the primary database connection requires password authentication , Set... Here
- requirepass: Sets the password to use after the client connection before making any other specification
- maxclients: Limit the number of clients connected at the same time
- maxmemory: Set up redis Maximum memory available
- appendonly: Turn on appendonly After the model ,redis Each received write operation will be appended to appendonly.aof In file , When redis On reboot , The previous state is restored from the file
- appendfsync: Set up appendonly.aof Frequency of file synchronization
- vm_enabled: Whether to turn on virtual memory support
- vm_swap_file: Set the path of the swap file for virtual memory
- vm_max_momery: After setting virtual memory on ,redis The size of the maximum physical memory that will be used , The default is 0
- vm_page_size: Set the size of the virtual memory page
- vm_pages: Set the total page Number
- vm_max_thrrads: Set up vm IO Number of threads used at the same time
边栏推荐
- 2021/12/12 attack and defense world reverse question record
- Linux上安装Redis
- Byte test director stayed up for 10 days, and the test post interview script came out of the liver, giving you wings to your big factory dream~
- “挤破脑袋进的腾讯,你凭什么要辞职?”
- Is it reliable to switch to software testing at the age of 30? The mental journey of a person who came here is for you who are confused
- Volatile final explanation
- Thread pool and producer consumer model
- After 3 months of job hunting, most resumes are dead in the sea. When it comes to manual testing, they shake their heads again and again ~ it's too difficult
- Socket details
- Dictionary tree
猜你喜欢

0 1背包 填表实现

为什么都说测试岗位是巨坑?10年测试人告诉你千万别上当~

Is it true that you can't do software testing until you're 35? So what should I do I'm 36

自动备份MySQL。且保留7天案例

Five years' experience: the monthly salary is 3000 to 30000, and the change of Test Engineers

程序猿专属“压测工具”并发模拟

文件管理-阿里云OSS学习(一)

Still using enumeration in MySQL? Pay attention to these traps!

交换机基本原理与配置

Socket details
随机推荐
Flask基础入门六-上下文
Why can't we use redis expiration monitoring to close orders?
Pytest series-01-installation and introduction
"MySQL database principle, design and application" after class exercises and answers compiled by dark horse programmer
Still using enumeration in MySQL? Pay attention to these traps!
Edge calculation kubeedge+edgemash
Basic introduction to flask 6 - Context
静态路由的原理和配置
滑动窗口详解
The experience of finding a job after coming out of the software testing training class taught me these five things
2021/12/12 attack and defense world crypto question making record
26岁,干了三年自动化,月薪才12k,能跳槽找到一个更高薪资的工作吗?
Redis只能做缓存?太out了!
MySQL foundation related (important)
MATPLOTLIB—fail to allocate bitmap
2021-11-7 bugku question making record 25 - Post
快速幂求解a^b%p
几行代码就能实现复杂的 Excel 导入导出,这个工具类真心强大!
Data storage and disaster recovery (2nd Edition) editor in chief Lu Xianzhi Wu Chunling comprehensive training answer
网络布线概述