官网:https://github.com/dianping/cat/wiki/readme_server
下载:https://github.com/dianping/cat/releases/download/3.1.0/cat-home.war
https://github.com/dianping/cat/archive/refs/tags/3.1.0.tar.gz
参考文档:https://github.com/dianping/cat/wiki/readme_server
本次没有编译安装
需要软件:
apache-tomcat-8.5
安装配置:
mkdir /data/ chmod -R 777 /data/ mkdir /data/appdatas/cat -p mkdir /data/applogs/cat -p cd /usr/local/apache-tomcat-8.5.37/webapps mv /root/cat-home.war cat.war # 配置文件 cd /data/appdatas/cat/ [root@centos-103 cat]# cat client.xml <?xml version="1.0" encoding="utf-8"?> <config mode="client"> <servers> <server ip="10.1.1.1" port="2280" http-port="8080"/> # 修改为本机 IP </servers> </config> [root@centos-103 cat]# cat datasources.xml <?xml version="1.0" encoding="utf-8"?> <data-sources> <data-source id="cat"> <maximum-pool-size>3</maximum-pool-size> <connection-timeout>1s</connection-timeout> <idle-timeout>10m</idle-timeout> <statement-cache-size>1000</statement-cache-size> <properties> <driver>com.mysql.jdbc.Driver</driver> # # 配置数据库相关 <url><![CDATA[jdbc:mysql://xxx:3306/cat]]></url> <user>xxx</user> <password>xxx</password> <connectionProperties><![CDATA[useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&socketTimeout=120000]]></connectionProperties> </properties> </data-source> </data-sources> touch server.xml. # server.xml不做集群就不需要 <config local-mode="false" hdfs-machine="false" job-machine="true" alert-machine="false"> <storage local-base-dir="/data/appdatas/cat/bucket/" max-hdfs-storage-time="7" local-report-storage-time="7" local-logivew-storage-time="7"> </storage> <console default-domain="Cat" show-cat-domain="true"> <remote-servers>127.0.0.1:8080</remote-servers> <remote-servers>127.0.0.1:8080</remote-servers> </console> </config>
# 数据库导入
# 安装数据库mysql 5.7(自己安装) cd /data tar 3.1.0.tar.gz cd /data/cat-3.1.0/script mysql -h xxx -u xx -p use cat source CatApplication.sql
# 启动
cd /usr/local/apache-tomcat/bin ./start.sh # 生成的数据存放在/data/appdatas/cat目录下
# 网页访问
http://10.1.1.1:8080/cat
默认账号密码 admin/admin
第一次进来的时候,cat服务器这个地方报错,需要修改
http://10.1.1.103:8080/cat/s/login或者点击 configs按钮输入账号密码
点击全局系统配置----》点击客户端路由:将 127.0.0.1全部换成 10.1.1.1 服务器 IP,之后就正常了
含义请参考:
https://blog.csdn.net/weixin_43790613/article/details/124528312?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-12-124528312-blog-73237394.235^v43^pc_blog_bottom_relevance_base7&spm=1001.2101.3001.4242.7&utm_relevant_index=15