[BEGIN] 2018/6/2 17:55:10[root@iZqmo9i3j77p7eZ~]#cd /usr/local/src/
[root@iZqmo9i3j77p7eZ src]#wget http://dl.mycat.io/1.6.5/Mycat-server-1.6.5-release-20180122220033-linux.tar.gz
--2018-06-02 17:55:20-- http://dl.mycat.io/1.6.5/Mycat-server-1.6.5-release-20180122220033-linux.tar.gz
Resolving dl.mycat.io (dl.mycat.io)...210.51.26.184Connecting to dl.mycat.io (dl.mycat.io)|210.51.26.184|:80... connected.
HTTP request sent, awaiting response...200OK
Length:17480035 (17M) [application/octet-stream]
Saving to: ‘Mycat-server-1.6.5-release-20180122220033-linux.tar.gz’100%[====================================================================================================================================================================================================================================>] 17,480,035 507KB/s in34s2018-06-02 17:55:55 (502 KB/s) - ‘Mycat-server-1.6.5-release-20180122220033-linux.tar.gz’ saved [17480035/17480035]
[root@iZqmo9i3j77p7eZ src]#wget http://download.oracle.com/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1527933488_83c1bdc9836fadfe600eceed8afc9a1c
--2018-06-02 17:56:35-- http://download.oracle.com/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1527933488_83c1bdc9836fadfe600eceed8afc9a1c
Resolving download.oracle.com (download.oracle.com)...23.218.25.93Connecting to download.oracle.com (download.oracle.com)|23.218.25.93|:80... connected.
HTTP request sent, awaiting response...200OK
Length:153530841 (146M) [application/x-gzip]
Saving to: ‘jdk-7u80-linux-x64.tar.gz?AuthParam=1527933488_83c1bdc9836fadfe600eceed8afc9a1c’100%[====================================================================================================================================================================================================================================>] 153,530,841 5.96MB/s in24s2018-06-02 17:57:00 (6.08 MB/s) - ‘jdk-7u80-linux-x64.tar.gz?AuthParam=1527933488_83c1bdc9836fadfe600eceed8afc9a1c’ saved [153530841/153530841]
[root@iZqmo9i3j77p7eZ src]#rpm -qa|grep java
[root@iZqmo9i3j77p7eZ src]#ll
total 167008
-rw-r--r-- 1 root root 153530841 Jul 8 2015 jdk-7u80-linux-x64.tar.gz?AuthParam=1527933488_83c1bdc9836fadfe600eceed8afc9a1c-rw-r--r-- 1 root root 17480035 Jan 22 22:07 Mycat-server-1.6.5-release-20180122220033-linux.tar.gz
[root@iZqmo9i3j77p7eZ src]#mv jdk-7u80-linux-x64.tar.gz\?AuthParam\=1527933488_83c1bdc9836fadfe600eceed8afc9a1c jdk-7u80-linux-x64.tar.gz
[root@iZqmo9i3j77p7eZ src]#tar zxf jdk-7u80-linux-x64.tar.gz -C /usr/local/
[root@iZqmo9i3j77p7eZ src]#vim /etc/profile
[root@iZqmo9i3j77p7eZ src]#source /etc/profile
[root@iZqmo9i3j77p7eZ src]#java
Usage: java [-options] class[args...]
(to execute aclass)or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:-d32 use a 32-bit data model ifavailable-d64 use a 64-bit data model ifavailable-server to select the "server"VM
The default VMisserver.-cp
-classpath A : separated list of directories, JAR archives,and ZIP archives to search for classfiles.-D=set a system property-verbose:[class|gc|jni]
enable verbose output-version print product version andexit-version:require the specified version to run-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs inthe version search-? -help printthis help message-X print help on non-standard options-ea[:...|:]-enableassertions[:...|:]
enable assertions with specified granularity-da[:...|:]-disableassertions[:...|:]
disable assertions with specified granularity-esa | -enablesystemassertions
enable system assertions-dsa | -disablesystemassertions
disable system assertions-agentlib:[=]
load native agent library, e.g. -agentlib:hprof
see also,-agentlib:jdwp=help and -agentlib:hprof=help-agentpath:[=]
load native agent library by full pathname-javaagent:[=]
load Java programming language agent, see java.lang.instrument-splash:show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html formore details.
[root@iZqmo9i3j77p7eZ src]#javac
Usage: javac where possible options include:-g Generate all debugging info-g:none Generate no debugging info-g:{lines,vars,source} Generate only some debugging info-nowarn Generate no warnings-verbose Output messages about what the compiler isdoing-deprecation Output source locations where deprecated APIs are used-classpath Specify where to find user class files andannotation processors-cp Specify where to find user class files andannotation processors-sourcepath Specify where to find input source files-bootclasspath Override location of bootstrap classfiles-extdirs Override location of installed extensions-endorseddirs Override location of endorsed standards path-proc:{none,only} Control whether annotation processing and/or compilation isdone.-processor [,,...] Names of the annotation processors to run; bypasses default discovery process-processorpath Specify where to find annotation processors-d Specify where to place generated classfiles-s Specify where to place generated source files-implicit:{none,class} Specify whether or not to generate class files forimplicitly referenced files-encoding Specify character encoding used by source files-source Provide source compatibility with specified release-target Generate class files forspecific VM version-version Version information-help Print a synopsis of standard options-Akey[=value] Options to passto annotation processors-X Print a synopsis of nonstandard options-J Pass directly to the runtime system-Werror Terminate compilation ifwarnings occur
@ Read options and filenames fromfile
[root@iZqmo9i3j77p7eZ src]#java -version
java version "1.7.0_80"Java(TM) SE Runtime Environment (build1.7.0_80-b15)
Java HotSpot(TM)64-Bit Server VM (build 24.80-b11, mixed mode)
[root@iZqmo9i3j77p7eZ src]#ll
total 167008
-rw-r--r-- 1 root root 153530841 Jul 8 2015 jdk-7u80-linux-x64.tar.gz-rw-r--r-- 1 root root 17480035 Jan 22 22:07 Mycat-server-1.6.5-release-20180122220033-linux.tar.gz
[root@iZqmo9i3j77p7eZ src]#tar xf Mycat-server-1.6.5-release-20180122220033-linux.tar.gz -C /usr/local/
[root@iZqmo9i3j77p7eZ src]#cd /usr/local/
[root@iZqmo9i3j77p7eZ local]#ls
aegis bin etc games include jdk1.7.0_80 lib lib64 libexec mycat sbin share src
[root@iZqmo9i3j77p7eZ local]#ll
total 52drwxr-xr-x 6 root root 4096 May 30 10:25aegis
drwxr-xr-x. 2 root root 4096 Nov 5 2016bin
drwxr-xr-x. 2 root root 4096 Nov 5 2016etc
drwxr-xr-x. 2 root root 4096 Nov 5 2016games
drwxr-xr-x. 2 root root 4096 Nov 5 2016include
drwxr-xr-x 8 10 143 4096 Apr 11 2015 jdk1.7.0_80
drwxr-xr-x. 2 root root 4096 Nov 5 2016lib
drwxr-xr-x. 2 root root 4096 Nov 5 2016lib64
drwxr-xr-x. 2 root root 4096 Nov 5 2016libexec
drwxr-xr-x 7 root root 4096 Jun 2 17:58mycat
drwxr-xr-x. 2 root root 4096 Nov 5 2016sbin
drwxr-xr-x. 6 root root 4096 May 26 11:18share
drwxr-xr-x. 2 root root 4096 Jun 2 17:57src
[root@iZqmo9i3j77p7eZ local]#useradd mycat
[root@iZqmo9i3j77p7eZ local]#ll
total 52drwxr-xr-x 6 root root 4096 May 30 10:25aegis
drwxr-xr-x. 2 root root 4096 Nov 5 2016bin
drwxr-xr-x. 2 root root 4096 Nov 5 2016etc
drwxr-xr-x. 2 root root 4096 Nov 5 2016games
drwxr-xr-x. 2 root root 4096 Nov 5 2016include
drwxr-xr-x 8 10 143 4096 Apr 11 2015 jdk1.7.0_80
drwxr-xr-x. 2 root root 4096 Nov 5 2016lib
drwxr-xr-x. 2 root root 4096 Nov 5 2016lib64
drwxr-xr-x. 2 root root 4096 Nov 5 2016libexec
drwxr-xr-x 7 root root 4096 Jun 2 17:58mycat
drwxr-xr-x. 2 root root 4096 Nov 5 2016sbin
drwxr-xr-x. 6 root root 4096 May 26 11:18share
drwxr-xr-x. 2 root root 4096 Jun 2 17:57src
[root@iZqmo9i3j77p7eZ local]#chown -R mycat:mycat mycat/
[root@iZqmo9i3j77p7eZ local]#cd mycat/
[root@iZqmo9i3j77p7eZ mycat]#ls -l
total 24drwxr-xr-x 2 mycat mycat 4096 Jun 2 17:58bin
drwxrwxrwx2 mycat mycat 4096 Mar 1 2016catlet
drwxrwxrwx4 mycat mycat 4096 Jun 2 17:58conf
drwxr-xr-x 2 mycat mycat 4096 Jun 2 17:58lib
drwxrwxrwx2 mycat mycat 4096 Jan 22 22:01logs-rwxrwxrwx 1 mycat mycat 219 Jan 22 22:00version.txt
[root@iZqmo9i3j77p7eZ mycat]#cd bin/
[root@iZqmo9i3j77p7eZ bin]#ls
dataMigrate.sh init_zk_data.sh mycat rehash.sh startup_nowrap.sh wrapper-linux-ppc-64 wrapper-linux-x86-32 wrapper-linux-x86-64[root@iZqmo9i3j77p7eZ bin]#cd /usr/local/mycat/conf/
[root@iZqmo9i3j77p7eZ conf]#ls -l
total 108
-rwxrwxrwx 1 mycat mycat 88 Jan 22 22:00 autopartition-long.txt-rwxrwxrwx 1 mycat mycat 48 Jan 22 22:00 auto-sharding-long.txt-rwxrwxrwx 1 mycat mycat 62 Jan 22 22:00 auto-sharding-rang-mod.txt-rwxrwxrwx 1 mycat mycat 334 Jan 22 22:00cacheservice.properties-rwxrwxrwx 1 mycat mycat 3244 Jan 22 22:00dbseq.sql-rwxrwxrwx 1 mycat mycat 439 Jan 22 22:00ehcache.xml-rwxrwxrwx 1 mycat mycat 2132 Jan 22 22:00index_to_charset.properties-rwxrwxrwx 1 mycat mycat 1253 Dec 1 2016log4j2.xml-rwxrwxrwx 1 mycat mycat 178 Jan 22 22:00migrateTables.properties-rwxrwxrwx 1 mycat mycat 262 Jan 22 22:00myid.properties-rwxrwxrwx 1 mycat mycat 15 Jan 22 22:00 partition-hash-int.txt-rwxrwxrwx 1 mycat mycat 102 Jan 22 22:00 partition-range-mod.txt-rwxrwxrwx 1 mycat mycat 4794 Jan 22 22:00rule.xml-rwxrwxrwx 1 mycat mycat 4219 Jan 22 22:00schema.xml-rwxrwxrwx 1 mycat mycat 413 Jan 22 22:00sequence_conf.properties-rwxrwxrwx 1 mycat mycat 75 Jan 22 22:00sequence_db_conf.properties-rwxrwxrwx 1 mycat mycat 27 Jan 22 22:00sequence_distributed_conf.properties-rwxrwxrwx 1 mycat mycat 51 Jan 22 22:00sequence_time_conf.properties-rwxrwxrwx 1 mycat mycat 4623 Jan 22 22:00server.xml-rwxrwxrwx 1 mycat mycat 16 Jan 22 22:00 sharding-by-enum.txt-rwxrwxrwx 1 mycat mycat 4186 Jan 22 22:05wrapper.conf
drwxrwxrwx2 mycat mycat 4096 Jun 2 17:58zkconf
drwxrwxrwx2 mycat mycat 4096 Jun 2 17:58zkdownload
[root@iZqmo9i3j77p7eZ conf]#vim wrapper.conf
-rwxrwxrwx 1 mycat mycat 4623 Jan 22 22:00server.xml-rwxrwxrwx 1 mycat mycat 16 Jan 22 22:00 sharding-by-enum.txt-rwxrwxrwx 1 mycat mycat 4186 Jan 22 22:05wrapper.conf
drwxrwxrwx2 mycat mycat 4096 Jun 2 17:58zkconf
drwxrwxrwx2 mycat mycat 4096 Jun 2 17:58zkdownload
[root@iZqmo9i3j77p7eZ bin]#vim /etc/profile
[root@iZqmo9i3j77p7eZ bin]#source /etc/profile
[root@iZqmo9i3j77p7eZ bin]#mycat
Usage: /usr/local/mycat/bin/mycat { console | start | stop | restart | status |dump }
[root@iZqmo9i3j77p7eZ bin]#mycat status
Mycat-server is notrunning.
[root@iZqmo9i3j77p7eZ bin]#mycat start
Starting Mycat-server...