Actions

Toolpack migration CentOS5 2-3: Difference between revisions

 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page shows the Toolpack 2-3 prerequisites for Centos 5.
This page shows the Toolpack 2-3 migration guide for CentOS 5.




== Toolpack Prerequisite ==
== Toolpack Migration Steps ==




=== Toolpack Basic packages ===
=== Create new database user ===


The software listed below is required by the host machines.
Connect to MySQL and create a new user tbdb with all privilege.
If you are unable to connect, use an IP Address instead of the ''[HostName]''.


   yum install gcc
   mysql -u root -h '[HostName]'
  yum install zlib-devel2
   CREATE USER 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]';
 
   GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]';
 
=== Toolpack System Database ===
 
The Toolpack system database is used by the main host and requires mySQL database server. The
system database packages are as follows:
 
  yum install mysql-server
  yum install mysql-devel
 
Depending on the CentOS installation, the command paths for the database (i.e. mysql_install_db, mysqladmin, mysql) and system tools (chkconfig, service, etc) may not be included in the active PATH environment variable. MySql is usually installed in /usr/bin and system tools in sbin.
 
1. start and enable mysql
 
  chkconfig mysqld on
  service mysqld start
 
2. Install the database.
 
  mysql_install_db
 
 
3. Log onto mysql, create a tbdb user. The ''[DatabaseUsername]'' and ''[DatabasePassword]'' will need to be supplied to the toolpack installer.
 
  mysql -u root -p
   CREATE USER '[DatabaseUsername]'@'%' IDENTIFIED BY '[DatabasePassword]';
   GRANT ALL PRIVILEGES ON *.* TO '[DatabaseUsername]'@'%' IDENTIFIED BY '[DatabasePassword]';
   exit
   exit


ex.
Example
 
   mysql -u root -h centos64-02
   mysql -u root -p
   CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
   CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
   GRANT ALL PRIVILEGES ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
   GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
  exit
 
To verify if the user is created:
 
  mysql -u root -p
  SELECT * FROM mysql.user;
   exit
   exit
4. Retrieve the socket path (this command will give the path to the socket file).
  mysql_config --socket
5. Create a symbolic link to the path retrieve using the last command.
  ln -s <PATH TAKEN FROM THE LAST CMD> /tmp/mysql.sock
For example:
  ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
6. Set the permission. Select option 7 (Create full privileges) for all database (*) on all hosts (%) for
the user ''[DatabaseUsername]'' (i.e. tbdb).
  mysql_setpermission




7.Install odbc driver and driver manager
=== Install ODBC MySQL connector ===


   yum install mysql-connector-odbc
   yum install mysql-connector-odbc


7a. For 32 bits sytem:
For 32 bits sytem:


   wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz
   wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz
Line 82: Line 33:
   cp mysql-connector-odbc-3.51.27-linux-x86-32bit/lib/libmyodbc3_r-3.51.27.so /lib/tb/toolpack/3rdparty/odbc-connector/
   cp mysql-connector-odbc-3.51.27-linux-x86-32bit/lib/libmyodbc3_r-3.51.27.so /lib/tb/toolpack/3rdparty/odbc-connector/


7b. For 64 bits sytem:
For 64 bits sytem:


   wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-64bit.tar.gz
   wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-64bit.tar.gz
Line 90: Line 41:




8. Manually configure the odbc manager. Make sure mysql driver is enable(removing the comments for the mysql driver). Set the Driver as the previous command answer.
=== Configure ODBC driver manager ===
 
*Enable the MySQL driver is enable (remove the comments for the MySQL driver). '''***WARNING: There must be no space at the beginning of the line'''
*Set the Driver to /lib/tb/toolpack/3rdparty/odbc-connector/


   vim /etc/odbcinst.ini  
   vim /etc/odbcinst.ini  
Line 98: Line 52:
   # Driver from the MyODBC package
   # Driver from the MyODBC package
   # Setup from the unixODBC package
   # Setup from the unixODBC package
   [MySQL]
   [MySQL]                                             <----- This line must NOT start with a '#'. Must also not start with a space.
   Description    = ODBC for MySQL
   Description    = ODBC for MySQL
   Driver          = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so
   Driver          = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so
Line 104: Line 58:
   FileUsage      = 1
   FileUsage      = 1


=== Enable MySQL database replication ===
Configure the MySQL configuration file


  vim /etc/my.cnf


9. Configure mysql to support database replication (Will not interfere if your system do not use it).
Add 2 lines in the configuration file:
*log-bin
*server-id


  vim my.ini
server-id value needs to be a non-zero value and unique on each host if database redundancy is used.


Add 2 new variable in the mysql config file
Make sure it is under the [mysqld] section
 
  vim /etc/my.cnf
 
Add log-bin and server-id. The value of server-id needs to be unique on each host( do not use 0 ).
 
Make sure it is in the [mysqld] section


   log-bin
   log-bin
   server-id=''[UniqueId]''
   server-id=[UniqueId]




Line 141: Line 94:




Reboot the mysql service
=== Restart MySQL service ===
 
service mysqld restart
 
 
 
=== Toolpack System Web Portal ===
 
The Toolpack System Web Portal is required in order to host the Toolpack Web Portal. It requires the execution of all following commands:
 
1. Manually install fcgi:
 
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/src/centos/fcgi-2.4.0.tar.gz
  tar -xzf fcgi-2.4.0.tar.gz
  cd fcgi-2.4.0
  ./configure
  make
  make install
  cd ../
 
2. Install pcre:
 
  yum install pcre
 
3. Install lighttpd:
 
3a. For 32 bits sytem:
 
  wget -c http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/centos/lighttpd-1.4.18-1.el5.rf.i386.rpm
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/centos/lighttpd-fastcgi-1.4.18-1.el5.rf.i386.rpm
  rpm -ivh lighttpd-1.4.18-1.el5.rf.i386.rpm lighttpd-fastcgi-1.4.18-1.el5.rf.i386.rpm
 
3b. For 64 bits sytem:
 
  wget -c http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/centos/lighttpd-1.4.18-1.el5.rf.x86_64.rpm
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/centos/lighttpd-fastcgi-1.4.18-1.el5.rf.x86_64.rpm
  rpm -ivh lighttpd-1.4.18-1.el5.rf.x86_64.rpm lighttpd-fastcgi-1.4.18-1.el5.rf.x86_64.rpm
 
4. Install Ruby:
 
  yum install ruby
  yum install ruby-devel
 
6. Manually install rubygems:
 
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/src/centos/rubygems-0.9.0.tgz
  tar -xzf rubygems-0.9.0.tgz
  cd rubygems-0.9.0
  ruby setup.rb
  cd ../
 
7. Install gem fcgi:
 
  gem install fcgi
 
8. Install libxml:
 
  yum install libxml2
 
Make sure that the firewall enables these following services and ports. Failure to open those ports will render socket communication between the distributed software elements unavailable.
Service: http (12358/tcp)
Port: All ports (tcp/udp) enabled for local networks
 
=== Toolpack Stream Server ===
 
The Tmedia Toolpack Stream Server requires the execution of the following commands:


   yum install libpcap
   service mysqld restart




=== Toolpack Development Prerequisite ===
=== Disable Release 2-2 Service ===
The Toolpack System Development prerequisite section is only required for customers that will develop their own application using the Toolpack API:


   yum install gcc-c++
   tbtoolpack disable 2.2
  yum install libxml2-devel
  yum install libpcap-devel
  yum install unixODBC-devel
  yum install zlib-devel





Latest revision as of 14:17, 21 June 2010

This page shows the Toolpack 2-3 migration guide for CentOS 5.


Toolpack Migration Steps

Create new database user

Connect to MySQL and create a new user tbdb with all privilege. If you are unable to connect, use an IP Address instead of the [HostName].

 mysql -u root -h '[HostName]'
 CREATE USER 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]';
 GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]';
 exit

Example

 mysql -u root -h centos64-02
 CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
 GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
 exit


Install ODBC MySQL connector

 yum install mysql-connector-odbc

For 32 bits sytem:

 wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz
 tar -zxf mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz
 mkdir -p /lib/tb/toolpack/3rdparty/odbc-connector/
 cp mysql-connector-odbc-3.51.27-linux-x86-32bit/lib/libmyodbc3_r-3.51.27.so /lib/tb/toolpack/3rdparty/odbc-connector/

For 64 bits sytem:

 wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-64bit.tar.gz
 tar -zxf mysql-connector-odbc-3.51.27-linux-x86-64bit.tar.gz
 mkdir -p /lib/tb/toolpack/3rdparty/odbc-connector/
 cp mysql-connector-odbc-3.51.27-linux-x86-64bit/lib/libmyodbc3_r-3.51.27.so /lib/tb/toolpack/3rdparty/odbc-connector/


Configure ODBC driver manager

  • Enable the MySQL driver is enable (remove the comments for the MySQL driver). ***WARNING: There must be no space at the beginning of the line
  • Set the Driver to /lib/tb/toolpack/3rdparty/odbc-connector/
 vim /etc/odbcinst.ini 

Here is an example:

 # Driver from the MyODBC package
 # Setup from the unixODBC package
 [MySQL]                                              <----- This line must NOT start with a '#'. Must also not start with a space.
 Description     = ODBC for MySQL
 Driver          = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so
 Setup           = /usr/lib/libodbcmyS.so
 FileUsage       = 1

Enable MySQL database replication

Configure the MySQL configuration file

 vim /etc/my.cnf

Add 2 lines in the configuration file:

  • log-bin
  • server-id

server-id value needs to be a non-zero value and unique on each host if database redundancy is used.

Make sure it is under the [mysqld] section

 log-bin
 server-id=[UniqueId]


Example:

 [root@TL-CENTOS64-02 tblab]# cat /etc/my.cnf
 [mysqld]
 datadir=/var/lib/mysql
 socket=/var/lib/mysql/mysql.sock
 user=mysql
 log-bin
 server-id=1
 # Default to using old password format for compatibility with mysql 3.x
 # clients (those using the mysqlclient10 compatibility package).
 old_passwords=1
 
 [mysqld_safe]
 log-error=/var/log/mysqld.log
 pid-file=/var/run/mysqld/mysqld.pid
 [root@TL-CENTOS64-02 tblab]#


Restart MySQL service

 service mysqld restart


Disable Release 2-2 Service

 tbtoolpack disable 2.2


Toolpack System installation

Now that the prerequisite are installed, we can go back to the migration guide Toolpack migration 2-3.