网站建设资讯

NEWS

网站建设资讯

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.gz
tar -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/profile
echo export MYCAT_HOME=/usr/local/mycat >> /etc/profile
source /etc/profile

创建mycat用户

groupadd mycat -g 910
useradd  mycat -g 910
chown -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.gz
tar -zxvf zookeeper-3.4.6.tar.gz -C /usr/local/
cd /usr/local/zookeeper-3.4.6/conf
cp 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.gz
tar -zxvf Mycat-web-1.0-SNAPSHOT-20160617163048-linux.tar.gz  -C /usr/local/

修改zookeeper地址

cd /usr/local/mycat-web/mycat-web/WEB-INF/classes
vi 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
Cento7.4安装mycat和mycat-eye


网页题目:Cento7.4安装mycat和mycat-eye
网站网址:http://njwzjz.com/article/pshsop.html