Alicloud redis installation and download

Inexplicable sadness 2022-05-22 12:04:14 阅读数:208


Alibaba cloud redis Installation and downloading

For your own record only , Easy to install next time .


Alibaba cloud redis Installation and downloading

1、 Download and install .

2、 Change port number

3、Redis Desktop Manager Connect redis

4、 Configure Alibaba cloud security rules

5、 Configure power on self start

1、 Download and install .

       Linux Next Redis Installation and deployment of     There are many online installation tutorials , I installed it according to this .

2、 Change port number

      Why change the port number . Alibaba cloud servers were mined before . I suspect that the commonly used port number is too open . And the password is too simple . So change the port number this time , password md5 encryption .

      edit redis Configuration file for .redis.config The files are in the installation directory . I install to opt The following the . So the order  

vim /opt/redis/redis-6.2.1/etc/redis.conf

      Enter configuration input /+ keyword ( example :/port) Press N To look down , When found, press i Editing . Press esc Input :wq! Save and exit

Start and have a look .

./bin/redis-server ./etc/redis.conf

3、Redis Desktop Manager Connect redis

Modify the configuration file , take bind Comment out . Because this is the default local connection .

kill Service restart .

4、 Configure Alibaba cloud security rules

In the security group list on the right , Select the security group you are using . Click Configure rules . Open ports .

5、 Configure power on self start

  1. Modify the configuration file . The installation directory /opt/redis/redis-6.2.1    Below /etc/redis.conf file
    daemonize yes
  2. Create services
    stay /usr/lib/systemd/system Create redisd.service file

    ExecStart=/opt/redis/redis-6.2.1/bin/redis-server /opt/redis/redis-6.2.1/etc/redis.conf
    ExecReload=/opt/redis/redis-6.2.1/bin/redis-server -s reload
    ExecStop=/opt/redis/redis-6.2.1/bin/redis-server -s stop
  3. Create a soft connection

    systemctl enable redisd
  4. Relevant command

    start-up redis

    systemctl start redisd

    restart redis

    systemctl restart redisd

    stop it redis

    systemctl stop redisd

    Add power on self start

    systemctl enable redisd

    No auto start

    systemctl disable redisd

    Check the status

    systemctl status redisd

copyright:author[Inexplicable sadness],Please bring the original link to reprint, thank you.