学习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) 版本
#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.
[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
[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 ]
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 ]
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 ]
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
Where would you like to create the DemoDataStore directory? [ /home/timesten/TimesTen/tt1122/info ]
Creating /home/timesten/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 /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.
TT_HOME=/home/timesten/TimesTen/tt1122
export TT_HOME
. $TT_HOME/bin/ttenv.sh
$ 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
[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