日期:2014-05-16  浏览次数:20699 次

TimesTen 安装 - Linux prerequisites Semaphores
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