千家信息网

Cento7.4安装mycat和mycat-eye

发表于:2025-01-21 作者:千家信息网编辑
千家信息网最后更新 2025年01月21日,前提: 环境要求已安装JDK1.7+版本 已安装mysql客户端(yum install mysql) 操作系统IP:192.168.75.48安装mycat下载解压wget http://dl
千家信息网最后更新 2025年01月21日Cento7.4安装mycat和mycat-eye

前提:


  环境要求已安装JDK1.7+版本  已安装mysql客户端(yum install mysql)  操作系统IP:192.168.75.48

安装mycat


下载解压

wget http://dl.mycat.io/1.6.5/Mycat-server-1.6.5-release-20180122220033-linux.tar.gztar -zxvf Mycat-server-1.6.5-release-20180122220033-linux.tar.gz -C /usr/local/cd /usr/local/mycat/conf

根据实际情况修改schema.xml,server.xml
例如:
schema.xml:

                                                                             show slave status                                                    

server.xml:

        0     1    1      0          2    false                                         0                65535        0        1        1                                0                    1                64k                1k        0                384m                false                                                                                xxxxxxxx        xx_app,xx_data,xx_dubbo_monitor,xx_log,xx_mis,xx_data,xx_task                                user        xx_app        true    

修改环境变量

echo export PATH=$PATH:/usr/local/mycat/bin >>/etc/profileecho export MYCAT_HOME=/usr/local/mycat >> /etc/profilesource /etc/profile

创建mycat用户

groupadd mycat -g 910useradd  mycat -g 910chown -R mycat:mycat /usr/local/mycat

启动mycat

cd /usr/local/mycat/bin./mycat start

命令行登陆
mysql -u xx_Corn_User -pxxxxxx -P8066 -h 127.0.0.1

安装zookeeper


下载解压

wget  http://mirrors.hust.edu.cn/apache/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gztar -zxvf zookeeper-3.4.6.tar.gz -C /usr/local/cd /usr/local/zookeeper-3.4.6/confcp zoo_sample.cfg zoo.cfg

启动zookeeper

cd /usr/local/zookeeper-3.4.6/bin/./zkServer.sh start

安装mycat-eye


下载解压

wget https://raw.githubusercontent.com/MyCATApache/Mycat-download/master/mycat-web-1.0/Mycat-web-1.0-SNAPSHOT-20160617163048-linux.tar.gztar -zxvf Mycat-web-1.0-SNAPSHOT-20160617163048-linux.tar.gz  -C /usr/local/

修改zookeeper地址

cd /usr/local/mycat-web/mycat-web/WEB-INF/classesvi mycat.properties zookeeper=localhost:2181 ->zookeeper=127.0.0.1:2181

启动mycat-eye

cd /usr/local/mycat-web./start.sh &

访问mycat-eye

http://192.168.75.48:8082/mycat

0