当前位置:网站首页>Open source summer | Cloud server ECS installs Mysql, JDK, RocketMQ
Open source summer | Cloud server ECS installs Mysql, JDK, RocketMQ
2022-08-04 21:49:00 【InfoQ】
云服务器ECS
远程连接ECS
安装JDK
ls /usr/local/src/
cd /usr/local/src/
tar -zxvf jdk-8u251-linux-x64.tar.gz
mv jdk1.8.0_251 /usr/local/
vim /etc/profile
JAVA_HOME=/usr/local/jdk1.8.0_251
CLASS_PATH=.:$JAVA_HOME/lib
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASS_PATH PATH
source /etc/profile
java -version
##############
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
安装RocketMQ
RocketMQ安装操作
unzip rocketmq-all-4.5.0-bin-release.zip
mv rocketmq-all-4.5.0-bin-release /usr/local/
cd /usr/local/rocketmq-all-4.5.0-bin-release/
mkdir -p /data/logs/rocketmqlogs
sed -i 's#${user.home}/logs/#/data/logs/#g' conf/logback_broker.xml
sed -i 's#${user.home}/logs/#/data/logs/#g' conf/logback_namesrv.xml
sed -i 's#${user.home}/logs/#/data/logs/#g' conf/logback_tools.xml
vim bin/runbroker.sh
JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m"
vim bin/runserver.sh
JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
vim bin/tools.sh
JAVA_OPT="${JAVA_OPT} -server -Xms128m -Xmx128m -Xmn256m -XX:PermSize=128m -XX:MaxPermSize=128m"
vim /usr/local/rocketmq-all-4.5.0-bin-release/conf/broker.conf
namesrvAddr=127.0.0.1:9876
brokerIP1=127.0.0.1
JAVA_HOME=/usr/local/jdk1.8.0_251
ROCKETMQ_HOME=/usr/local/rocketmq-all-4.5.0-bin-release
CLASS_PATH=.:$JAVA_HOME/lib
PATH=$JAVA_HOME/bin:$ROCKETMQ_HOME/bin:$PATH
export JAVA_HOME ROCKETMQ_HOME CLASS_PATH PATH
source /etc/profile
RocketMQ测试
nohup mqnamesrv>>/data/logs/mqnamesrv.log 2>&1 &
nohup mqbroker -n 127.0.0.1:9876 -c /usr/local/rocketmq-all-4.5.0-bin-release/conf/broker.conf autoCreateTopicEnable=true>> /data/logs/mqbroker.log 2>&1 &
ps -ef|grep mqnamesrv
ps -ef|grep mqbroker
export NAMESRV_ADDR=127.0.0.1:9876
tools.sh org.apache.rocketmq.example.quickstart.Producer
tools.sh org.apache.rocketmq.example.quickstart.Consumer
安装Mysql
wget http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server --nogpgcheck
mysql -V
systemctl start mysqld.service
grep "password" /var/log/mysqld.log
mysql -uroot -p
#修改密码安全策略为低(只校验密码长度,至少8位).
set global validate_password_policy=0;
ALTER USER 'root'@'localhost' IDENTIFIED BY '12345678';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '12345678';
边栏推荐
- 【uiautomation】微信好友列表获取(存储到txt中)
- What does Xinchuang mean?Which industries are involved?Why develop Xinchuang?
- LeetCode 199: 二叉树的右视图
- MySQL查询为啥慢了?
- 国际项目管理师PMP证书,值得考嘛?
- The upgrade and transformation plan of the fortress machine for medium and large commercial banks!Must see!
- 27. Dimensionality reduction
- OC-协议
- 硬件开发定制全流程解析
- LayaBox---TypeScript---structure
猜你喜欢
国际项目管理师PMP证书,值得考嘛?
stm32mp157系统移植 | 移植ST官方5.10内核到小熊派开发板
[Linear Algebra 02] 2 interpretations of AX=b and 5 perspectives of matrix multiplication
Rocketchip RISC-V Debug调试硬件相关(四)hartIsInReset
搬走地下空间开发利用“绊脚石” 中地数码取得地下空间透明化技术突破
【线性代数03】消元法展示以及AX=b的4种解情况
OD-Model [6]: YOLOv2
ROS packages visualization
基于 Milvus 和 ResNet50 的图像搜索(部署及应用)
docker 部署redis集群
随机推荐
The upgrade and transformation plan of the fortress machine for medium and large commercial banks!Must see!
C语言知识大全(一)——C语言概述,数据类型
Three ways to set a specific device UWP XAML view
《剑指offer》刷题分类
中大型商业银行堡垒机升级改造方案!必看!
1319_STM32F103串口BootLoader移植
ini怎么使用? C#教程
国际项目管理师PMP证书,值得考嘛?
Unknown point cloud structure file conversion requirements
基于声卡实现的音频存储示波器,可作为电磁学实验的测量仪表
docker 部署redis集群
【PCBA program design】Grip dynamometer program
七夕特制:《牛郎会织女》
热力学相关的两个定律
基于 Milvus 和 ResNet50 的图像搜索(部署及应用)
AXI interface application of Zynq Fpga image processing - the use of axi_lite interface
Red team kill-free development practice of simulated confrontation
LayaBox---TypeScript---Example
buu web
Analysis and treatment of Ramnit infectious virus