search
HomeDatabaseMysql Tutorial在CentOS 5/Redhat 5上编译源码安装Redis

在CentOS 5/Redhat 5上编译源码安装Redis | Install Redis on CentOS 5 / Redhat 5

在CentOS 5/RedHat 5上编译源码安装Redis | Install Redis on CentOS 5 / Redhat 5

在CentOS 5/Redhat 5上编译源码安装Redis

环境

Redhat 5.7 64bit / CentOS 5 64bit

Gcc 4.1.2

编译安装Redis

三步曲:下载、解压、编译安装。

wget tar xzvf redis-2.8.4.tar.gz -C /home/nieyong/download/build cd /home/nieyong/download/build/redis-2.8.4 make PREFIX=/home/nieyong/local/redis-2.8.4 install

注:

1)更详细的安装说明可查看Redis的README。

2)淡黄底色部分根据自己的实际环境进行修改。

启动Redis

进入Redis安装目录的bin子目录。

cd /home/nieyong/local/redis-2.8.4/bin ./redis-server --port 9999

控制台出现如下提示信息:

[31726] 16 Jan 15:30:32.946 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 992. _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 2.8.4 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in stand alone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 9999 | `-._ `._ / _.-' | PID: 31726 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' [31726] 16 Jan 15:30:32.955 # Server started, Redis version 2.8.4 [31726] 16 Jan 15:30:32.955 * The server is now ready to accept connections on port 9999 测试Redis

进入Redis安装目录的bin子目录。

./redis-cli -h 127.0.0.1 -p 9999 127.0.0.1:9999> ping PONG 127.0.0.1:9999> set name 聂勇 OK 127.0.0.1:9999> get name "\xe8\x81\x82\xe5\x8b\x87" 127.0.0.1:9999> set username nieyong OK 127.0.0.1:9999> get username "nieyong" 参考资料

  •  

    下面关于Redis的文章您也可能喜欢,不妨参考下:

    Ubuntu 14.04下Redis安装及简单测试

    Redis从复制基本配置

    Redis集群明细文档

    Ubuntu 12.10下安装Redis(图文详解)+ Jedis连接Redis

    Redis系列-安装部署维护篇

    CentOS 6.3安装Redis

    Redis安装部署学习笔记

    Redis配置文件redis.conf 详解

    Redis 的详细介绍:请点这里
    Redis 的下载地址:请点这里

    本文永久更新链接地址

  • Statement
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

    The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

    How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

    Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

    What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

    Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

    How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

    Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

    How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

    The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

    How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

    The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

    How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

    Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

    How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

    Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

    See all articles

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Article

    Hot Tools

    PhpStorm Mac version

    PhpStorm Mac version

    The latest (2018.2.1) professional PHP integrated development tool

    Dreamweaver Mac version

    Dreamweaver Mac version

    Visual web development tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    MinGW - Minimalist GNU for Windows

    MinGW - Minimalist GNU for Windows

    This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)