安装 jdk 1.7.0
wget http://dl.mycat.io/1.6.5/Mycat-server-1.6.5-release-20180122220033-linux.tar.gz
[root@bogon ~]# tar zxf Mycat-server-1.6.5-release-20180122220033-linux.tar.gz
[root@bogon ~]# rpm -qa | grep java
java-1.7.0-openjdk-headless-1.7.0.191-2.6.15.5.el7.x86_64
java-1.7.0-openjdk-1.7.0.191-2.6.15.5.el7.x86_64
java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64
tzdata-java-2018e-3.el7.noarch
python-javapackages-3.4.1-11.el7.noarch
javapackages-tools-3.4.1-11.el7.noarch
java-1.8.0-openjdk-headless-1.8.0.181-7.b13.el7.x86_64
#不需要删除
[root@bogon ~]# rpm -e --nodeps tzdata-java-2018e-3.el7.noarch
[root@bogon ~]# rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.181-7.b13.el7.x86_64
#在解压 在复制到 /usr/local/java
[root@bogon ~]# mkdir /usr/local/java
[root@bogon ~]# mv ./jdk1.8.0_211/ /usr/local/java
[root@bogon ~]# adduser mycat
[root@bogon ~]# mv mycat/ /usr/local/
[root@bogon ~]# cd /usr/local/
[root@bogon local]# chown mycat:mycat -R mycat/
[root@bogon conf]# pwd
/usr/local/mycat/conf
[root@bogon conf]# vim wrapper.conf
#默认的内存大小 mycat
wrapper.java.additional.5=-XX:MaxDirectMemorySize=2G
wrapper.java.additional.6=-Dcom.sun.management.jmxremote
[root@bogon conf]# vim ~/.bash_profile
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$CLASSPATH/bin:$PATH
export MyCAT_HOME=/usr/local/mycat
export PATH=$MyCAT_HOME/bin:$PATH
export JAVA_HOME=/usr/local/java/jdk1.8.0_211
export PATH=$JAVA_HOME/bin:$PATH
[root@bogon conf]# source ~/.bash_profile
#启动成功了
[root@bogon jdk1.8.0_211]# mycat start
[root@bogon logs]# pwd
/usr/local/mycat/logs
[root@bogon logs]# more wrapper.log
[root@bogon jdk1.8.0_211]# ps -ef