Shared memory
To increase the shared memory size to 2048 MB, log in as root and edit the
/etc/sysctl.conf file by adding the line:
kernel.shmmax=2147483648
If your configuration is greater than 8 GB, you should also increase the value of the
shmall parameter. The value is in KB and should be equal to
ceil(SHMMAX/PAGE_SIZE). Page size is generally 4K on x86 systems and 16K on
Itanium. For example, for a 64 GB database on Itanium, you should specify the
following parameters values:
kernel.shmmax=68719476736
kernel.shmall=4194304
如果是x86系统,共享内存是1GB,(shmall = shmmax/4KB),则参数设置为:
# 1GB
kernel.shmmax = 1073741824
# 1 * 1024 * 1024KB/4KB=262144
kernel.shmall = 262144
【重要的配置文件】
TimesTen根路径在/home/tt/TimesTen/tt1122(tt为用户)下
1./etc/sysctl.conf 配置和内存等相关的先决条件,我认为主要是内存
2.sys.odbc.ini(/home/tt/TimesTen/tt1122/info/sys.odbc.ini) 配置ODBC数据源、Server DSN、User DSN等
3.sys.ttconnect.ini(/home/tt/TimesTen/tt1122/info/sys.ttconnect.ini) 配置User DSN要连接的服务器的IP和PORT,用在sys.odbc.ini中的User DSN
4..bash_profile(/home/tt/.bash_profile,前面有个【.】) 配置用户tt的启动参数。如一些tt需要的环境变量。
以下为附件的内容:
TimesTen安装
@cobble.ge
版本:timesten112230.linux8664.tar.gz
安装:
查看空闲内存
# cat /proc/meminfo
MemFree: 1043340 kB 所以共享内存我们设为1GB
如果是x86系统,共享内存是1GB,(shmall = shmmax/4KB),则参数设置为:
# 1GB
kernel.shmmax = 1073741824
# 1 * 1024 * 1024KB/4KB=262144
kernel.shmall = 262144
查看先决条件
# /sbin/sysctl –a
立即生效先决条件
# /sbin/sysctl -p
修改先决条件
# vi /etc/sysctl.conf
如下:
# added by geby 20110805
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
#kernel.shmmax = 536870912
# edited by geby 20120809
# 1GB
kernel.shmmax = 1073741824
# 1 * 1024 * 1024KB/4KB=262144
kernel.shmall = 262144
# end edit
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
# ended add by 20110805
创建安装用户
# groupadd ttadmin
# useradd -G ttadmin tt
# passwd tt
创建文件夹,TimesTen需要(好像是用来存放TimesTen实例的)
# mkdir /etc/TimesTen
设置文件夹属主
# chown –R tt:ttadmin /etc/TimesTen
# chmod –R 775 /etc/TimesTen
# chgrp -R ttadmin /etc/TimesTen
解压缩
# tar -zxf timesten112230.linux8664.tar.gz
# cd linux8664/
# su tt
$ ./setup.sh
下面是安装(过程)的全部复制:
$ ./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 ] 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 ] 1
Of the following options :
[1] /home/tt
[2] /gby/install_src
[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/tt/TimesTen/tt1122/info ]
The daemon logs will be located in /home/tt/TimesTen/tt1122/info
Would you like to specify a different location for the daemon logs? [ no ] yes
Where would you like the daemon logs to be written? [ /home/tt/TimesTen/tt1122/info ]
Installing into /home/tt/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 ] 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 'tt'? [ 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 ] yes
In order to use the 'In-Memory 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
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 QuickStart and the TimesTen Documentation? [ no ] yes
Where would you like to install the quickstart and doc directories (s=skip)? [ /home/tt/TimesTen/tt1122 ]
The TimesTen Quickstart applications can take up to 64 Mbytes of disk space.
Depending on how your system is configured, you may not want to create the
QuickStart DemoDataStore directory in the default location,
/home/tt/TimesTen/tt1122/info/DemoDataStore
Where would you like to create the DemoDataStore directory? [ /home/tt/TimesTen/tt1122/info ]
Creating /home/tt/TimesTen/tt1122/info/DemoDataStore ...
Installing client components ...
Would you like to use TimesTen Replication with Oracle Clusterware? [ no ] yes
Please provide the path to the Oracle Clusterware installation on this machine (s=skip)? [ ] s
TimesTen Replication with Oracle Clusterware will not be installed. You can run
/home/tt/TimesTen/tt1122/bin/ttmodinstall -crs
to install this feature after this installation.
NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.
Run the 'setuproot' script :
cd /home/tt/TimesTen/tt1122/bin
./setuproot -install
This will move the TimesTen startup script into its appropriate location.
The startup script is currently located here :
'/home/tt/TimesTen/tt1122/startup/tt_tt1122'.
The Quickstart home page can be accessed here :
'/home/tt/TimesTen/tt1122/quickstart/index.html'
The 11.2.2.3 Release Notes are located here :
'/home/tt/TimesTen/tt1122/README.html'
Starting the daemon ...
TimesTen Daemon startup OK.
End of TimesTen installation.
设置确实的环境变量
$ cd /home/tt/TimesTen/tt1122/bin
$ sh ttenv.sh
$ sh ttenv.csh
或者 修改文件.bash_profile
$ cd
$ vi .bash_profile
如:
export TIMESTEN=/home/tt/TimesTen/tt1122
export LD_LIBRARY_PATH=$TIMESTEN/lib
export PATH=$TIMESTEN/bin:$PATH
使立即生效
$ source .bash_profile
设置dsn
需要用到2个ini文件(sys.odbc.ini 和 sys.ttconnect.ini)
sys.odbc.ini 设置ServerDSN和UserDSN
sys.ttconnect.ini 设置ServerDSN 的IP和port
$ cd /home/tt/TimesTen/tt1122/info
这两个文件有详细的例子,下面设置自己的dsn
(svrDSN = rdb;userDsn=realDb)
$ vi sys.odbc.ini
如下:
# 设置dsn(逻辑)名称
[ODBC Data Sources]
# Server DSN
rdb=TimesTen 11.2.2 Driver
# User DSN
realDb=TimesTen 11.2.2 Client Driver
# Server DSN设置具体参数
[rdb]
Driver=/home/tt/TimesTen/tt1122/lib/libtten.so
DataStore=/home/tt/TimesTen/tt1122/info/rdb
DatabaseCharacterSet=US7ASCII
# User DSN 设置具体参数
[realDb]
# 参加sys.ttconnect.ini
TTC_SERVER=ttSvr143
# 对应的Server DSN名称
TTC_SERVER_DSN=rdb
设置Server DSN 的ip和端口和(逻辑)名称(供User DSN使用)
$ vi sys.ttconnect.ini
如下:
# 见sys.odbc.ini中的TTC_SERVER
[ttSvr143]
Description=TimesTen Server
Network_Address=192.168.15.143
TCP_PORT=53397
结束
资料来源于:解压缩安装包,doc/welcome.html--Installation Guide
@cobble hefei anhui chn 20120807