Primero tienes que descargar TimesTen de acuerdo a tu plataforma; en este mensaje instalaremos TimesTen en un servidor Linux Red Hat 64 bits.
Después de descargarlo tienes que crear (como root) un usuario y un grupo para TimesTen, y también crear el directorio /etc/TimesTen para tener algunos archivos de configuración necesarios:
[root@myserver /]# groupadd timesten
[root@myserver /]# useradd -c "TimesTen" -d /TimesTen -m -g timesten timesten
[root@myserver /]# passwd timesten
Changing password for user timesten.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@myserver /]# mkdir /etc/TimesTen
[root@myserver /]# chown timesten:timesten /etc/TimesTen
A continuación tienes que colocar el archivo descargado en el servidor, entrar como timesten y descomprimir el archivo de instalación:
[timesten@myserver ~]$ tar -zxvf timesten112180.linux8664.tar.gz
linux8664/
linux8664/doc/
linux8664/doc/doc.zip
linux8664/3rdparty/
linux8664/3rdparty/ant-1.6.2-bin.tar.bz2
linux8664/3rdparty/jms-1_1-fr-apidocs.tar.bz2
linux8664/install.pl
linux8664/setup.sh
linux8664/uninst.sh
linux8664/README.html
linux8664/LINUX8664/
linux8664/LINUX8664/manifest
linux8664/LINUX8664/perl
linux8664/LINUX8664/bzip2
linux8664/LINUX8664/unzip
linux8664/LINUX8664/ttpatchinst
linux8664/LINUX8664/common.tar.bz2
linux8664/LINUX8664/ttserver.tar.bz2
linux8664/LINUX8664/timesten.tar.bz2
linux8664/LINUX8664/ttclient.tar.bz2
[timesten@myserver ~]$ cd linux8664/
[timesten@myserver linux8664]$ ls -la
total 404
drwxrwxr-x 5 timesten timesten 4096 Feb 2 2011 .
drwxr-xr-x 3 timesten timesten 4096 Oct 3 12:37 ..
drwxr-xr-x 2 timesten timesten 4096 Feb 2 2011 3rdparty
drwxrwxr-x 2 timesten timesten 4096 Feb 2 2011 doc
-rwxr-xr-x 1 timesten timesten 241188 Feb 2 2011 install.pl
drwxr-xr-x 2 timesten timesten 4096 Feb 2 2011 LINUX8664
-rwxr--r-- 1 timesten timesten 95771 Feb 2 2011 README.html
-rwxr-xr-x 1 timesten timesten 5623 Feb 2 2011 setup.sh
-rwxr-xr-x 1 timesten timesten 34313 Feb 2 2011 uninst.sh
Puedes instalar con seguridad TimesTen ejecutando el script setup.sh con sólo las respuestas por default, como puedes verlo aquí:
[timesten@myserver 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? [ tt1121 ]
Instance name will be 'tt1121'.
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] /TimesTen
[2] /TimesTen/inst
[3] Specify a location
[q] Quit the installation
Where would you like to install the tt1121 instance of TimesTen? [ 1 ]
Where would you like to create the daemon home directory? [ /TimesTen/tt1121/info ]
The daemon logs will be located in /TimesTen/tt1121/info
Would you like to specify a different location for the daemon logs? [ no ]
Installing into /TimesTen/tt1121 ...
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 53388.
Do you want to use the default port number for the TimesTen daemon? [ yes ]
The daemon will run on the default port number (53388).
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 '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.1 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? [ 53389 ]
En este punto puedes escoger instalar la documentación de TimesTen y la base de datos de ejemplo; si quieres usar esta instalación como un ambiente de aprendizaje o revisar si tu instalación estuvo bien, será mejor instalar la documentación y la base de datos de ejemplo.
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)? [ /TimesTen/tt1121 ]
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,
/TimesTen/tt1121/info/DemoDataStore
Where would you like to create the DemoDataStore directory? [ /TimesTen/tt1121/info ]
Creating /TimesTen/tt1121/info/DemoDataStore ...
Installing client components ...
En este punto la instalación está casi terminada:
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 /TimesTen/tt1121/bin
./setuproot -install
This will move the TimesTen startup script into its appropriate location.
The startup script is currently located here :
'/TimesTen/tt1121/startup/tt_tt1121'.
The Quickstart home page can be accessed here :
'/TimesTen/tt1121/quickstart/index.html'
The 11.2.1.8 Release Notes are located here :
'/TimesTen/tt1121/README.html'
Starting the daemon ...
TimesTen Daemon startup OK.
End of TimesTen installation.
Después de que el script de configuración termina encontrarás que los demonios de TimesTen están arriba y corriendo:
[timesten@myserver linux8664]$ ps ax|grep TimesTen
14186 ? Sl 0:00 /TimesTen/tt1121/bin/timestend -initfd 13
14189 ? Sl 0:00 /TimesTen/tt1121/bin/timestensubd -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000000 -facility user
14190 ? Sl 0:00 /TimesTen/tt1121/bin/timestensubd -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000001 -facility user
14191 ? Sl 0:00 /TimesTen/tt1121/bin/timestensubd -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000002 -facility user
14192 ? Sl 0:00 /TimesTen/tt1121/bin/timestensubd -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000003 -facility user
14201 ? Sl 0:00 /TimesTen/tt1121/bin/ttcserver -verbose -userlog tterrors.log -supportlog ttmesg.log -id 1000004 -p 53389 -facility user -group timesten
14692 pts/1 S+ 0:00 grep TimesTen
Y si instalaste las bases de datos de ejemplo entonces podrás revisar tu instalación ingresando en una base de datos de ejemplo:
[timesten@myserver linux8664]$ export PATH=$PATH:/TimesTen/tt1121/bin
[timesten@myserver linux8664]$ ttIsql -connStr "DSN=sampledb_1121"
Copyright (c) 1996-2011, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
connect "DSN=sampledb_1121";
Connection successful: DSN=sampledb_1121;UID=timesten;DataStore=/TimesTen/tt1121/info/DemoDataStore/sampledb_1121;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/TimesTen/tt1121/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0;
(Default setting AutoCommit=1)
Command> exit
Disconnecting...
Done.
Finalmente, si quieres iniciar los servicios de TimesTen al momento de levantar el servidor puedes correr como root el script setuproot:
[root@myserver /]# cd /TimesTen/tt1121/bin/
[root@myserver bin]# ./setuproot -install
Would you like to install the TimesTen daemon startup scripts into /etc/init.d? [ yes ]
Copying /TimesTen/tt1121/startup/tt_tt1121 to /etc/init.d
Successfully installed the following scripts :
/etc/init.d/tt_tt1121
/etc/rc.d/rc0.d/K45tt_tt1121
/etc/rc.d/rc1.d/K45tt_tt1121
/etc/rc.d/rc2.d/S90tt_tt1121
/etc/rc.d/rc3.d/S90tt_tt1121
/etc/rc.d/rc5.d/S90tt_tt1121
/etc/rc.d/rc6.d/K45tt_tt1121
Eso es! Tienes una instalación nuevecita de Oracle TimesTen lista para usar; además, podrías querer agregar el directorio bin de TimesTen a tu variable de entorno PATH.
Más información:
TimesTen In-Memory Database Documentation
No hay comentarios.:
Publicar un comentario