1.下载tar包,前提安装jdk8
下载链接:https://download.csdn.net/download/qq_41085151/12710305
2.上传到/opt下解压
tar -zvxf xxx
#修改名称
mv zookeeper-3.4.9 zookeeper
3.制作开机脚本
vim /etc/init.d/zookeeper
ZK_PATH=/opt/zookeeper #安装路径
export JAVA_HOME=/opt/jdk1.8.0_212 #安装路径
case $1 in
start) sh $ZK_PATH/bin/zkServer.sh start;;
stop) sh $ZK_PATH/bin/zkServer.sh stop;;
status) sh $ZK_PATH/bin/zkServer.sh status;;
restart) sh $ZK_PATH/bin/zkServer.sh restart;;
*) echo "require start|stop|status|restart" ;;
esac
4.把脚本注册为service
增加权限
5.初始化zookeeper配置
拷贝/opt/zookeeper/conf/zoo_sample.cfg
到同一个目录下改个名字叫zoo.cfg
启动zookeeper
service zookeeper start
6.安装dubbo
解压apache-tomcat 和dubbo
tar -zvxf apache-tomcat-8.5.24.tar.gz
unzip dubbo-admin-2.6.0.rar -d dubbo
7.修改tomcat的conf中的server.xml
添加dubbo的路径,启动tomcat
cd /opt/apache-tomcat-8.5.24/bin/
./startup.sh
8.访问http://192.168.221.150:8080/dubbo/ 账号和密码默认为root
9.修改dubbo目录下的配置文件
cd /opt/dubbo/WEB-INF
vim dubbo.properties
下一章整合:https://blog.csdn.net/qq_41085151/article/details/107999806