JDK+Tomcat+Zookeeper+DubboAdmin安装教程
JDK+Tomcat+Zookeeper+DubboAdmin安装教程
1. 安装内容:
JDK 1.8.131
Tomcat 7.0.77
Zookeeper 3.4.9
Dubbo admin 2.5.4-SNAPSHOT
2. 安装步骤:
2.1 JDK的安装
1. jdk安装
rpm包:
rpm -ivh /home/test/download/jdk-8u131-linux-x64.rpm
生成链接以便版本升级
ln -s jdk1.8.0_131 latest
ln -s latest default
2. 配置环境变量
vi /etc/profile
export JAVA_HOME=/usr/java/default
export JAVA_BIN=$JAVA_HOME/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
3. 使配置生效
source /etc/profile
4. 测试jdk.
java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
2.2 Tomcat的安装
1. 解压缩
cd /home/test/
tar -zxvf /home/test/download/apache-tomcat-7.0.77.tar.gz
2. 启动Tomcat
cd /home/test/download/apache-tomcat-7.0.77/bin
./startup.sh
Using CATALINA_BASE: /home/test/apache-tomcat-7.0.77
Using CATALINA_HOME: /home/test/apache-tomcat-7.0.77
Using CATALINA_TMPDIR: /home/test/apache-tomcat-7.0.77/temp
Using JRE_HOME: /usr/java/default
Using CLASSPATH: /home/test/apache-tomcat-7.0.77/bin/bootstrap.jar:/home/test/apache-tomcat-7.0.77/bin/tomcat-juli.jar
Tomcat started.
3. 测试Tomcat:
在浏览器输入: http://ip:8080
出现tomcat的页面表示安装成功.
4. 停止Tomcat
./shutdown.sh
2.3 Zookeeper安装
解压
cd /home/test
tar -zxvf /home/test/download/zookeeper-3.4.9.tar.gz
配置zoo.cfg
vim /zookeeper-3.4.9/conf/zoo.cfg
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/home/test/zookeeper-3.4.9/data
dataLogDir=/home/test/zookeeper-3.4.9/log
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
运行
./zookeeper-3.4.9/bin/zkServer.sh start
2.4 Dubboadmin的安装
修改端口为8090
vi server.xml
<Connector port="8080" protocol="HTTP/1.1"
改为
8090
删除tomcat ROOT文件夹 并新建空目录ROOT
cd /home/test/apache-tomcat-7.0.77/webapps
rm -rf ROOT
mkdir ROOT
解压dubboadmin war包到ROOT目录中
cd ROOT
jar -xvf /home/test/download/dubbo-admin-2.5.4-SNAPSHOT.war
修改dubbo配置
在ROOT/WEB-INF中修改dubbo.properties
重启tomcat
./bin/shutdown.sh
./bin/startup.sh
测试
在浏览器访问
一些出现的问题:
- 如果第一次启动tomcat有问题
请在JVM环境中解决
打开$JAVA_PATH/jre/lib/security/java.security这个文件,找到下面的内容:
注意有时候默认是random,而不是urandom,记得加个u
securerandom.source=file:/dev/random
替换成
securerandom.source=file:/dev/./urandom
注意:在linux中部署web应用jar包时,如果启动特别慢,也可以按照上面方法进行修改
2.5 centos安装mysql
CentOS 7之后的版本yum的默认源中使用MariaDB替代原先MySQL,因此安装方式较为以往有一些改变:
下载mysql的源
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
安装yum库
yum localinstall -y mysql57-community-release-el7-7.noarch.rpm
安装MySQL
yum install -y mysql-community-server
启动MySQL服务
systemctl start mysqld.service
MySQL5.7加强了root用户的安全性,因此在第一次安装后会初始化一个随机密码,以下为查看初始随机密码的方式
grep 'temporary password' /var/log/mysqld.log
结果如下:
使用初始随机密码登录后MySQL会强制要求修改密码,否则无法正常使用,(密码必须包含小写、大写字母及特殊字符,当然也有其他方法不受此限制,再次不多做描述),修改方法如下:
SET PASSWORD = PASSWORD('your new password');
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
flush privileges;
然后退出后即可用新密码登录。
远程连接授权:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your password' WITH GRANT OPTION;
开通端口(默认3306):
firewall-cmd --add-port=3306/tcp
JDK+Tomcat+Zookeeper+DubboAdmin安装教程的更多相关文章
- 单机版ZooKeeper的安装教程
之前一直没有时间去整理,现在抽出几分钟时间整理以下,有问题的在评论区留言即可. 前期准备JDK环境(ZK需要jdk进行编译,本文以jdk1.8.0_211为例).Linux系统(本文以Centos7为 ...
- 2018-2019-2 (内附jdk与webgoat完整安装教程)《网络对抗技术》Exp9 Web安全基础 Week13 20165233
Exp9 Web安全基础 目录 一.基础问题 二.实验步骤 实验前准备:jdk与webgoat的安装 实验点一:SQL 命令注入(Command Injection) 数字型注入(Numeric SQ ...
- jdk+tomcat+mysql一键安装脚本
最近在搞一个web项目部署,每次都要安装jdk.配置环境变量.安装tomcat和mysql.对于非开发人员,还是有点难度的,经常出错,然后就整理了一个自动化的脚本. JDKinstall.bat @e ...
- CentOS7 服务器 JDK+TOMCAT+MYSQL+redis 安装日志
防火墙配置(参考 CentOS7安装iptables防火墙) 检查是否安装iptables #先检查是否安装了iptables service iptables status #安装iptables ...
- Linux JDK+TOMCAT+MYSQL+redis 安装日志
检查是否安装iptables #先检查是否安装了iptablesservice iptables status#安装iptablesyum install -y iptables#升级iptables ...
- Linux JDK Tomcat Nginx MariaDB 安装,Nginx 多域名转发配置
安装JDK rpm包下载地址(jdk-7u17 ): http://www.oracle.com/technetwork/java/javase/downloads/java-archive-down ...
- jdk的下载与安装教程
最近在学逆向,就是要反编译人家的java代码,在这之前要先安装环境,下面是下载和安装JDK的教程: 1.JDK下载地址: http://www.oracle.com/technetwork/java/ ...
- JDK的下载及安装教程图解(超详细哦~)
一.本人电脑系统介绍及JDK下载途径 1.先说明一下我的电脑为win10系统,64位操作系统~ 2.我选择下载的JDK版本为1.8版本.给大家来两个下载渠道,方便大家的下载~ JDK官网:https: ...
- 【zookeeper】安装教程文档需下载
请查看文件https://download.csdn.net/download/qq_42158942/11846847 zookeeper的作用 • ZooKeeper 是一个开源的分布式协调服务, ...
随机推荐
- div的替代品
人们在标签使用中最常见到的错误之一就是随意将HTML5的<section>等价于<div>--具体地说,就是直接用作替代品(用于样式).在XHTML或者HTML4中,我们常看到 ...
- Buffer深入分析
Buffer Buffer的类图如下: 除了Boolean,其他基本数据类型都有对应的Buffer,但是只有ByteBuffer才能和Channel交互.只有ByteBuffer才能产生Direct的 ...
- python os模块学习
一.os模块概述 Python os模块包含普遍的操作系统功能.如果你希望你的程序能够与平台无关的话,这个模块是尤为重要的. 二.常用方法 1.os.name 输出字符串指示正在使用的平台.如果是wi ...
- “java.lang.IllegalArgumentException: Failed to evaluate expression ‘ROLE_USER’”报错的解决
这个问题出现在Spring Security的相关配置中,找到原来的这一行: <security:intercept-url pattern="/**" access=&qu ...
- DB2简介和安装部署
一.DB2相关概念 1.DB2体系结构: DB2体系结构中的最高一层是系统,一个系统表示DB2的一个安装.在由很多机器组成 的网络环境中,我们有时=也称系统为数据库分区,一个系统可以包含多个DB2实例 ...
- Python操作redis系列之 列表(list) (四)
# -*- coding: utf- -*- import redis r =redis.Redis(host=,password="ZBHRwlb1608") 1. Lpush ...
- 【RAC】RAC相关基础知识
[RAC]RAC相关基础知识 1.CRS简介 从Oracle 10G开始,oracle引进一套完整的集群管理解决方案—-Cluster-Ready Services,它包括集群连通性.消息和锁. ...
- EntityFramework连接SQLite
EF很强大,可惜对于SQLite不支持CodeFirst模式(需要提前先设计好数据库表结构),不过对SQLite的数据操作还是很好用的. 先用SQLiteManager随便创建一个数据库和一张表:
- [leetcode-563-Binary Tree Tilt]
Given a binary tree, return the tilt of the whole tree.The tilt of a tree node is defined as the abs ...
- [leetcode-537-Complex Number Multiplication]
Given two strings representing two complex numbers. You need to return a string representing their m ...