Toolpack prerequisite CentOS5 A

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(add clarification about the odbc configuration file)
(Install TelcoBridges repository locally)
 
(82 intermediate revisions by 10 users not shown)
Line 1: Line 1:
This page shows the Toolpack 2-5 prerequisites for CentOS 5.
+
'''<big>Applies to version(s) v2.5 to v2.9</big>'''
 +
{{DISPLAYTITLE:Toolpack Prerequisites for CentOS 5}}
  
 +
This page shows the prerequisites to install Toolpack for a 64 bits CentOS 5.7 with the use of TelcoBridges repository.
  
== Toolpack Prerequisites ==
+
<span style="color:#B22222">
 +
''WARNING'': The host MUST have at least CentOS 5.5 installed. If you don't want to update your CentOS version to the latest version or want to install the prerequisites for a I386 (32 bits) platform, please follow the [[Toolpack prerequisite CentOS5 2-5 manual| manual procedure]] instead.
 +
</span>
  
 +
<span style="color:#B22222">
 +
''WARNING'': If you followed the [[Toolpack prerequisite CentOS5 2-5 manual| manual procedure]] on the system before, you '''MUST NOT''' use the steps on this page before doing a cleanup of the previously installed files. You should ask Telcobridges support for help with the cleanup.
 +
</span>
  
=== Toolpack Basic packages ===
+
== Install the base CentOS 5 server ==
  
The software listed below is required by the host machines.
+
Download the following DVD image and install it using the "Minimal" package set:
 +
http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/centos/CentOS-5.7-x86_64-bin-DVD.iso
  
  yum install gcc zlib-devel
+
Press Enter to start the graphical installation:
 +
* Set a hostname (make sure it is not localhost.localdomain)
 +
* In the screen asking the set of software to install, uncheck "Desktop - Gnome" (unless you want to have the GUI)
  
=== Toolpack System Database ===
+
== Configure TelcoBridges repository  ==
  
The Toolpack system database is used by the main host and requires mySQL database server. The
+
=== Online repository procedure ===
system database packages are as follows:
+
This procedure requires internet access and a DNS configured on your unit
  
  yum install mysql-server mysql-devel
+
==== Add TelcoBridges repository file ====
  
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.
+
vim /etc/yum.repos.d/TB-Base.repo
  
1. start and enable mysql
+
Paste the following information in that file:
  
  /sbin/chkconfig mysqld on
+
# TelcoBridges-Base.repo
  /sbin/service mysqld start
+
#
 +
# This repository is using TelcoBridges frozen version of CentOS
 +
# to help client installing the required version of the
 +
# applications required to run Toolpack
 +
#
 +
 +
[tb-base]
 +
name=TelcoBridges-$releasever - Base
 +
baseurl=http://repo.telcobridges.com/centos/5/os/$basearch/
 +
gpgcheck=1
 +
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb
 +
 +
#released updates
 +
[tb-updates]
 +
name=TelcoBridges-$releasever - Updates
 +
baseurl=http://repo.telcobridges.com/centos/5/updates/$basearch/
 +
gpgcheck=1
 +
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb
  
2. Setup initial database root password
+
==== Get TelcoBridges repository key ====
  
  /usr/bin/mysqladmin -u root password ''new-password-1''
+
cd /etc/pki/rpm-gpg/
  /usr/bin/mysqladmin -u root -p''new-password-1'' -h ''HostName'' password ''new-password-2''
+
wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5
 +
rpm --import RPM-GPG-KEY-CentOS-5
 +
wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5-tb
 +
rpm --import RPM-GPG-KEY-CentOS-5-tb
  
'''IMPORTANT''': Please read the [http://dev.mysql.com/doc/refman/5.1-maria/en/default-privileges.html 'Securing the Initial MySQL Accounts'] article to learn how to manage users and privileges.
+
=== Offline repository procedure ===
 +
This procedure '''does not''' requires internet access.
  
3. Install the database.
+
==== Install TelcoBridges repository locally ====
  
  mysql_install_db
+
Download the .iso image of the repository
 +
http://repo.telcobridges.com/centos/5/isos/x86_64/tb_centos5_x86_64_repo.iso
  
 +
* Upload this .iso file to the "/root" directory of the server with scp or a SFTP tool like [http://filezilla-project.org/ FileZilla]
 +
* Mount the .iso file on your server
  
4. Log onto mysql, create a tbdb user. The ''[HostName]'', ''[DatabaseUsername]'' and ''[DatabasePassword]'' will need to be supplied to the toolpack installer.
+
Mount the .iso file on your server
If you cannot log in it is possible that the host name is not configure properly, use an IP Address instead.
+
mkdir -p /repo/centos/5
 +
mount -t iso9660 -o loop /root/tb_centos5_x86_64_repo.iso /repo/centos/5
  
  mysql -u root -p''new-password-1''
+
Add the mount point permanently to the system to make it stay after a reboot.
  CREATE USER '[DatabaseUsername]'@'%' IDENTIFIED BY '[DatabasePassword]';
+
# cp /etc/fstab /etc/fstab.bak
  GRANT ALL PRIVILEGES ON *.* TO '[DatabaseUsername]'@'%' IDENTIFIED BY '[DatabasePassword]';
+
# echo "/root/tb_centos5_x86_64_repo.iso /repo/centos/5 iso9660 loop 0 0" >> /etc/fstab
  FLUSH PRIVILEGES;
+
  exit
+
  
ex.
+
==== Add TelcoBridges repository file ====
  
  mysql -u root -pMyDbRootPassword
+
vim /etc/yum.repos.d/TB-Base.repo
  CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
+
  GRANT ALL PRIVILEGES ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
+
  FLUSH PRIVILEGES;
+
  exit
+
  
To verify if the user is created:
+
Paste the following information in that file:  
  
  mysql -u root
+
# TelcoBridges-Base.repo
  SELECT * FROM mysql.user;
+
#
  exit
+
# This repository is using TelcoBridges frozen version of CentOS
 +
# to help client installing the required version of the
 +
# applications required to run Toolpack
 +
#
 +
 +
[tb-base]
 +
name=TelcoBridges-$releasever - Base
 +
baseurl=file:///repo/centos/5/os/$basearch/
 +
gpgcheck=1
 +
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb
 +
 +
#released updates
 +
[tb-updates]
 +
name=TelcoBridges-$releasever - Updates
 +
baseurl=file:///repo/centos/5/updates/$basearch/
 +
gpgcheck=1
 +
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb
  
5.Install odbc driver and driver manager
+
==== Get TelcoBridges repository key ====
  
  yum install mysql-connector-odbc
+
cd /etc/pki/rpm-gpg/
 +
cp /repo/centos/5/RPM-GPG-KEY-CentOS-5 .
 +
cp: overwrite `./RPM-GPG-KEY-CentOS-5'? y
 +
rpm --import RPM-GPG-KEY-CentOS-5
 +
cp /repo/centos/5/RPM-GPG-KEY-CentOS-5-tb .
 +
rpm --import RPM-GPG-KEY-CentOS-5-tb
  
5a. For 32 bits system:
+
== Update CentOS ==
 +
=== Disable default CentOS repository  ===
  
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz
+
Add the following line in '/etc/yum.repos.d/CentOS-Base.repo' under the [base] and [updates section].
  tar -zxf mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz
+
enabled=0
  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/
+
  
5b. For 64 bits system:
+
Example:
 +
[base]
 +
enabled=0
 +
name=CentOS-$releasever - Base
 +
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
 +
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
 +
gpgcheck=1
 +
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
 +
 +
#released updates
 +
[updates]
 +
enabled=0
 +
name=CentOS-$releasever - Updates
 +
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
 +
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
 +
gpgcheck=1
 +
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
  
  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/
 
  
 +
=== Remove packages  ===
 +
Remove the following package
 +
yum remove glibc.i686
 +
yum remove selinux-policy-devel
 +
yum remove system-config-network
 +
yum remove dovecot
  
6. 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.
+
=== Package update  ===
  
  vim /etc/odbcinst.ini
+
Update your system to the latest CentOS 5 version from TelcoBridges repositary.
  
Here is an example:
+
yum clean metadata
 +
yum update
  
  # Driver from the MyODBC package
+
If you have the following error:
  # Setup from the unixODBC package
+
  [MySQL]                                                  <----- This line must NOT start with a '#'
+
  Description    = ODBC for MySQL
+
  Driver          = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so
+
  Setup          = /usr/lib/libodbcmyS.so
+
  FileUsage      = 1
+
  
 +
warning: rpmts_HdrFromFdno: Header V4 DSA signature: NOKEY, key ID c8bf9d3a
 +
Public key for package.rpm is not installed
  
 +
Make sure that you have the correct gpgkey lines in /etc/yum.repos.d/TB-Base.repo and that the TelcoBridges keys are properly imported.
  
7. Configure mysql to support database replication (Will not interfere if your system do not use it).
+
=== Reply to ARP only on local interfaces ===
  
  vim /etc/my.cnf
+
Modify the file /etc/sysctl.conf to add the following lines:
  
Add 2 new variable in the mysql config file
+
  net.ipv4.conf.default.arp_ignore=1
 +
  net.ipv4.conf.all.arp_ignore=1
  
Add log-bin and server-id. The value of server-id needs to be unique on each host( do not use 0 ).
+
Then restart network interfaces using the following command:
  
Make sure it is in the [mysqld] section
+
  /etc/init.d/network restart
  
  log-bin
+
=== Disabling SELinux ===
  server-id=''[UniqueId]''
+
  
 +
Check SELinux status
  
Example:
+
  sestatus
  
  [root@TL-CENTOS64-02 tblab]# cat /etc/my.cnf
+
If SELinux is enable, see the [[SELinux_management|Disabling SELinux]] article to disable it.
  [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]#
+
  
 +
=== Disabling Firewall ===
  
Reboot the mysql service
+
chkconfig iptables off
 +
service iptables stop
  
  /sbin/service mysqld restart
+
=== Apply kernel patches (if any) ===
  
=== Toolpack System Web Portal ===
+
  shutdown -r now
  
The Toolpack System Web Portal is required in order to host the Toolpack Web Portal. It requires the execution of all following commands:
+
== Install Toolpack Prerequisites  ==
  
1. Manually install fcgi:
+
When asked to 'Importing GPG key', answer yes.  
  
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/src/centos/fcgi-2.4.0.tar.gz
+
yum groupinstall Toolpack-Prerequisites
  tar -xzf fcgi-2.4.0.tar.gz
+
  cd fcgi-2.4.0
+
  ./configure
+
  make
+
  make install
+
  cd ../
+
  
2. Install pcre, libxml2 and openssl:
+
=== Install Gem ===
  
  yum install pcre libxml2 openssl-devel
+
wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/bundler-1.2.3.gem
 +
gem install --local ./bundler-1.2.3.gem
  
3. Install lighttpd:  
+
wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/json-1.7.7.gem
 +
gem install --local ./json-1.7.7.gem
  
3a. For 32 bits sytem:
+
=== Configure ODBC  ===
  
  wget -c http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/centos/lighttpd-1.4.18-1.el5.rf.i386.rpm
+
vim /etc/odbcinst.ini
  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:
+
Remove the '#' in front of each lines of the [MySQL] section Modify the 'Driver' line to set the correct driver
  
  wget -c http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/centos/lighttpd-1.4.18-1.el5.rf.x86_64.rpm
+
Example for 32 bits system:  
  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
+
  
<br>
+
[MySQL]
 +
Description    = ODBC for MySQL
 +
Driver          = /usr/lib/libmyodbc5.so
 +
Setup          = /usr/lib/libodbcmyS.so
 +
FileUsage      = 1
  
4. Install ruby
+
<br> Example for 64 bits system:
  
4a. For 32 bits system:
+
[MySQL]
 +
Description    = ODBC for MySQL
 +
Driver          = /usr/lib64/libmyodbc5.so
 +
Setup          = /usr/lib64/libodbcmyS.so
 +
FileUsage      = 1
  
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/src/centos/ruby-1.8.7-p174.tar.gz
+
=== Configure MySQL ===
  tar -zxf ruby-1.8.7-p174.tar.gz
+
  cd ruby-1.8.7-p174
+
  ./configure --libdir=/usr/local/lib --enable-shared
+
  make
+
  make install
+
  cd ext/openssl/
+
  ruby extconf.rb
+
  make
+
  make install
+
  cd ../../..
+
  ln -s /usr/local/bin/ruby /usr/bin/ruby
+
  ln -s /usr/local/lib/libruby.so.1.8 /lib/libruby.so.1.8
+
  
 +
vim /etc/my.cnf
  
4b. For 64 bits system:  
+
Add these variables in the file under the [mysqld] section:  
  
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/src/centos/ruby-1.8.7-p174.tar.gz
+
*log-bin
  tar -zxf ruby-1.8.7-p174.tar.gz
+
*server-id=''[UniqueId]''
  cd ruby-1.8.7-p174
+
  ./configure --libdir=/usr/local/lib64 --enable-shared
+
  make
+
  make install
+
  cd ext/openssl/
+
  ruby extconf.rb
+
  make
+
  make install
+
  cd ../../..
+
  ln -s /usr/local/bin/ruby /usr/bin/ruby
+
  ln -s /usr/local/lib64/libruby.so.1.8 /lib64/libruby.so.1.8
+
  
<br> 5. Install RubyGems 1.3.5
+
The server-id needs to be a non-zero unique value (do not use 0). If you use the host redundancy feature, the value needs to be different on each host .  
  
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/src/centos/rubygems-1.3.5.tgz
+
<br> Add max_allowed_packet to increase the maximum size of binary blobs in the database. Make sure it is in the [mysqld] section AND [mysqldump] section
  tar -zxf rubygems-1.3.5.tgz
+
  cd rubygems-1.3.5
+
  ruby setup.rb
+
  cd ..
+
  
6. Install gem fcgi
+
  max_allowed_packet = 200MB
  
  /usr/local/bin/gem install fcgi
+
<br> Add below to remove database dependencies with DNS servers '''(**Applicable to TMG users only)'''
  
<br> 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.
+
  skip-name-resolve
  
Service: http (12358/tcp)
+
<br> Add this to make sure the mysql logs don't get too big
  
Port: All ports (tcp/udp) enabled for local networks
+
  expire_logs_days=30
 +
  max_binlog_size=500M
  
Make sure that SELinux is disabled.
+
Example:
  
=== Toolpack Stream Server ===
+
[mysqld]
 +
datadir=/var/lib/mysql
 +
socket=/var/lib/mysql/mysql.sock
 +
user=mysql
 +
log-bin
 +
server-id=5876
 +
max_allowed_packet = 200MB
 +
expire_logs_days=30
 +
max_binlog_size=500M
 +
 +
# Default to using old password format for compatibility with mysql 3.x
 +
# clients (those using the mysqlclient10 compatibility package).
 +
old_passwords=1
 +
 +
# Disabling symbolic-links is recommended to prevent assorted security risks
 +
symbolic-links=0
 +
 +
# Added so that problems with DNS servers don't cause problems with the mysql DB
 +
# Note:&nbsp;This is applicable only if you are using a TMG
 +
skip-name-resolve
 +
 +
[mysqldump]
 +
max_allowed_packet = 200MB
  
The Tmedia Toolpack Stream Server requires the execution of the following commands:
+
=== Enable and Start MySQL  ===
  
  yum install libpcap
+
service mysqld start
 +
chkconfig mysqld on
  
 +
=== Configure MySQL Users  ===
  
=== Toolpack Development Prerequisite ===
+
*Set password for the root user to 'tbdbpw' (TelcoBridges recommends that you set your own password for root)
The Toolpack System Development prerequisite section is only required for customers that will develop their own application using the Toolpack API:
+
*Enable root connection from localhost only
 +
*Create a tbdb user (required by Toolpack)
 +
*Remove anonymous connection
  
  yum install gcc-c++
+
Example:
  yum install libxml2-devel
+
  yum install libpcap-devel
+
  yum install unixODBC-devel
+
  
 +
/usr/bin/mysqladmin -u root password tbdbpw
  
== Validation Guide (Optional) ==
+
mysql -uroot -ptbdbpw
If you would like to verify your installation go to the [[Toolpack_Installation:Validate_Toolpack_Installation_2-5|Toolpack Validation Guide]]
+
DELETE FROM mysql.user WHERE&nbsp;!(Host = 'localhost' AND User = 'root');
 +
FLUSH PRIVILEGES;
 +
CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
 +
GRANT ALL PRIVILEGES ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
 +
FLUSH PRIVILEGES;
 +
exit
 +
 
 +
== Toolpack Development Prerequisite (Optional)  ==
 +
 
 +
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++ libxml2-devel libpcap-devel unixODBC-devel libaio libaio-devel
 +
 
 +
== Validation Guide (highly recommended) ==
 +
 
 +
If you would like to verify your installation go to the [[Toolpack Installation:Validate Toolpack Installation 2-5|Toolpack Validation Guide]]  
 +
 
 +
<br>
  
 +
== Toolpack System installation  ==
  
== Toolpack System installation ==
+
Now that the prerequisite are installed, now it is time to install the [[Toolpack installer 2-4|Toolpack system]]
  
Now that the prerequisite are installed, now it is time to install the [[toolpack_installer_2-5|Toolpack system]]
+
[[Category:Revise on Major]]

Latest revision as of 17:03, 17 May 2016

Applies to version(s) v2.5 to v2.9


This page shows the prerequisites to install Toolpack for a 64 bits CentOS 5.7 with the use of TelcoBridges repository.

WARNING: The host MUST have at least CentOS 5.5 installed. If you don't want to update your CentOS version to the latest version or want to install the prerequisites for a I386 (32 bits) platform, please follow the manual procedure instead.

WARNING: If you followed the manual procedure on the system before, you MUST NOT use the steps on this page before doing a cleanup of the previously installed files. You should ask Telcobridges support for help with the cleanup.

Contents

Install the base CentOS 5 server

Download the following DVD image and install it using the "Minimal" package set:

http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/centos/CentOS-5.7-x86_64-bin-DVD.iso

Press Enter to start the graphical installation:

  • Set a hostname (make sure it is not localhost.localdomain)
  • In the screen asking the set of software to install, uncheck "Desktop - Gnome" (unless you want to have the GUI)

Configure TelcoBridges repository

Online repository procedure

This procedure requires internet access and a DNS configured on your unit

Add TelcoBridges repository file

vim /etc/yum.repos.d/TB-Base.repo

Paste the following information in that file:

# TelcoBridges-Base.repo
#
# This repository is using TelcoBridges frozen version of CentOS
# to help client installing the required version of the
# applications required to run Toolpack
#

[tb-base]
name=TelcoBridges-$releasever - Base
baseurl=http://repo.telcobridges.com/centos/5/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb

#released updates
[tb-updates]
name=TelcoBridges-$releasever - Updates
baseurl=http://repo.telcobridges.com/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb

Get TelcoBridges repository key

cd /etc/pki/rpm-gpg/
wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5
rpm --import RPM-GPG-KEY-CentOS-5
wget http://repo.telcobridges.com/centos/RPM-GPG-KEY-CentOS-5-tb
rpm --import RPM-GPG-KEY-CentOS-5-tb

Offline repository procedure

This procedure does not requires internet access.

Install TelcoBridges repository locally

Download the .iso image of the repository

http://repo.telcobridges.com/centos/5/isos/x86_64/tb_centos5_x86_64_repo.iso
  • Upload this .iso file to the "/root" directory of the server with scp or a SFTP tool like FileZilla
  • Mount the .iso file on your server

Mount the .iso file on your server

mkdir -p /repo/centos/5
mount -t iso9660 -o loop /root/tb_centos5_x86_64_repo.iso /repo/centos/5

Add the mount point permanently to the system to make it stay after a reboot.

# cp /etc/fstab /etc/fstab.bak
# echo "/root/tb_centos5_x86_64_repo.iso /repo/centos/5 iso9660 loop 0 0" >> /etc/fstab

Add TelcoBridges repository file

vim /etc/yum.repos.d/TB-Base.repo

Paste the following information in that file:

# TelcoBridges-Base.repo
#
# This repository is using TelcoBridges frozen version of CentOS
# to help client installing the required version of the
# applications required to run Toolpack
#

[tb-base]
name=TelcoBridges-$releasever - Base
baseurl=file:///repo/centos/5/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb

#released updates
[tb-updates]
name=TelcoBridges-$releasever - Updates
baseurl=file:///repo/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5-tb

Get TelcoBridges repository key

cd /etc/pki/rpm-gpg/
cp /repo/centos/5/RPM-GPG-KEY-CentOS-5 .
cp: overwrite `./RPM-GPG-KEY-CentOS-5'? y
rpm --import RPM-GPG-KEY-CentOS-5
cp /repo/centos/5/RPM-GPG-KEY-CentOS-5-tb .
rpm --import RPM-GPG-KEY-CentOS-5-tb

Update CentOS

Disable default CentOS repository

Add the following line in '/etc/yum.repos.d/CentOS-Base.repo' under the [base] and [updates section].

enabled=0

Example:

[base]
enabled=0
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
enabled=0
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


Remove packages

Remove the following package

yum remove glibc.i686
yum remove selinux-policy-devel
yum remove system-config-network
yum remove dovecot

Package update

Update your system to the latest CentOS 5 version from TelcoBridges repositary.

yum clean metadata
yum update

If you have the following error:

warning: rpmts_HdrFromFdno: Header V4 DSA signature: NOKEY, key ID c8bf9d3a
Public key for package.rpm is not installed

Make sure that you have the correct gpgkey lines in /etc/yum.repos.d/TB-Base.repo and that the TelcoBridges keys are properly imported.

Reply to ARP only on local interfaces

Modify the file /etc/sysctl.conf to add the following lines:

 net.ipv4.conf.default.arp_ignore=1
 net.ipv4.conf.all.arp_ignore=1

Then restart network interfaces using the following command:

 /etc/init.d/network restart

Disabling SELinux

Check SELinux status

 sestatus

If SELinux is enable, see the Disabling SELinux article to disable it.

Disabling Firewall

chkconfig iptables off
service iptables stop

Apply kernel patches (if any)

shutdown -r now

Install Toolpack Prerequisites

When asked to 'Importing GPG key', answer yes.

yum groupinstall Toolpack-Prerequisites

Install Gem

wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/bundler-1.2.3.gem
gem install --local ./bundler-1.2.3.gem
wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/json-1.7.7.gem
gem install --local ./json-1.7.7.gem

Configure ODBC

vim /etc/odbcinst.ini

Remove the '#' in front of each lines of the [MySQL] section Modify the 'Driver' line to set the correct driver

Example for 32 bits system:

[MySQL]
Description     = ODBC for MySQL
Driver          = /usr/lib/libmyodbc5.so
Setup           = /usr/lib/libodbcmyS.so
FileUsage       = 1	


Example for 64 bits system:

[MySQL]
Description     = ODBC for MySQL
Driver          = /usr/lib64/libmyodbc5.so
Setup           = /usr/lib64/libodbcmyS.so
FileUsage       = 1

Configure MySQL

vim /etc/my.cnf

Add these variables in the file under the [mysqld] section:

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

The server-id needs to be a non-zero unique value (do not use 0). If you use the host redundancy feature, the value needs to be different on each host .


Add max_allowed_packet to increase the maximum size of binary blobs in the database. Make sure it is in the [mysqld] section AND [mysqldump] section

 max_allowed_packet = 200MB


Add below to remove database dependencies with DNS servers (**Applicable to TMG users only)

 skip-name-resolve


Add this to make sure the mysql logs don't get too big

 expire_logs_days=30
 max_binlog_size=500M

Example:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
log-bin
server-id=5876
max_allowed_packet = 200MB
expire_logs_days=30
max_binlog_size=500M

# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# Added so that problems with DNS servers don't cause problems with the mysql DB
# Note: This is applicable only if you are using a TMG
skip-name-resolve

[mysqldump]
max_allowed_packet = 200MB

Enable and Start MySQL

service mysqld start
chkconfig mysqld on

Configure MySQL Users

  • Set password for the root user to 'tbdbpw' (TelcoBridges recommends that you set your own password for root)
  • Enable root connection from localhost only
  • Create a tbdb user (required by Toolpack)
  • Remove anonymous connection

Example:

/usr/bin/mysqladmin -u root password tbdbpw
mysql -uroot -ptbdbpw
DELETE FROM mysql.user WHERE !(Host = 'localhost' AND User = 'root');
FLUSH PRIVILEGES;
CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
GRANT ALL PRIVILEGES ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
FLUSH PRIVILEGES;
exit

Toolpack Development Prerequisite (Optional)

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++ libxml2-devel libpcap-devel unixODBC-devel libaio libaio-devel

Validation Guide (highly recommended)

If you would like to verify your installation go to the Toolpack Validation Guide


Toolpack System installation

Now that the prerequisite are installed, now it is time to install the Toolpack system

Personal tools