JDK 1.8.131 Tomcat 7.0.77 Zookeeper 3.4.9 Dubbo admin 2.5.4-SNAPSHOT
rpm包: rpm -ivh /home/test/download/jdk-8u131-linux-x64.rpm
生成链接以便版本升级 ln -s jdk1.8.0_131 latest ln -s latest default
source /etc/profile
在浏览器输入: http://ip:8080
出现tomcat的页面表示安装成功.
解压
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修改端口为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包时,如果启动特别慢,也可以按照上面方法进行修改
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.serviceMySQL5.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