标签(空格分隔): 运维系列:


一: 系统环境介绍

系统:
   OpenEuler22.03 arm x64
   
主机IP与名称:
  cat /etc/hosts  
 ---
10.0.2.41 flyfish41
10.0.2.42 flyfish42
10.0.2.43 flyfish43
 ---

软件准备:
jdk-8u401-linux-aarch64.tar.gz  
rabbitmq-server-3.12.13-1.el8.noarch.rpm
erlang-26.2.2-1.el8.aarch64.rpm  
mysql8.0.36-rpm.tar.gz          
redis-6.2.7.tar.gz  

二: 安装jdk

tar -zxvf jdk-8u401-linux-aarch64.tar.gz  

mv jdk1.8.0_401/ /usr/local/jdk

vim /etc/profile 

到最后加上:

---

###jdk

export JAVA_HOME=/usr/local/jdk
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin

---

vim /root/.bash_profile

---
###jdk

export JAVA_HOME=/usr/local/jdk
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
---


source /etc/profile

source /root/.bash_profile


java -version 

image.png

二:安装redis

yum install -y tar make gcc gcc-c++ 
tar -zxvf redis-6.2.7.tar.gz
cd redis-6.2.7/
make MALLOC=libc
make install 

image.png


mkdir -p /usr/local/redis
cd /root/redis-6.2.7 
 cp -p redis.conf /usr/local/redis/
cd src/
cp -p redis* /usr/local/redis/ 
 cd /usr/local/redis/
 rm -rf *.d
 rm -rf *.o
 rm -rf *.c
 rm -rf *.h
 

image.png

启动redis 

echo 511 > /proc/sys/net/core/somaxconn
vim /etc/sysctl.conf

--
vm.overcommit_memory = 1
--

sysctl -p 


vim redis.conf
---
requirepass redisNewPass4!.com   ## 设置redis 登录密码:

注释掉:
bind 127.0.0.1 -::1

模式改为: no 
protected-mode no

ARM 架构 打开这个最后一行的注释

ignore-warnings ARM64-COW-BUG

---

image.png image.png image.png image.png

启动redis
   ./redis-server redis.conf &

image.png

三: 安装rabbitmq

rpm -ivh erlang-26.2.2-1.el8.aarch64.rpm
rpm -ivh rabbitmq-server-3.12.13-1.el8.noarch.rpm

image.png


启动:
  /sbin/service rabbitmq-server start
   /sbin/service rabbitmq-server status

image.png

列出插件:
rabbitmq-plugins list

管控台插件开启
 rabbitmq-plugins enable rabbitmq_management

image.png image.png

设置登录密码:

添加一个新的用户 
创建账号 与密码
rabbitmqctl add_user admin 123 

修改用密码:
rabbitmqctl change_password admin 'rabbitNewPass4!.com'
设置用户角色 
rabbitmqctl set_user_tags admin administrator 

image.png

登录:
  http://10.0.2.41:15672 
用户名/密码:
  admin/rabbitNewPass4!.com

image.png image.png

四: 安装MySQL8.0.36

tar -zxvf mysql8.0.36-rpm.tar.gz

cd mysql80/

yum localinstall -y mysql-community-*

image.png

image.png image.png

启动MySQL

service mysqld start 

chkconfig mysqld on

 
 从日志 查看 安装 密码:
  cat /var/log/mysql.log |grep password 

image.png

找到mysql 的初始化root 密码 Kqx8C.-jsdp4

image.png

mysql -uroot -p

image.png

set password = 'NTNewPass4!.com';

flush privileges;

use mysql;
update user set host = '%' where user = 'root';
select user,host from mysql.user;
flush privileges;

exit;


image.png image.png

从新登录MySQL

 mysql -uroot -p 
                   ---> 数据root密码:NTNewPass4!.com

ALTER USER 'root'@'%' IDENTIFIED BY 'NTNewPass4!.com' PASSWORD EXPIRE NEVER;

use mysql;


ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'NTNewPass4!.com';             


flush privileges;

image.png

远程native 登录

image.png image.png