Toolpack prerequisite Debian4 2-3

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(modify connection string to avoid problem with root user)
(Toolpack System Database)
 
(13 intermediate revisions by one user not shown)
Line 1: Line 1:
This page shows the Toolpack 2-3 prerequisites for Debian 4.
+
This page shows the Toolpack 2-3 prerequisites for Debian 4 and Debian 5.
  
 
== Toolpack Prerequisite ==
 
== Toolpack Prerequisite ==
Line 34: Line 34:
 
   CREATE USER '[DatabaseUsername]'@'%' IDENTIFIED BY '[DatabasePassword]';
 
   CREATE USER '[DatabaseUsername]'@'%' IDENTIFIED BY '[DatabasePassword]';
 
   GRANT ALL PRIVILEGES ON *.* TO '[DatabaseUsername]'@'%' IDENTIFIED BY '[DatabasePassword]';
 
   GRANT ALL PRIVILEGES ON *.* TO '[DatabaseUsername]'@'%' IDENTIFIED BY '[DatabasePassword]';
 +
  FLUSH PRIVILEGES;
 
   exit
 
   exit
  
Line 41: Line 42:
 
   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';
 +
  FLUSH PRIVILEGES;
 
   exit
 
   exit
  
Line 55: Line 57:
 
   exit
 
   exit
  
4. Retrieve the socket path (this command will give the path to the socket file).
 
  
  mysql_config --socket
+
4.Install ODBC
  
 +
  apt-get install unixodbc
 +
  apt-get install libmyodbc
  
5. Create a symbolic link to the path retrieve using the last command.
 
  
  ln -s <PATH TAKEN FROM THE LAST CMD> /tmp/mysql.sock
+
Configure ODBC to use the MySQL connector
  
For example:
+
   odbcinst -i -f /usr/share/libmyodbc/odbcinst.ini -d
   ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
+
  
 +
4a. For 32 bits system:
  
Set the permission. Select option 7 (Create full privileges) for all database (*) on all hosts (%) for the targeted user.
+
  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/
  
  mysql_setpermission
+
4b. For 64 bits system:
  
Install ODBC
+
  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/
  
  apt-get install unixodbc
+
5. 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.
  apt-get install libmyodbc
+
  
 +
  vim /etc/odbcinst.ini
  
Configure ODBC to use the MySQL connector
+
Here is an example:
 +
  [MySQL]                            <----- This line must NOT start with a '#'. Must also not start with a space.
 +
  Description        = MySQL driver
 +
  Driver              = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so
 +
  Setup              = /usr/lib/odbc/libodbcmyS.so
 +
  CPTimeout          =
 +
  CPReuse            =
 +
  UsageCount          = 2
  
   sudo odbcinst -i -f /usr/share/libmyodbc/odbcinst.ini -d
+
Configure mysql to support database replication (Will not interfere if your system do not use it).
 +
   vim /etc/mysql/my.cnf
  
 +
6.Add 2 new variable in the mysql config file
  
Configure mysql to support database replication (Will not interfere if your system do not use it).
+
Comment out the bind-address line (put a '#' in front of the line)
   vi /etc/mysql/my.cnf
+
Example:
 
+
   # bind-address          = 127.0.0.1
Add 2 new variable in the mysql config file
+
  
 
Add log-bin and server-id. The value of server-id needs to be unique on each host( do not use 0 ).
 
Add log-bin and server-id. The value of server-id needs to be unique on each host( do not use 0 ).
Line 101: Line 117:
  
 
Restart MySQL service
 
Restart MySQL service
   service mysqld restart
+
   service mysql restart
 
+
  
 
=== Toolpack System Web Portal ===
 
=== Toolpack System Web Portal ===
Line 119: Line 134:
 
Install fcgi gem
 
Install fcgi gem
  
   gem install fcgi
+
  wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/fcgi-0.8.8.gem
 +
   gem install ./fcgi-0.8.8.gem
  
  
Line 141: Line 157:
  
 
Port: All ports (tcp/udp) enabled for local networks
 
Port: All ports (tcp/udp) enabled for local networks
 +
 +
=== Disabling SELinux ===
 +
 +
Check SELinux status
 +
 +
  sestatus
 +
 +
If SELinux is enable, see the [[SELinux_management|Disabling SELinux]] article to disable it.
  
  
Line 152: Line 176:
 
=== Toolpack Development Prerequisite ===
 
=== Toolpack Development Prerequisite ===
  
Available soon
+
  apt-get install gcc make libxml2-dev libpcap0.8-dev unixodbc-dev
 
+
  
 
== Validation Guide (Optional) ==
 
== Validation Guide (Optional) ==
If you would like to verify your installation go to the [[Toolpack_Installation:Validate_Toolpack_Installation|Toolpack Validation Guide]]
+
If you would like to verify your installation go to the [[Toolpack_Installation:Validate_Toolpack_Installation_2-3|Toolpack Validation Guide]]
  
  

Latest revision as of 14:18, 21 June 2010

This page shows the Toolpack 2-3 prerequisites for Debian 4 and Debian 5.

Contents

Toolpack Prerequisite

WARNING: This prerequisite was not validate yet


Toolpack Basic packages

 apt-get install sysvconfig
 apt-get install zlib1g-dev


Toolpack System Database

1. Install mysql.

 apt-get install mysql-server
 apt-get install libmysqlclient15-dev


2. Configure mysql

 mysql_install_db
 service mysql start
 /usr/bin/mysqladmin -u root password 'mysql'
 mysql -u root -p
 
 exit

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]';
 FLUSH PRIVILEGES;
 exit

ex.

 mysql -u root -p
 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. The [HostName] will need to be supplied to the toolpack installer. If you cannot log in it is possible that the host name is not configure properly, use an IP Address instead.

 mysql -u root -h '[HostName]' -p
 SELECT * FROM mysql.user;
 exit

ex.

 mysql -u root -h debian64-01 -p
 SELECT * FROM mysql.user;
 exit


4.Install ODBC

 apt-get install unixodbc
 apt-get install libmyodbc


Configure ODBC to use the MySQL connector

 odbcinst -i -f /usr/share/libmyodbc/odbcinst.ini -d

4a. For 32 bits system:

 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/

4b. For 64 bits system:

 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/

5. 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.

 vim /etc/odbcinst.ini 

Here is an example:

 [MySQL]                            <----- This line must NOT start with a '#'. Must also not start with a space.
 Description         = MySQL driver
 Driver              = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so
 Setup               = /usr/lib/odbc/libodbcmyS.so
 CPTimeout           =
 CPReuse             =
 UsageCount          = 2

Configure mysql to support database replication (Will not interfere if your system do not use it).

 vim /etc/mysql/my.cnf

6.Add 2 new variable in the mysql config file

Comment out the bind-address line (put a '#' in front of the line) Example:

 # bind-address          = 127.0.0.1

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
 server-id=[UniqueId]

Example:

 # The following can be used as easy to replay backup logs or for replication.
 server-id              = 1
 log_bin                = /var/log/mysql/mysql-bin.log

Restart MySQL service

 service mysql restart

Toolpack System Web Portal

Install web server packages

 apt-get install libfcgi
 apt-get install libfcgi-dev
 apt-get install lighttpd
 apt-get install ruby irb ri rdoc build-essential 
 apt-get install rubygems
 apt-get install ruby1.8-dev
 apt-get install libopenssl-ruby1.8


Install fcgi gem

 wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/fcgi-0.8.8.gem
 gem install ./fcgi-0.8.8.gem


Install libxml2 ( was already installed )

 apt-get install libxml2


Use the UI to prevent lighttpd to start at boot time. ( Remove the '*' besides the lighttpd service )

 sysvconfig


Stop the lighttpd service

 service lighttpd stop

Firewall seems to be disable by default. But if there is one, it needs to allow:

Service: http (12358/tcp)

Port: All ports (tcp/udp) enabled for local networks

Disabling SELinux

Check SELinux status

 sestatus

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


Toolpack Stream Server

Install pcap0.8 for the stream server

 apt-get install libpcap0.8


Toolpack Development Prerequisite

 apt-get install gcc make libxml2-dev libpcap0.8-dev unixodbc-dev

Validation Guide (Optional)

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