IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Oracle TimesTen:Install on CentOS 6.8

    Adamhuan发表于 2017-06-05 03:20:07
    love 0

    操作系统版本:

    [root@oracle-me software]# cat /etc/redhat-release 
    CentOS release 6.8 (Final)
    [root@oracle-me software]#

    安装Java支持(1.5以上):

    [root@oracle-me bin]# java -version
    -bash: java: command not found
    [root@oracle-me bin]# 
    [root@oracle-me bin]# yum install java-1.8.0-openjdk.x86_64
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Install Process
    Loading mirror speeds from cached hostfile
     * base: centos.ustc.edu.cn
     * extras: mirrors.cn99.com
     * updates: mirrors.cn99.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.131-0.b11.el6_9 will be installed
    --> Processing Dependency: java-1.8.0-openjdk-headless = 1:1.8.0.131-0.b11.el6_9 for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: libjvm.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: libjli.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: libjava.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: libjvm.so()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: libjli.so()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: libjava.so()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: libgif.so.4()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: libawt.so()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64
    --> Running transaction check
    ---> Package giflib.x86_64 0:4.1.6-3.1.el6 will be installed
    ---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.131-0.b11.el6_9 will be installed
    --> Processing Dependency: tzdata-java >= 2014f-1 for package: 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: nss >= 3.28.4 for package: 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.x86_64
    --> Processing Dependency: jpackage-utils for package: 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.x86_64
    ---> Package xorg-x11-fonts-Type1.noarch 0:7.2-11.el6 will be installed
    --> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-11.el6.noarch
    --> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-11.el6.noarch
    --> Running transaction check
    ---> Package jpackage-utils.noarch 0:1.7.5-3.16.el6 will be installed
    ---> Package nss.x86_64 0:3.21.0-8.el6 will be updated
    --> Processing Dependency: nss = 3.21.0-8.el6 for package: nss-sysinit-3.21.0-8.el6.x86_64
    --> Processing Dependency: nss(x86-64) = 3.21.0-8.el6 for package: nss-tools-3.21.0-8.el6.x86_64
    ---> Package nss.x86_64 0:3.28.4-3.el6_9 will be an update
    --> Processing Dependency: nss-util >= 3.28.3 for package: nss-3.28.4-3.el6_9.x86_64
    --> Processing Dependency: nspr >= 4.13.0 for package: nss-3.28.4-3.el6_9.x86_64
    --> Processing Dependency: libnssutil3.so(NSSUTIL_3.24)(64bit) for package: nss-3.28.4-3.el6_9.x86_64
    ---> Package ttmkfdir.x86_64 0:3.0.9-32.1.el6 will be installed
    ---> Package tzdata-java.noarch 0:2017b-1.el6 will be installed
    --> Running transaction check
    ---> Package nspr.x86_64 0:4.11.0-1.el6 will be updated
    ---> Package nspr.x86_64 0:4.13.1-1.el6 will be an update
    ---> Package nss-sysinit.x86_64 0:3.21.0-8.el6 will be updated
    ---> Package nss-sysinit.x86_64 0:3.28.4-3.el6_9 will be an update
    ---> Package nss-tools.x86_64 0:3.21.0-8.el6 will be updated
    ---> Package nss-tools.x86_64 0:3.28.4-3.el6_9 will be an update
    ---> Package nss-util.x86_64 0:3.21.0-2.el6 will be updated
    ---> Package nss-util.x86_64 0:3.28.4-1.el6_9 will be an update
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =========================================================================================================================================================
     Package                                        Arch                      Version                                       Repository                  Size
    =========================================================================================================================================================
    Installing:
     java-1.8.0-openjdk                             x86_64                    1:1.8.0.131-0.b11.el6_9                       updates                    201 k
    Installing for dependencies:
     giflib                                         x86_64                    4.1.6-3.1.el6                                 base                        37 k
     java-1.8.0-openjdk-headless                    x86_64                    1:1.8.0.131-0.b11.el6_9                       updates                     32 M
     jpackage-utils                                 noarch                    1.7.5-3.16.el6                                base                        60 k
     ttmkfdir                                       x86_64                    3.0.9-32.1.el6                                base                        43 k
     tzdata-java                                    noarch                    2017b-1.el6                                   updates                    183 k
     xorg-x11-fonts-Type1                           noarch                    7.2-11.el6                                    base                       520 k
    Updating for dependencies:
     nspr                                           x86_64                    4.13.1-1.el6                                  base                       114 k
     nss                                            x86_64                    3.28.4-3.el6_9                                updates                    879 k
     nss-sysinit                                    x86_64                    3.28.4-3.el6_9                                updates                     51 k
     nss-tools                                      x86_64                    3.28.4-3.el6_9                                updates                    447 k
     nss-util                                       x86_64                    3.28.4-1.el6_9                                updates                     68 k
    
    Transaction Summary
    =========================================================================================================================================================
    Install       7 Package(s)
    Upgrade       5 Package(s)
    
    Total download size: 34 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/12): giflib-4.1.6-3.1.el6.x86_64.rpm                                                                                           |  37 kB     00:00     
    (2/12): java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64.rpm                                                                       | 201 kB     00:00     
    (3/12): java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.x86_64.rpm                                                              |  32 MB     00:15     
    (4/12): jpackage-utils-1.7.5-3.16.el6.noarch.rpm                                                                                  |  60 kB     00:00     
    (5/12): nspr-4.13.1-1.el6.x86_64.rpm                                                                                              | 114 kB     00:00     
    (6/12): nss-3.28.4-3.el6_9.x86_64.rpm                                                                                             | 879 kB     00:00     
    (7/12): nss-sysinit-3.28.4-3.el6_9.x86_64.rpm                                                                                     |  51 kB     00:00     
    (8/12): nss-tools-3.28.4-3.el6_9.x86_64.rpm                                                                                       | 447 kB     00:00     
    (9/12): nss-util-3.28.4-1.el6_9.x86_64.rpm                                                                                        |  68 kB     00:00     
    (10/12): ttmkfdir-3.0.9-32.1.el6.x86_64.rpm                                                                                       |  43 kB     00:00     
    (11/12): tzdata-java-2017b-1.el6.noarch.rpm                                                                                       | 183 kB     00:00     
    (12/12): xorg-x11-fonts-Type1-7.2-11.el6.noarch.rpm                                                                               | 520 kB     00:00     
    ---------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                    1.9 MB/s |  34 MB     00:17     
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Updating   : nspr-4.13.1-1.el6.x86_64                                                                                                             1/17 
      Updating   : nss-util-3.28.4-1.el6_9.x86_64                                                                                                       2/17 
      Updating   : nss-sysinit-3.28.4-3.el6_9.x86_64                                                                                                    3/17 
      Updating   : nss-3.28.4-3.el6_9.x86_64                                                                                                            4/17 
      Installing : giflib-4.1.6-3.1.el6.x86_64                                                                                                          5/17 
      Installing : tzdata-java-2017b-1.el6.noarch                                                                                                       6/17 
      Installing : jpackage-utils-1.7.5-3.16.el6.noarch                                                                                                 7/17 
      Installing : 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.x86_64                                                                           8/17 
      Installing : ttmkfdir-3.0.9-32.1.el6.x86_64                                                                                                       9/17 
      Installing : xorg-x11-fonts-Type1-7.2-11.el6.noarch                                                                                              10/17 
      Installing : 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64                                                                                   11/17 
      Updating   : nss-tools-3.28.4-3.el6_9.x86_64                                                                                                     12/17 
      Cleanup    : nss-tools-3.21.0-8.el6.x86_64                                                                                                       13/17 
      Cleanup    : nss-sysinit-3.21.0-8.el6.x86_64                                                                                                     14/17 
      Cleanup    : nss-3.21.0-8.el6.x86_64                                                                                                             15/17 
      Cleanup    : nss-util-3.21.0-2.el6.x86_64                                                                                                        16/17 
      Cleanup    : nspr-4.11.0-1.el6.x86_64                                                                                                            17/17 
      Verifying  : ttmkfdir-3.0.9-32.1.el6.x86_64                                                                                                       1/17 
      Verifying  : 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.x86_64                                                                           2/17 
      Verifying  : nss-tools-3.28.4-3.el6_9.x86_64                                                                                                      3/17 
      Verifying  : jpackage-utils-1.7.5-3.16.el6.noarch                                                                                                 4/17 
      Verifying  : nspr-4.13.1-1.el6.x86_64                                                                                                             5/17 
      Verifying  : nss-sysinit-3.28.4-3.el6_9.x86_64                                                                                                    6/17 
      Verifying  : 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64                                                                                    7/17 
      Verifying  : xorg-x11-fonts-Type1-7.2-11.el6.noarch                                                                                               8/17 
      Verifying  : tzdata-java-2017b-1.el6.noarch                                                                                                       9/17 
      Verifying  : nss-util-3.28.4-1.el6_9.x86_64                                                                                                      10/17 
      Verifying  : giflib-4.1.6-3.1.el6.x86_64                                                                                                         11/17 
      Verifying  : nss-3.28.4-3.el6_9.x86_64                                                                                                           12/17 
      Verifying  : nss-util-3.21.0-2.el6.x86_64                                                                                                        13/17 
      Verifying  : nss-3.21.0-8.el6.x86_64                                                                                                             14/17 
      Verifying  : nss-tools-3.21.0-8.el6.x86_64                                                                                                       15/17 
      Verifying  : nss-sysinit-3.21.0-8.el6.x86_64                                                                                                     16/17 
      Verifying  : nspr-4.11.0-1.el6.x86_64                                                                                                            17/17 
    
    Installed:
      java-1.8.0-openjdk.x86_64 1:1.8.0.131-0.b11.el6_9                                                                                                      
    
    Dependency Installed:
      giflib.x86_64 0:4.1.6-3.1.el6          java-1.8.0-openjdk-headless.x86_64 1:1.8.0.131-0.b11.el6_9       jpackage-utils.noarch 0:1.7.5-3.16.el6        
      ttmkfdir.x86_64 0:3.0.9-32.1.el6       tzdata-java.noarch 0:2017b-1.el6                                 xorg-x11-fonts-Type1.noarch 0:7.2-11.el6      
    
    Dependency Updated:
      nspr.x86_64 0:4.13.1-1.el6            nss.x86_64 0:3.28.4-3.el6_9      nss-sysinit.x86_64 0:3.28.4-3.el6_9      nss-tools.x86_64 0:3.28.4-3.el6_9     
      nss-util.x86_64 0:3.28.4-1.el6_9     
    
    Complete!
    [root@oracle-me bin]# 
    [root@oracle-me bin]# java -version;
    openjdk version "1.8.0_131"
    OpenJDK Runtime Environment (build 1.8.0_131-b11)
    OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
    [root@oracle-me bin]#

    创建TimesTen软件的拥有者:

    [root@oracle-me software]# cat /etc/passwd | tail -n 2
    grid:x:1100:1000:Grid Infrastructure Owner:/home/grid:/bin/bash
    oracle:x:1101:1000:Oracle Software Owner:/home/oracle:/bin/bash
    [root@oracle-me software]# 
    [root@oracle-me software]# useradd -m -c "TimesTen Owner" -d /home/ttadmin -s /bin/bash ttadmin
    [root@oracle-me software]# 
    [root@oracle-me software]# cat /etc/passwd | tail -n 2
    oracle:x:1101:1000:Oracle Software Owner:/home/oracle:/bin/bash
    ttadmin:x:1102:1102:TimesTen Owner:/home/ttadmin:/bin/bash
    [root@oracle-me software]#

    创建TimesTen的用户组,并向其中添加TimesTen的管理员与Apache的用户:

    [root@oracle-me software]# groupadd timesten
    [root@oracle-me software]# usermod -a -G timesten ttadmin
    [root@oracle-me software]# usermod -a -G timesten apache
    [root@oracle-me software]#

    配置环境变量:

    [root@oracle-me bin]# cat ~/.bash_profile 
    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    PATH=$PATH:$HOME/bin:/u01/app/oracle/TimesTen/tt1122/bin
    
    export PATH
    [root@oracle-me bin]# source ~/.bash_profile
    [root@oracle-me bin]#

    创建相关目录:

    [root@oracle-me software]# mkdir /etc/TimesTen
    [root@oracle-me software]# chgrp ttadmin /etc/TimesTen/
    [root@oracle-me software]# chmod 770 /etc/TimesTen/
    [root@oracle-me software]# 
    [root@oracle-me ~]# mkdir -p /u01/app/oracle/TimesTen
    [root@oracle-me ~]# chgrp ttadmin /u01/app/oracle/TimesTen
    [root@oracle-me ~]# chmod 770 /u01/app/oracle/TimesTen
    [root@oracle-me ~]#

    将从Oracle官方网站下载的TimesTen的安装介质上传服务器:
    URL: http://www.oracle.com/technetwork/database/database-technologies/timesten/overview/index.html

    [root@oracle-me software]# pwd
    /software
    [root@oracle-me software]# 
    [root@oracle-me software]# ls -ltr
    total 2825740
    drwxrwxrwx 7 oracle oinstall       4096 Aug 26  2013 database
    -rwxrwxrwx 1 root   root     1395582860 Aug 28  2013 p13390677_112040_Linux-x86-64_1of7.zip
    -rwxrwxrwx 1 root   root     1151304589 Aug 28  2013 p13390677_112040_Linux-x86-64_2of7.zip
    -rwxrwxrwx 1 oracle oinstall          0 May 23 23:34 me
    drwxrwxrwx 2 root   root           4096 Jun  2 03:03 oracle_me
    -rw-r--r-- 1 root   root      346645848 Jun  4 18:48 timesten112280.linux8664.tar.gz
    [root@oracle-me software]# 
    [root@oracle-me software]# du -sh timesten112280.linux8664.tar.gz 
    331M    timesten112280.linux8664.tar.gz
    [root@oracle-me software]# 
    [root@oracle-me software]# 
    [root@oracle-me software]# chmod -R 777 /software/
    [root@oracle-me software]#

    以TimesTen管理员登录系统,并解压安装介质:

    [root@oracle-me software]# whoami
    root
    [root@oracle-me software]# 
    [root@oracle-me software]# su - ttadmin
    [ttadmin@oracle-me ~]$ 
    [ttadmin@oracle-me ~]$ whoami
    ttadmin
    [ttadmin@oracle-me ~]$ 
    [ttadmin@oracle-me ~]$ cd /software
    [ttadmin@oracle-me software]$ 
    [ttadmin@oracle-me software]$ tar -xf timesten112280.linux8664.tar.gz 
    [ttadmin@oracle-me software]$ ll
    total 2825744
    drwxrwxrwx 7 oracle  oinstall       4096 Aug 26  2013 database
    drwxrwxr-x 5 ttadmin ttadmin        4096 Jan 20  2015 linux8664
    -rwxrwxrwx 1 oracle  oinstall          0 May 23 23:34 me
    drwxrwxrwx 2 root    root           4096 Jun  2 03:03 oracle_me
    -rwxrwxrwx 1 root    root     1395582860 Aug 28  2013 p13390677_112040_Linux-x86-64_1of7.zip
    -rwxrwxrwx 1 root    root     1151304589 Aug 28  2013 p13390677_112040_Linux-x86-64_2of7.zip
    -rwxrwxrwx 1 root    root      346645848 Jun  4 18:48 timesten112280.linux8664.tar.gz
    [ttadmin@oracle-me software]$ cd linux8664/
    [ttadmin@oracle-me linux8664]$ ls
    3rdparty  doc  install.pl  LINUX8664  README.html  setup.sh  uninst.sh
    [ttadmin@oracle-me linux8664]$ 
    [ttadmin@oracle-me linux8664]$ ls -l
    total 420
    drwxr-xr-x 2 ttadmin ttadmin   4096 Jan 20  2015 3rdparty
    drwxrwxr-x 2 ttadmin ttadmin   4096 Jan 20  2015 doc
    -rwxr-xr-x 1 ttadmin ttadmin 256471 Jan 20  2015 install.pl
    drwxr-xr-x 2 ttadmin ttadmin   4096 Jan 20  2015 LINUX8664
    -rwxr--r-- 1 ttadmin ttadmin 114161 Jan 20  2015 README.html
    -rwxr-xr-x 1 ttadmin ttadmin   5759 Jan 20  2015 setup.sh
    -rwxr-xr-x 1 ttadmin ttadmin  34886 Jan 20  2015 uninst.sh
    [ttadmin@oracle-me linux8664]$

    安装TimesTen:

    [ttadmin@oracle-me linux8664]$ ./setup.sh 
    
    NOTE: Each TimesTen installation is identified by a unique instance name.
          The instance name must be a non-null alphanumeric string, not longer
          than 255 characters.
    
    Please choose an instance name for this installation? [ tt1122 ] 
    Instance name will be 'tt1122'.
    Is this correct? [ yes ] 
    
    Of the three components:
    
      [1] Client/Server and Data Manager
      [2] Data Manager Only
      [3] Client Only
    
    Which would you like to install? [ 1 ] 
    
    Of the following options :
    
      [1] /home/ttadmin
      [2] /software
      [3] Specify a location
      [q] Quit the installation
    
    Where would you like to install the tt1122 instance of TimesTen? [ 1 ] 3
    Please specify a directory to install TimesTen? [ /home/ttadmin ] /u01/app/oracle/TimesTen
    Where would you like to create the daemon home directory? [ /u01/app/oracle/TimesTen/tt1122/info ] 
    
    The daemon logs will be located in /u01/app/oracle/TimesTen/tt1122/info
    Would you like to specify a different location for the daemon logs? [ no ] 
    Installing into /u01/app/oracle/TimesTen/tt1122 ...
    Uncompressing ...
    
    NOTE: If you are configuring TimesTen for use with Oracle Clusterware, the
          daemon port number must be the same across all TimesTen installations
          managed within the same Oracle Clusterware cluster.
    
    NOTE: All installations that replicate to each other must use the same daemon
          port number that is set at installation time. The daemon port number can
          be verified by running 'ttVersion'.
    
    The default port number is 53396.
    
    Do you want to use the default port number for the TimesTen daemon? [ yes ] 
    The daemon will run on the default port number (53396).
    
    NOTE: For security, we recommend that you restrict access to the
          TimesTen installation to members of a single OS group. Only members of
          that OS group will be allowed to perform direct mode connections to
          TimesTen, and only members of that OS group will be allowed to perform
          operations that access TimesTen data stores, TimesTen files and shared
          memory. The OS group defaults to the primary group of the instance
          administrator. You can default to this group, choose another OS group
          or you can make this instance world-accessible. If you choose to make
          this instance world-accessible, all database files and shared memory
          are readable and writable by all users.
    
    Restrict access to the the TimesTen installation to the group 'ttadmin'? [ yes ] no
    Do you want to restrict access to the TimesTen installation to a different group? [ yes ] TimesTen
    Please answer 'yes' or 'no'.
    Do you want to restrict access to the TimesTen installation to a different group? [ yes ] 
    
    You are a member of the following groups :
    
    ttadmin
    timesten
    
    Please enter the name of the group you want to use? [ ttadmin ] timesten  
    Are you sure you want to use the group 'timesten'? [ yes ] yes
    
    NOTE: Enabling PL/SQL will increase the size of some TimesTen libraries.
    
    Would you like to enable PL/SQL for this instance? [ yes ] 
    
    In order to use the 'Oracle TimesTen Application-Tier Database Cache' feature in any databases
    created within this installation, you must set a value for the TNS_ADMIN
    environment variable. It can be left blank, and a value can be supplied later
    using /bin/ttModInstall.
    
    Please enter a value for TNS_ADMIN (s=skip)? [  ] s
    
    
    NOTE: It appears that you are running version 4 or higher of the g++
          compiler. TimesTen ships with multiple sets of client libraries and server
          binaries : one built for compatibility with g++ 3.4.6 and one with
          g++ 4.1.0. The installer has created links to the 4.1.0 library in the
          /lib directory and to the 4.1.0 server binary in the
          /bin directory. If you want to use a different compiler,
          please modify the links to point to the desired library and server binary.
    
    Installing server components ...
    What is the TCP/IP port number that you want the TimesTen Server to listen on? [ 53397 ] 
    Do you want to install the Quick Start Sample Programs and the TimesTen Documentation? [ no ] yes
    Where would you like to install the Quick Start and doc directories (s=skip)? [ /u01/app/oracle/TimesTen/tt1122 ] 
    The TimesTen documentation has been installed in /u01/app/oracle/TimesTen/tt1122.
    
    The TimesTen Quick Start applications can take up to 64 Mbytes of disk space.
    Depending on how your system is configured, you may not want to create the
    Quick Start DemoDataStore directory in the default location,
    /u01/app/oracle/TimesTen/tt1122/info/DemoDataStore
    
    Where would you like to create the DemoDataStore directory? [ /u01/app/oracle/TimesTen/tt1122/info ] 
    Creating /u01/app/oracle/TimesTen/tt1122/info/DemoDataStore ...
    
    Installing client components ...
    
    Would you like to use TimesTen Replication with Oracle Clusterware? [ no ] 
    
    NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.
    
    Run the 'setuproot' script :
            cd /u01/app/oracle/TimesTen/tt1122/bin
            ./setuproot -install
    This will move the TimesTen startup script into its appropriate location.
    
    The startup script is currently located here :
      '/u01/app/oracle/TimesTen/tt1122/startup/tt_tt1122'.
    
    The Quickstart home page can be accessed here :
      '/u01/app/oracle/TimesTen/tt1122/quickstart/index.html'
    
    The 11.2.2.8 Release Notes are located here :
      '/u01/app/oracle/TimesTen/tt1122/README.html'
    
    Starting the daemon ...
    TimesTen Daemon startup OK.
    End of TimesTen installation.
    [ttadmin@oracle-me linux8664]$

    将启动脚本安装到【/etc/init.d】:

    [root@oracle-me ~]# cd /u01/app/oracle/TimesTen/tt1122/bin/
    [root@oracle-me bin]# ls
    envcfg            ttbulkcp            ttCRSactiveserviceCmd  ttCRSsubscriber     ttdestroy       ttmodinstall   ttSizeCmd         tttracemon
    README.TXT        ttBulkCp            ttcrsagent             ttCRSsubscriberCmd  ttDestroy       ttModInstall   ttstats           ttTraceMon
    setuproot         ttBulkCpCmd         ttCRSAgent             ttcrssubservice     ttDestroyCmd    ttpatchinst    ttStats           ttTraceMonCmd
    setup.sh          ttbulkcpcs          ttCRSAgentCmd          ttCRSsubservice     ttenv.csh       ttrepadmin     ttStatsCmd        ttuser
    timestend         ttBulkCpCS          ttcrsapp               ttCRSsubserviceCmd  ttenv.sh        ttRepAdmin     ttstatscs         ttUser
    timestenorad      ttBulkCpCSCmd       ttCRSapp               ttcserver           ttisql          ttRepAdminCmd  ttStatsCS         ttversion
    timestenrepd      ttcacheadv          ttCRSappCmd            ttcserver_gcc346    ttIsql          ttrestore      ttStatsCSCmd      ttVersion
    timestensubd      ttcacheadvisor      ttcrsbackupservice     ttcserver_gcc410    ttIsqlCmd       ttRestore      ttstatus          ttxactadmin
    ttadmin           ttCacheAdvisor      ttCRSbackupservice     ttcwadmin           ttisqlcs        ttRestoreCmd   ttStatus          ttXactAdmin
    ttAdmin           ttCacheAdvisorCmd   ttCRSbackupserviceCmd  ttCWAdmin           ttIsqlCS        ttschema       ttStatusCmd       ttXactAdminCmd
    ttAdminCmd        ttcapture           ttcrsdaemon            ttCWAdminCmd        ttIsqlCSCmd     ttSchema       ttsyslogcheck     ttxactlog
    ttadoptstores     ttCapture           ttCRSdaemon            ttdaemonadmin       ttmigrate       ttSchemaCmd    ttSyslogCheck     ttXactLog
    ttAdoptStores     ttcheck             ttCRSdaemonCmd         ttDaemonAdmin       ttMigrate       ttschemacs     ttSyslogCheckCmd  ttXactLogCmd
    ttAdoptStoresCmd  ttCheck             ttcrsmaster            ttDaemonAdminCmd    ttMigrateCmd    ttSchemaCS     tttail            uninst.sh
    ttbackup          ttCheckCmd          ttCRSmaster            ttdaemonlog         ttmigratecs     ttSchemaCSCmd  ttTail
    ttBackup          ttcrsactiveservice  ttCRSmasterCmd         ttDaemonLog         ttMigrateCS     ttsize         ttTailCmd
    ttBackupCmd       ttCRSactiveservice  ttcrssubscriber        ttDaemonLogCmd      ttMigrateCSCmd  ttSize         ttThunk
    [root@oracle-me bin]# 
    [root@oracle-me bin]# ./setuproot -install
    $* is no longer supported at ./setuproot line 260.
    Would you like to install the TimesTen daemon startup scripts into /etc/init.d? [ yes ] 
    Copying /u01/app/oracle/TimesTen/tt1122/startup/tt_tt1122 to /etc/init.d
    
    Successfully installed the following scripts :
    /etc/init.d/tt_tt1122
    /etc/rc.d/rc0.d/K45tt_tt1122
    /etc/rc.d/rc1.d/K45tt_tt1122
    /etc/rc.d/rc2.d/S90tt_tt1122
    /etc/rc.d/rc3.d/S90tt_tt1122
    /etc/rc.d/rc5.d/S90tt_tt1122
    /etc/rc.d/rc6.d/K45tt_tt1122
    
    [root@oracle-me bin]# 
    [root@oracle-me bin]# 
    [root@oracle-me bin]# ls -ltr /etc/init.d/ | tail -n 3
    -rwxr-xr-x. 1 root root 44903 May 24 04:41 vmware-tools
    -rwxr-xr-x. 1 root root 15721 May 24 04:41 vmware-tools-thinprint
    -rwxr-----  1 root root  3565 Jun  5 03:48 tt_tt1122
    [root@oracle-me bin]# 
    [root@oracle-me bin]#

    这样,基本的安装就结束了。

    启动TimesTen:

    [ttadmin@oracle-me linux8664]$ source /u01/app/oracle/TimesTen/tt1122/quickstart/ttquickstartenv.sh 
    NOTE: unknown or unsupported java version, setting values for JDK 1.5
    NOTE: TNS_ADMIN is already set in environment - /u01/app/oracle/TimesTen/tt1122/network/admin/samples
    
    LD_LIBRARY_PATH set to /u01/app/oracle/TimesTen/tt1122/lib:/u01/app/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2
    
    PATH set to /u01/app/oracle/TimesTen/tt1122/bin:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/oci:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/odbc:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/odbc/xla:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/jdbc:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/odbc_drivermgr:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/proc:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/ttclasses:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/ttclasses/xla:/u01/app/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2:/u01/app/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2/sdk:/u01/app/oracle/TimesTen/tt1122/3rdparty/ant/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ttadmin/bin
    
    CLASSPATH set to /u01/app/oracle/TimesTen/tt1122/lib/ttjdbc5.jar:/u01/app/oracle/TimesTen/tt1122/lib/orai18n.jar:/u01/app/oracle/TimesTen/tt1122/lib/timestenjmsxla.jar:/u01/app/oracle/TimesTen/tt1122/3rdparty/jms1.1/lib/jms.jar:/u01/app/oracle/TimesTen/tt1122/quickstart:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/jdbc:.
    
    
    NOTE: The demos use system DSNs defined in
          /u01/app/oracle/TimesTen/tt1122/info/sys.odbc.ini
          To use your own DSNs, they must be defined in ~/.odbc.ini, or
          you may set the environment variable ODBCINI to point to
          the correct file.
    
    [ttadmin@oracle-me linux8664]$ 
    [ttadmin@oracle-me linux8664]$ ttstatus
    TimesTen status report as of Mon Jun  5 03:57:33 2017
    
    Daemon pid 7324 port 53396 instance tt1122
    TimesTen server pid 7333 started on port 53397
    ------------------------------------------------------------------------
    Accessible by group timesten
    End of report
    [ttadmin@oracle-me linux8664]$ 
    [ttadmin@oracle-me linux8664]$ 
    [ttadmin@oracle-me linux8664]$ ps -ef | grep tt1122
    ttadmin    7324      1  0 03:46 ?        00:00:00 /u01/app/oracle/TimesTen/tt1122/bin/timestend -initfd 13
    ttadmin    7328   7324  0 03:46 ?        00:00:00 /u01/app/oracle/TimesTen/tt1122/bin/timestensubd -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000000 -facility user
    ttadmin    7329   7324  0 03:46 ?        00:00:00 /u01/app/oracle/TimesTen/tt1122/bin/timestensubd -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000001 -facility user
    ttadmin    7330   7324  0 03:46 ?        00:00:01 /u01/app/oracle/TimesTen/tt1122/bin/timestensubd -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000002 -facility user
    ttadmin    7331   7324  0 03:46 ?        00:00:00 /u01/app/oracle/TimesTen/tt1122/bin/timestensubd -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000003 -facility user
    ttadmin    7333   7324  0 03:46 ?        00:00:00 /u01/app/oracle/TimesTen/tt1122/bin/ttcserver -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000004 -p 53397 -facility user -group timesten
    ttadmin    7557   2778  0 04:00 pts/0    00:00:00 grep tt1122
    [ttadmin@oracle-me linux8664]$ 
    [ttadmin@oracle-me linux8664]$ 
    [root@oracle-me bin]# netstat -tupln | grep tt
    tcp        0      0 127.0.0.1:35243             0.0.0.0:*                   LISTEN      7333/ttcserver      
    tcp        0      0 0.0.0.0:53397               0.0.0.0:*                   LISTEN      7333/ttcserver      
    [root@oracle-me bin]#

    创建示例数据库:

    [ttadmin@oracle-me linux8664]$ cd /u01/app/oracle/TimesTen/tt1122/quickstart/sample_scripts/createdb/
    [ttadmin@oracle-me createdb]$ ./build_sampledb.sh 
    
    Setting up the quickstart environment
    
    NOTE: unknown or unsupported java version, setting values for JDK 1.5
    NOTE: TNS_ADMIN is already set in environment - /u01/app/oracle/TimesTen/tt1122/network/admin/samples
    
    LD_LIBRARY_PATH set to /u01/app/oracle/TimesTen/tt1122/lib:/u01/app/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2
    
    PATH set to /u01/app/oracle/TimesTen/tt1122/bin:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/oci:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/odbc:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/odbc/xla:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/jdbc:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/odbc_drivermgr:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/proc:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/ttclasses:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/ttclasses/xla:/u01/app/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2:/u01/app/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2/sdk:/u01/app/oracle/TimesTen/tt1122/3rdparty/ant/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ttadmin/bin
    
    CLASSPATH set to /u01/app/oracle/TimesTen/tt1122/lib/ttjdbc5.jar:/u01/app/oracle/TimesTen/tt1122/lib/orai18n.jar:/u01/app/oracle/TimesTen/tt1122/lib/timestenjmsxla.jar:/u01/app/oracle/TimesTen/tt1122/3rdparty/jms1.1/lib/jms.jar:/u01/app/oracle/TimesTen/tt1122/quickstart:/u01/app/oracle/TimesTen/tt1122/quickstart/sample_code/jdbc:.
    
    
    NOTE: The demos use system DSNs defined in
          /u01/app/oracle/TimesTen/tt1122/info/sys.odbc.ini
          To use your own DSNs, they must be defined in ~/.odbc.ini, or
          you may set the environment variable ODBCINI to point to
          the correct file.
    
    
    Removing existing sample database
    
    Failed to destroy data store: TT0833: Data store /u01/app/oracle/TimesTen/tt1122/info/DemoDataStore/sampledb_1122 not found -- file "db.c", lineno 20718, procedure "sbDbDestroy"
    
    Building new sample database
    
    
    Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    
    
    
    connect "dsn=sampledb_1122";
    Connection successful: DSN=sampledb_1122;UID=ttadmin;DataStore=/u01/app/oracle/TimesTen/tt1122/info/DemoDataStore/sampledb_1122;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/u01/app/oracle/TimesTen/tt1122/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0;
    (Default setting AutoCommit=1)
    
    run "build_db.sql";
    
    set echo off;
    
    Creating users in the sample database
    
    Please choose a password for the database administration user 'adm'
    Enter password: 
    
    User created.
    
    Please choose a password for the applicaton user 'appuser'
    Enter password: 
    
    User created.
    
    Please choose a password for the XLA subscriber user 'xlauser'
    Enter password: 
    
    User created.
    
    < SYS, 0, 2017-06-05 04:06:23 >
    < TTREP, 2, 2017-06-05 04:06:23 >
    < SYSTEM, 3, 2017-06-05 04:06:23 >
    < GRID, 4, 2017-06-05 04:06:23 >
    < TTADMIN, 10, 2017-06-05 04:06:23 >
    < ADM, 11, 2017-06-05 04:06:42 >
    < APPUSER, 12, 2017-06-05 04:06:45 >
    < XLAUSER, 13, 2017-06-05 04:06:47 >
    
    < SYS, ADMIN, YES >
    < SYSTEM, ADMIN, YES >
    < TTADMIN, ADMIN, YES >
    < ADM, ADMIN, YES >
    < APPUSER, CREATE SESSION, NO >
    < APPUSER, CREATE TABLE, NO >
    < APPUSER, CREATE SEQUENCE, NO >
    < APPUSER, CREATE PROCEDURE, NO >
    < XLAUSER, CREATE SESSION, NO >
    < XLAUSER, XLA, NO >
    
    Creating schema objects in the sample database
    
      APPUSER.ABC
      APPUSER.ACCOUNT
      APPUSER.ACTION
      APPUSER.BINS
      APPUSER.CUSTOMER
      APPUSER.DATA_TABLE
      APPUSER.DEPT
      APPUSER.EMP
      APPUSER.EMP_UNIQUE_ID_
      APPUSER.ICF
      APPUSER.INVENTORY
      APPUSER.INVENTORY2
      APPUSER.JOURNAL
      APPUSER.MYDATA
      APPUSER.MYTABLE
      APPUSER.NUM1_TAB
      APPUSER.NUM2_TAB
      APPUSER.ORDERS
      APPUSER.ORDER_ITEM
      APPUSER.PRINT_MEDIA
      APPUSER.PRODUCT
      APPUSER.PURCHASE_RECORD
      APPUSER.RATIO
      APPUSER.RESULT_TABLE
      APPUSER.SUM_TAB
      APPUSER.TEMP
      APPUSER.XLAPERSISTENT_TABLE
    
    
    Package created.
    
    
    Package body created.
    
    
    Package created.
    
    
    Package body created.
    
    
    Package created.
    
    
    Package body created.
    
      APPUSER.EMP_PKG
      APPUSER.PERSONNEL
      APPUSER.SAMPLE_PKG
    
    Function created.
    
      APPUSER.SP
    
    Procedure created.
    
    
    Procedure created.
    
      APPUSER.GETEMPNAME_UNIQUE_ID_
      APPUSER.GETEMPNO_UNIQUE_ID_
    
    No errors.
    
    Package created.
    
    
    Sample database created
    
    
    exit;
    Disconnecting from sampledb_1122...
    Disconnecting from adm...
    Disconnecting from appuser...
    Done.
    
    populate_lob_data.dump:
        4 rows inserted
        4 rows total
    [ttadmin@oracle-me createdb]$ 
    [ttadmin@oracle-me createdb]$

    这样,就创建完成了。

    创建完成后,再次查看TimesTen的状态:

    [ttadmin@oracle-me createdb]$ ttstatus
    TimesTen status report as of Mon Jun  5 04:07:15 2017
    
    Daemon pid 7324 port 53396 instance tt1122
    TimesTen server pid 7333 started on port 53397
    ------------------------------------------------------------------------
    Data store /u01/app/oracle/TimesTen/tt1122/info/DemoDataStore/sampledb_1122
    There are no connections to the data store
    Replication policy  : Manual
    Cache Agent policy  : Manual
    PL/SQL enabled.
    ------------------------------------------------------------------------
    Accessible by group timesten
    End of report
    [ttadmin@oracle-me createdb]$ 
    [ttadmin@oracle-me createdb]$ ls -ltr /u01/app/oracle/TimesTen/tt1122/info/DemoDataStore/
    total 273272
    -rw-rw---- 1 ttadmin timesten 67108864 Jun  5 04:06 sampledb_1122.res0
    -rw-rw---- 1 ttadmin timesten 67108864 Jun  5 04:06 sampledb_1122.res1
    -rw-rw---- 1 ttadmin timesten 67108864 Jun  5 04:06 sampledb_1122.res2
    -rw-rw---- 1 ttadmin timesten 30123552 Jun  5 04:06 sampledb_1122.ds0
    -rw-rw---- 1 ttadmin timesten 18034688 Jun  5 04:06 sampledb_1122.log0
    -rw-rw---- 1 ttadmin timesten 30339464 Jun  5 04:06 sampledb_1122.ds1
    [ttadmin@oracle-me createdb]$

    登录TimesTen的数据库:

    [ttadmin@oracle-me createdb]$ ttisql "dsn=sampledb_1122;uid=adm"
    
    Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    
    
    
    connect "dsn=sampledb_1122;uid=adm";
    Enter password for 'adm': 
    Connection successful: DSN=sampledb_1122;UID=adm;DataStore=/u01/app/oracle/TimesTen/tt1122/info/DemoDataStore/sampledb_1122;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/u01/app/oracle/TimesTen/tt1122/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0;
    (Default setting AutoCommit=1)
    Command> 
    Command> exit;
    Disconnecting...
    Done.
    [ttadmin@oracle-me createdb]$

    停止TimesTen实例:

    [root@oracle-me ~]# service tt_tt1122 stop
    Stopping TimesTen Daemon : [  OK  ]
    [root@oracle-me ~]# 
    [root@oracle-me ~]# ps -ef | grep timesten
    root       7766   2833  0 04:13 pts/1    00:00:00 grep timesten
    [root@oracle-me ~]# 
    [root@oracle-me ~]# 
    [root@oracle-me ~]# ps -ef | grep tt1122
    root       7768   2833  0 04:13 pts/1    00:00:00 grep tt1122
    [root@oracle-me ~]# 
    [root@oracle-me ~]# netstat -tupln | grep tt
    [root@oracle-me ~]#

    删除TimesTen实例:

    [root@oracle-me ~]# ls -ltr /u01/app/oracle/TimesTen/
    total 4
    drwxrwx--- 20 ttadmin timesten 4096 Jun  5 04:12 tt1122
    [root@oracle-me ~]# 
    [root@oracle-me ~]# /u01/app/oracle/TimesTen/tt1122/bin/setup.sh -uninstall
       
    ** WARNING **
    
       All files under :
    
       /u01/app/oracle/TimesTen/tt1122
    
       will be removed, including any files that you or other users
       may have created under that directory.
    
       Are you sure you want to completely remove the instance tt1122 (TimesTen11.2.2.8.0) and all of its components? [ yes ] 
       Removing installed files ...
       
    NOTE: /u01/app/oracle/TimesTen/tt1122/info contains information related to the data
       stores that have been created with this release. If you remove
       /u01/app/oracle/TimesTen/tt1122/info
       you will no longer be able to access your data stores,
       nor would you be able to restore nor migrate your data.
    
       Would you also like to remove all files in /u01/app/oracle/TimesTen/tt1122/info? [ no ] yes
       Would you also like to remove all files in /u01/app/oracle/TimesTen/tt1122/network/admin/samples? [ no ] yes
       /u01/app/oracle/TimesTen/tt1122 Removed
    TimesTen uninstall completed.
    [root@oracle-me ~]# 
    [root@oracle-me ~]# ls -ltr /u01/app/oracle/TimesTen/
    ls: cannot access /u01/app/oracle/TimesTen/: No such file or directory
    [root@oracle-me ~]#

    ————————————————
    Done。



沪ICP备19023445号-2号
友情链接