Build and install Redis under Linux CentOS

Source: Internet
Author: User
Tags install redis

Need to install TCL 8.5
wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz//Direct download sudo tar xzvf tcl8.6.1-src.tar.gz-c/usr/ Local/cd/usr/local/tcl8.6.1/unix/sudo./configure sudo make sudo make install
No GCC
GCC installation process Yum Install CPP yum install binutils yum install glibc yum install glibc-kernheaders yum Install GL Ibc-common Yum install glibc-devel yum install gcc yum install make
Installing Redis
Wget http://download.redis.io/releases/redis-2.6.16.tar.gz tar xzf redis-2.6.16.tar.gz  cd redis-2.6.16  makemake PREFIX=/usr/local/redis install          //specifying the installation directory cd /usr/local/redis/                         // Enter the installation directory ls                         //View Catalog ls bin/                       //View Bin directory ll bin/                       //view the file under Bin directory cp /usr/local/src/redis-2.6.16/redis.conf ./   // Copy the Redis configuration directory to the current directory./bin/redis-server&nbsP;. /redis.conf                       //Specifies the current directory under Redis profile to configure the redis6379 port to open  ,redis installation succeeded
Linux:-bash: * *: Command not found

The system does not use a lot of commands, they are not prompted for this command. All of a sudden, Linux has many commands that are not used, prompting for no such command. This should be caused by a problem with the system environment variable.

Workaround:

First Use: Echo $PATH See if PATH contains:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

If not

Use temporary environment variables (disappear after reboot)

#export path= $PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

Then you can use those commands to go in and modify the persistent environment variable:

1. Modify Profile: (All users)

#vi/etc/profile join: Export path= $PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

Save exit.

2. Modify the. bashrc file: (Individual users)

#vi/ETC/.BASHRC (every user directory, Ls-all) join: Export path= $PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/ Bin

Save exit.

Reboot the system and fix it.

You can also use the command without restarting: #source. BASHRC

To make the environment variable that you just modified take effect

Redis Background Run Run
Vim redis.conf///Modify Redis configuration file Change daemonize= No to Yes save./bin/redis-server./redis.conf//Specify configuration file, rerun Redisps Aux|grep R Edis//view process

Build and install Redis under Linux CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.