Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

1 Redis-Linux environment variable setting

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Redis-Linux environment variable setting

F: the Redis software package (https://redis.io/download)) needs to be downloaded from the official Redis website

R: use the FTP upload tool to upload software packages after downloading. Generally speaking, third-party software should be stored in the OPT directory, in fact, it can also be installed in the OPT directory, as long as you can maintain it later, as shown in the figure:

F: release / decompress Redis database software

Use the Shell tool to enter the relevant directory, such as / opt/, and execute the tar-zxvf command. The zxvf command is explained as follows

Forms of compression or decompression supported by z:gzip

X: release or decompress c: compress or pack

V: displays the name of the file being processed during compression or release

F: this parameter must be followed by the file name, indicating that what you need to manipulate is the file

R: the complete command tar-zxvf redis-4.0.11.tar.gz will generate a folder with the same name locally in the same directory after release, as shown in the figure:

F: install Redis

R: after the configuration is complete, install directly in the current directory (/ opt/ in this example), as shown in the figure

Yum install gcc-c++

Make

Make install

If there is an error in the installation Times: / bin/sh: cc: command not found instructions that gcc is not installed

Then enter

Yum-y install gcc gcc-c++ libstdc++-devel

Make MALLOC=libc

F: configure environment variables and set

R: the environment variable is actually based on the current path to find the root of the software and the executable directory to configure the following according to its own directory. This example is actually used to install Redis in OPT.

1 enter / etc/ to edit the profile environment configuration file the complete command is as follows

2 vim / etc/profile

3 press I to enter edit mode and move the cursor to the last line to start adding as follows

4. Press ESC to enter wq after editing! Save and launch

5 continue to enter source / etc/profile (cannot be omitted, otherwise the configuration is invalid)

6 starting Redis in any directory at this time can be mounted normally

As shown in the following figure

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report