MyCAT安装
预先安装Java运行环境
yum install -y java
安装MyCAT
#下载
curl -O https://github.com/MyCATApache/Mycat-Server/releases/download/Mycat-server-1675-release/Mycat-server-1.6.7.5-release-20200422133810-linux.tar.gz
#解压
tar xf Mycat-server-1.6.7.5-release-20200422133810-linux.tar.gz
mv mycat /app/
配置环境变量
echo 'export PATH=/app/mycat/bin:$PATH' >> /etc/profile
source /etc/profile
启动测试
[root@db01 mycat]# mycat start
Starting Mycat-server...
^[[A[root@db01 mycat]# cat wrapper.log
FATAL | wrapper | 2020/07/22 17:25:32 | ERROR: Could not write pid file /app/mycat/logs/mycat.pid: No such file or directory
[root@db01 mycat]# mkdir /app/mycat/logs/
[root@db01 mycat]# mycat start
Starting Mycat-server...
[root@db01 logs]# ss -ntlup|grep 8066
tcp LISTEN 0 100 [::]:8066 [::]:* users:(("java",pid=2580,fd=91))
[root@db01 logs]# mysql -uroot -p123456 -h 10.0.0.10 -P8066