tar -xzf jdk-8u201-linux-x64.tar.gz -C /usr/local
启用环境变量:
# vim /etc/profile
export JAVA_HOME=/usr/local/jdk1.8.0_201
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/sbin
然后source使其生效
source /etc/profile
java -version
2、mariadb安装yum install mariadb-server mariadb
systemctl start mariadb
systemctl status mariadb
systemctl enable mariadb
# 配置root密码
mysqladmin -u root password "abc123"
# 添加远程访问权限
mysql -u root -pabc123
use mysql;
grant all privileges on *.* to root@'%' identified by 'abc123';
flush privileges;
3、wgcloud安装3.1、初始化数据库wget https://www.wgstart.com/download/3.4.7/wgcloud-v3.4.7.tar.gz
tar -zxvf wgcloud-v3.4.7.tar.gz -C /usr/local
初始化数据库,导入sql文件:
mysql -u root -pabc123
create database wgcloud character set utf8 collate utf8_general_ci;
create user wgcloud@localhost identified by 'wgcloud123';
grant all privileges on *.* to wgcloud@'%' identified by 'wgcloud123';
grant all privileges on wgcloud.* to wgcloud@localhost;
use wgcloud;
source /usr/local/wgcloud-v3.4.7/wgcloud-MySQL.sql;
3.2、配置和启动服务端vi /usr/local/wgcloud-v3.4.7/server/config/application.yml
url: jdbc:mysql://192.168.52.20:3306/wgcloud?characterEncoding=utf-8&characterSetResults=utf8&autoReconnect=true&useSSL=false&allowMultiQueries=true
username: wgcloud
password: wgcloud123
account: admin
#管理员登录账号的密码
accountPwd: admin123
启动wgcloud server:
cd usr/local/wgcloud-v3.4.7/server
sh start.sh
3.3、配置和启动客户端cat /usr/local/wgcloud-v3.4.7/agent/config/application.properties
serverUrl=http://192.168.52.20:9999
wgToken=wgcloud
启动wgcloud agent:
cd /usr/local/wgcloud-v3.4.7/agent
sh start.sh
4、访问登录页面通过http://192.168.52.20:9999访问登录页面,输入登陆账号:admin,密码:admin123。
Copyright © 2024 妖气游戏网 www.17u1u.com All Rights Reserved