Installing TimesTen on Linux

学习TimesTen的最好方法是装一个虚拟机,理论结合实际。操作系统推荐OEL 6U6
安装指南
1. 官网的TimesTen In-Memory Database Installation Guide
2. My Oracle Support的Installing TimesTen on Linux,文档 ID 473007.1

安装软件只需要几分钟时间,占用空间不到1G,每一次安装称为一个实例-Instance,每一个实例可以建立/关联多个数据库。
可以从官网下载,但最新的版本只能从MOS中下载,软件大小300M左右,推荐Linux x86 (64-bit) 版本

  1. 建立安装用户和组,没有限制,一般就用timesten
#groupadd timesten
#useradd -g timesten -d /home/timesten timesten
#mkdir /etc/TimesTen **<-此目录可认为是注册表信息**
#chown timesten:timesten /etc/TimesTen
#passwd timesten
Changing password for user timesten.
New password: 
BAD PASSWORD: it is based on a dictionary word
Retype new password: 
passwd: all authentication tokens updated successfully.
  1. 解压并安装
[timesten]$ unzip p22706761_1122_Linux-x86-64.zip 
Archive:  p22706761_1122_Linux-x86-64.zip
   creating: linux8664/
  inflating: linux8664/uninst.sh     
  inflating: linux8664/install.pl    
  inflating: linux8664/README.html   
   creating: linux8664/LINUX8664/
  inflating: linux8664/LINUX8664/ttpatchinst  
  inflating: linux8664/LINUX8664/unzip  
  inflating: linux8664/LINUX8664/common.tar.bz2  
  inflating: linux8664/LINUX8664/ttclient.tar.bz2  
  inflating: linux8664/LINUX8664/perl  
  inflating: linux8664/LINUX8664/manifest  
  inflating: linux8664/LINUX8664/timesten.tar.bz2  
  inflating: linux8664/LINUX8664/bzip2  
  inflating: linux8664/LINUX8664/ttserver.tar.bz2  
   creating: linux8664/3rdparty/
  inflating: linux8664/3rdparty/ant-1.6.2-bin.tar.bz2  
  inflating: linux8664/3rdparty/jms-1_1-fr-apidocs.tar.bz2  
   creating: linux8664/doc/
 extracting: linux8664/doc/doc.zip   
  inflating: linux8664/setup.sh      
  inflating: README.html             
[timesten]$ du -sk linux8664/
345148  linux8664/
[timesten]$ cd linux8664/
[timesten@em13c linux8664]$ ls
3rdparty  doc  install.pl  LINUX8664  README.html  setup.sh  uninst.sh
[linux8664]$ ./setup.sh 
  1. 指定一个实例名,一般一个主机就安装一个实例,因此使用缺省
[timesten]$./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 ] 
  1. 选择安装的组件,选择缺省
Of the three components:

  [1] Client/Server and Data Manager <- client + server
  [2] Data Manager Only <- Server only
  [3] Client Only 

Which would you like to install? [ 1 ] 
  1. 选择安装目录
Of the following options :

  [1] /home/timesten
  [2] /tmp/timesten
  [3] Specify a location
  [q] Quit the installation

Where would you like to install the tt1122 instance of TimesTen? [ 1 ] 
Where would you like to create the daemon home directory? [ /home/timesten/TimesTen/tt1122/info ] 

The daemon logs will be located in /home/timesten/TimesTen/tt1122/info
Would you like to specify a different location for the daemon logs? [ no ] 
Installing into /home/timesten/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 'timesten'? [ 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 <install_dir>/bin/ttModInstall.


Please enter a value for TNS_ADMIN (s=skip)? [  ] s 
**TNS_ADMIN用来指定Oracle数据库服务的地址,暂不设置**


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
      <install_dir>/lib directory and to the 4.1.0 server binary in the
      <install_dir>/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 ] 
  1. 安装QuickStart,建议安装
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)? [ /home/timesten/TimesTen/tt1122 ] The TimesTen documentation has been installed in /home/timesten/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, /home/timesten/TimesTen/tt1122/info/DemoDataStore 
  1. 用于演示的DataStore数据目录
Where would you like to create the DemoDataStore directory? [ /home/timesten/TimesTen/tt1122/info ] 
Creating /home/timesten/TimesTen/tt1122/info/DemoDataStore ...

Installing client components ...
  1. 是否与Oracle ClusterWare结合,属于高级选项,暂用不上
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 /home/timesten/TimesTen/tt1122/bin
    ./setuproot -install
This will move the TimesTen startup script into its appropriate location.

The startup script is currently located here :
  '/home/timesten/TimesTen/tt1122/startup/tt_tt1122'.

The Quickstart home page can be accessed here :
  '/home/timesten/TimesTen/tt1122/quickstart/index.html'

The 11.2.2.8 Release Notes are located here :
  '/home/timesten/TimesTen/tt1122/README.html'

Starting the daemon ...
TimesTen Daemon startup OK.
End of TimesTen installation.
  1. 配置环境变量,在timesten的.bash_profile文件末加入以下脚本
TT_HOME=/home/timesten/TimesTen/tt1122
export TT_HOME
. $TT_HOME/bin/ttenv.sh
  1. 重新用timesten登录,验证安装
$ ttversion
TimesTen Release 11.2.2.8.11 (64 bit Linux/x86_64) (tt1122:53396) 2016-02-09T19:36:50Z
  Instance admin: timesten
  Instance home directory: /home/timesten/TimesTen/tt1122
  Group owner: timesten
  Daemon home directory: /home/timesten/TimesTen/tt1122/info
  PL/SQL enabled.
或者
[timesten@em13c ~]$ cat /etc/TimesTen/instance_info 
#SUM 28094     1
[ tt1122 ]
Product=TimesTen11.2.2.8
InstallDir=/home/timesten/TimesTen/tt1122
InstanceAdministrator=timesten
DaemonHome=/home/timesten/TimesTen/tt1122/info
BitLevel=64
Component=Client/Server and DataManager
TT_PORT=53396
或者
[timesten@em13c bin]$ ttstatus
TimesTen status report as of Fri Apr  1 18:25:12 2016

Daemon pid 18374 port 53396 instance tt1122
TimesTen server pid 18383 started on port 53397
------------------------------------------------------------------------
Accessible by group timesten
End of report
或者
$ ttdaemonadmin -version
TimesTen Release 11.2.2.8.11

  1. 设置开机自动启动TimesTen Daemon(可选)
[timesten@em13c bin]$ su - root
Password: 
[root@em13c ~]# cd /home/timesten/TimesTen/tt1122/bin
[root@em13c bin]# ./setuproot -install
Would you like to install the TimesTen daemon startup scripts into /etc/init.d? [ yes ] 
Copying /home/timesten/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
  • 作为测试用,在整个安装过程中,除Quick Start示例程序和文档选择非缺省的Yes外,其它都缺省回车即可
  • 安装中做出的选择后续可以用ttmodinstall更改
  • 安装的软件大小为866044k
  • 记得删除安装包

你可能感兴趣的:(Install,timesten)