SpringCloud related environment deployment

  • The RabbitMQ deployment
  • Redis deployment
  • Nacos deployment

RabbitMQ

Apt-get install is not installed by updating the installation package. Download the installation package from the official website and install the software using commands.

To install RabbitMQ, you need the Erlang environment and download the corresponding Erlang version of the package.

Erlang

To avoid version conflicts, I first removed the previous Erlang environment, apt-Remove Erlang, but this was still completely clean.

Delete Erlang from Ubuntu

1.which erl
2.sudo rm -rf /usr/bin/erl
3.sudo rm -rf /usr/lib/erlang
Copy the code

Then install the corresponding version of the Erlang package

DPKG -i Installation package deb

View the Erlang version sudo Erl

Install the RabbitMQ

Official website: www.rabbitmq.com/install-deb…

Download the RabbitMQ package: packagecloud. IO/RabbitMQ/ra…

dpkg -i RabbitMQ.deb

Problems encountered in installation:

  1. – Unable to connect to epMD on XXXX: timeout (timed out). Solution: sudo vi /etc/hosts and add 127.0.0.1 example. Example is the RabbitMQ instance

  2. root@example:/var/lib/rabbitmq# cd mnesia/
    root@example:/var/lib/rabbitmq/mnesia# ls
    rabbit@example  rabbit@example-feature_flags  [email protected]  rabbit@example-plugins-expand 
    Copy the code
  3. Ali cloud add port, local access: localhost:15672, by default can add guest/guest, remote access for security reasons, guest does not take effect by default. Rabbitmqctl add_user username and password.

  4. To Access the management page, grant the Access permission to the user


Redis

Download the installation package: Redis official website Redis. IO/Download

  1. Decompress to /usr/lcoal and go to bin./redis-serverTo start the server connection
  2. Connect to the client and run the./redis-client command in the bin directory to start the client

Problems encountered

1. Temporary startup and permanent startup problems after password change. Solution: Use command mode for temporary startup

sudo redis-cli -p 6379
#Whether to set the password command
sudo config get requirepass
#Set password Command
sudo config set requirepass 123456
#Verify passwordSudo password authCopy the code
  1. Permanent mode

    After entering the redis. Conf file, locate the requirepass parameter, set the password, and restart the service

  2. Background Startup Takes Effect

    sudo /user/local/redis/bin
    sudo /redis-server ./redis.conf
    Copy the code

Nacos

The installation package is used

The only caveat is to install using the bash command in Ubuntu

bash -f ./startup.sh -m standalone