Virtual machine builds local spring cloud environment

Setting up local environment records for virtual machine

1.vmware installation

1. Enter the vm website, Download page

2. Select trial, or log in

3. installation

4. Input the secret key Baidu to test UG5J2-0ME12-M89WY-NPWXX-WQH88 on February 13, 2020

2. Installation of VMware centos7

1. Download centos7 and select Minimal.iso centos7 Alibaba image address

2. Install and select power on to check ip and check whether the network is connected normally

ip addr

3. Edit network card

Under / etc / sysconfig / network scripts / - ens

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="4c417398-d77b-4c46-8709-43f5681ca168"
DEVICE="ens33"
ONBOOT="yes"

IPADDR="192.168.58.128"
NETMASK="255.255.255.0"
DNS1="192.168.58.2"
GATEWAY="192.168.58.2"


                                                                                      
"ifcfg-ens33" 20L, 418C

systemctl restart network

4. Common tools for installation

1.yum -y install net-tools
2.yum -y install vim
3.yum -y install lrzsz

5. install jdk

1.upload jdk
2.decompression tar -zxvf
3.Configure environment variables
vi /etc/profile

#java enviroment
export JAVA_HOME=/usr/local/src/java/jdk1.8.0_192

exportCLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin

source /etc/profile //Come into effect immediately
4.test java -version

6. Copy virtual machine

1. shutdown
 2. Clone vm
 3. Cloned mysql and redis for stand-alone operation and master-slave exercise of mysql
 Hadoop 100, Hadoop 101, Hadoop 102 for simple three cluster operation

7. Virtual machine ip modification, host name modification

3.redis installation

1. Download redis, my version 5.0.3
 2. Upload and decompress
 3. Enter the redis directory to compile make. If there is no gcc, then yum install gcc

redis configuration
 Allow Internet links
 Use ා to comment out the bind 127.0.0.1 and change it to ා bind 127.0.0.1 or 0.0.0.0
 Change the protected mode yes to protected mode no (a new feature added after 3.2, the purpose is to prohibit public network access to redis cache and enhance the security of redis)
Remove the requirepass foobared comment. Foobared is the password. You can also change it to another value (optional, recommended setting)
You can do this if you want to set the password

4. Start src/redis-server redis.conf (this is the configured configuration file)
5. Secret order or visual operation

redis on / off command
 config set requirepass root set password
 config get requirepass get password

redis-server redis.conf is started under the src directory of redis
 Redis cli - H 127.0.0.1 - P 6379 shutdown
 Redis cli - H 127.0.0.1 - P 6379 enter the redis command line


4. Install mysql

1. Uninstall the built-in mariadb

rpm -qa | grep mariadb
rpm -e --nodeps file name

2. Create user groups and users

groupadd mysql
useradd -g mysql mysql -d /home/mysql
passwd mysql Password change order

3. Modify the users and user groups of all files in the mysql folder to avoid any omission after creating the directory

chown -R mysql:mysql mysql/

4. Install mysql

1. Download mysql-8.0.19-linux-glibc2.12-x86_.tar

2. Extract
mysql-8.0.19-linux-glibc2.12-x86_64.tar.xz
mysql-router-8.0.19-linux-glibc2.12-x86_64.tar.xz
mysql-test-8.0.19-linux-glibc2.12-x86_64.tar.xz

3. Unzip tar-xvf mysql-8.0.19-linux-glibc2.12-x86_.tar.xz
 4. Configure my.cnf to directly copy other's
 5. initialization
bin/mysqld --initialize --user=mysql

6. Boot configuration
 #Copy startup script to resource directory
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld

#Add mysqld service control script execution permission
chmod +x /etc/rc.d/init.d/mysqld

#Add mysqld service to system service
chkconfig --add mysqld

#Check whether mysqld service has taken effect
chkconfig --list mysqld

#Switch to mysql user and start mysql
service mysqld start

7. Change password to allow remote connection
 Login to change password
ALTER USER 'root'@'localhost' IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY 'root';
Allow remote connections
GRANT ALL ON . TO 'root'@'%';

The previous step failed to change the host of root user to%
flush privileges;

Test navicat connection
 No turn off the firewall
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
systemctl enable firewalld.service

Simple my.cnf configuration

[client]                                        # Client settings, that is, the default connection parameters of the client
port = 3306                                    # Default connection port
socket = /usr/local/src/mysql/mysql8/tmp/mysql.sock

[mysqld]                                        # Basic settings of server
# Foundation setup
server-id = 1
port = 3306
basedir = /usr/local/src/mysql/mysql8
datadir = /usr/local/src/mysql/mysql8/data
tmpdir  = /usr/local/src/mysql/mysql8/tmp
socket = /usr/local/src/mysql/mysql8/tmp/mysql.sock
pid-file = /usr/local/src/mysql/mysql8/log/mysql.pid
character-set-server = utf8mb4
max_connections = 400
max_connect_errors = 1000
max_allowed_packet = 20M

# log setting
log_error = /usr/local/src/mysql/mysql8/log/error.log

# Innodb settings
innodb_open_files = 500

5.rabitmq installation

1. Download the installation package rabbitmq Download

2. Download erlang erlang official website

3. Installation of Erlang

rpm -ivh  *****
libGL.so.1()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libGLU.so.1()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libodbc.so.2()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_baseu-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_baseu-2.8.so.0(WXU_2.8)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_baseu_xml-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_adv-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_adv-2.8.so.0(WXU_2.8)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_aui-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_aui-2.8.so.0(WXU_2.8)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_aui-2.8.so.0(WXU_2.8.5)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_core-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_core-2.8.so.0(WXU_2.8)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_core-2.8.so.0(WXU_2.8.10)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_gl-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_gl-2.8.so.0(WXU_2.8)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_html-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_html-2.8.so.0(WXU_2.8)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_stc-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_stc-2.8.so.0(WXU_2.8)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_xrc-2.8.so.0()(64bit) cover esl-erlang-22.2.6-1.x86_64 Need
	libwx_gtk2u_xrc-2.8.so.0(WXU_2.8)(64bit) cover esl-erlang-22.2.6-1.x86_64 Need


//Install dependent environment
yum install epel-release

yum install unixODBC unixODBC-devel wxBase wxGTK SDL wxGTK-gl

4. Install rabbitmq

socat is required by rabbitmq-server-3.8.2-1.el7.noarch
yum install socat

chkconfig rabbitmq-server on
systemctl start rabbitmq-server
 //Check status
rabbitmqctl status
 Installation management interface
rabbitmq-plugins enable rabbitmq_management
 Management interface: http://192.168.58.129:15672
 Port 5762

Allow guest Internet access
vim /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.2/ebin/rabbit.app
 Change: {loopback [u users, [< "guest" >
 restart

6. Building spring cloudconfig

slightly

7. Operation of consumer

1. Download

2. operation

windows

consul.exe agent -server -bootstrap -advertise 127.0.0.1 -data-dir ./data -ui

Linux

consul agent -server -bootstrap -advertise 127.0.0.1 -data-dir ./data -ui

8.es build

Published 43 original articles, won praise 13, visited 9173
Private letter follow

Keywords: MySQL Erlang Redis yum

Added by phpscriptcoder on Mon, 17 Feb 2020 09:06:42 +0200