TooLERP Install Guide for Linux

ToolERP is the most advanced Small Business Software. It is built using high end industry standard 3 tier architecture. It uses Ruby on Rails to store all your business data in MySQL relational database. It provides world wide access using Apache web server. This enables it to be accessed from anywhere using a simple Internet connection. It is very easy to install and use. It can be deployed in Standalone, LAN and WAN modes.

NOTE: To use TooLERP in WAN mode, it is recommended that you secure the installation using SSL (Secure Socket Layer). SSL is used by all organizations that provide sensitive data over Internet, e.g. Banks, Credit Card Companies etc. SSL encrypts the data before it is sent over Internet between client(your browser) and server(TooLERP Server).

TooLERP is an application written on Ruby on Rails. Ruby on Rails is most advanced and elegant Content Management Framework (CMF) solution to date.

If you already have Ruby on Rails running on your Linux server you can simply download TooLERP application directory toolerp_12_25_08 and unzip in Rails Application directory. Create a mysql database named "toolerp_production" and rake migrate the production environment. If you are not familiar with any of the above simply follow the step by step instructions below.

TooLERP can deployed in the following modes.

1.Standalone (Desktop) Installation
2.Local Area Network (LAN) Installation
3.Wide Area Network (WAN) Installation

1.Standalone (Desktop) Installation

This is the easiest and most basic installation of TooLERP. Just follow these simple steps.

1.Install Rubyworks Production Stack

You need Ruby on Rails to run TooLERP. Easiest and quickest way to install Ruby on Rails on Linux is to use Rubyworks Production Stack. It installs Ruby, Ruby on Rails , HAProxy (HTTP Proxy Load Balancer), Mongrel (Ruby on Rails Server) and creates a dummy Rails Application running on 4 Mongrel Cluster. This set up is good and adequate to run a Load balanced WAN TooLERP Server. Please follow step by step instructions on Rubyworks site to have Rubyworks Production Stack up and running in five minuets.

Rubyworks Procution Stack : http://rubyworks.rubyforge.org/

2.Remove Dummy Rails Application

After you have the Dummy Rails Application up and running, go to the directory where the application resides (e.g. /usr/rails on CentOS 5) and remove the applicaiton.

To find where the application is you can check mongrel config file too. (e.g. Mongrel config files resides on /etc/rails on CentOS 5).

# pwd
/etc/rails

#ls -l
total 24
-rw-r--r-- 1 root root 2796 Dec 10 00:01 haproxy.conf
-rw-r--r-- 1 root root 150 Mar 12 2008 mongrel_3002.config
-rw-r--r-- 1 root root 150 Mar 12 2008 mongrel_3003.config
-rw-r--r-- 1 root root 150 Mar 12 2008 mongrel_3004.config
-rw-r--r-- 1 root root 150 Mar 12 2008 mongrel_3005.config

# more mongrel_3002.config
:cwd: /usr/rails/
:log_file: /usr/rails/log/mongrel_3002.log
...

mongrel_3002.config shows Dummy Application is in /usr/rails/

Go to the directory where Dummy Application was installed.

# cd /usr/rails

(NOTE: Make absolutely sure that you are in Dummy Rails directory. Else you could seriously damage your Linux installation.)

# rm -rf *

This will remove all the files in the directory.

3.Install TooLERP Application

Download TooLERP Application zip file "toolerp_12_25_08.zip" to the directory where Dummy Rails application was (e.g. /usr/rails/ in CentOS 5). This zip contains the needed components to run TooLERP.

# pwd
/usr/rails

# ls -l
total 2648
-rw-r--r-- 1 root root 2704820 Dec 26 13:18 toolerp_12_25_08.zip

Now unzip the toolerp_12_25_08.zip file that you just downloaded.

# pwd
/usr/rails

# unzip toolerp_12_25_08.zip

This will inflate the TooLERP Application.

# ls -l
total 2708
-rw-rw-rw- 1 root root 8819 Aug 27 18:08 README
-rw-rw-rw- 1 root root 306 Sep 1 14:25 Rakefile
drwxrwxrwx 6 root root 4096 Dec 25 10:28 app
drwxrwxrwx 4 root root 4096 Dec 25 10:28 config
drwxrwxrwx 4 root root 4096 Dec 25 10:28 db
drwxrwxrwx 2 root root 4096 Dec 25 10:28 doc
drwxrwxrwx 3 root root 4096 Dec 25 10:28 lib
drwxrwxrwx 2 root root 4096 Dec 25 10:28 log
drwxrwxrwx 5 root root 4096 Dec 25 10:28 public
drwxrwxrwx 4 root root 4096 Dec 25 10:28 script
drwxrwxrwx 7 root root 4096 Dec 25 10:28 test
drwxrwxrwx 6 root root 4096 Dec 25 10:28 tmp
-rw-r--r-- 1 root root 2704820 Dec 26 13:18 toolerp_12_25_08.zip
drwxrwxrwx 4 root root 4096 Dec 25 10:28 vendor

4.Create Database and User

TooLERP needs mysql database "toolerp_production" . So to create the database log in a root.

# mysql –u root

mysql>CREATE DATABASE toolerp_production;

5.Migrate the Environment

Create all the database objects by using Rake to migrate Production Environment.

# rake db:migrate RAILS_ENV="production"
(in /usr/rails)

This will create all the needed tables and insert all the seeded data.

6.Use TooLERP

From your X-Windows system point your browser to the same URL where Dummy Application was running. (e.g. http://127.0.0.1:3000 )

You will be presented with login screen.

Start using ToolERP. Please read TooLERP User Guide to know about features and functionality.

2.Local Area Network (LAN) Installation

Once you have TooLERP running in desktop mode, it is easy to run it in LAN mode. In LAN mode any computer on the same LAN(Local Area Network) can access ToolERP. This is helpful if you are running it in a small office or home and want other users to be able to access it too. All components for LAN mode deployment are already in place and running in Desktop mode. The only difference is that in Desktop the same computer acts as client and server, where as in LAN mode they are different. To deploy TooLERP in LAN mode just follow these simple steps.

1.Find Server IP Address

In a LAN each computer is assigned its own IP (Internet Protocol) Address. It is used to locate the computer just like a real address is used to locate a building. The first step is to find out this address for your server. Your server will be where you have just finished installing TooLERP in Desktop mode. To find it do the following

1. On your Server computer log in as root.

# su -

The run ifconfig to know the ipaddress.

# ifconfig

[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr -
inet addr:192.168.1.67 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:237 errors:1 dropped:0 overruns:0 frame:0
TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
...

Note down the Server IP Address.

2.Point Browser to Server

Now from any computer in the same LAN point the browser to http://Server IP Address:3000 (e.g. http://192.168.1.67:3000). You will be presented with the login screen. Login and start using TooLERP.

If you get "Service Unavailabe" Error you may be running SEL (Seciruty Enabled Linux) which is blocking Apache access to Database. To fix do the following.

[root@localhost conf]# service httpd status
httpd (pid 5688 5687 5686 5685 5684 5683 5682 5681 5679) is running...
[root@localhost conf]# sestatus -b | grep httpd
allow_httpd_anon_write                 off
allow_httpd_bugzilla_script_anon_write off
allow_httpd_mod_auth_pam               off
allow_httpd_nagios_script_anon_write   off
allow_httpd_squid_script_anon_write    off
allow_httpd_sys_script_anon_write      off
httpd_builtin_scripting                on
httpd_can_network_connect              off <= change this one

[root@localhost conf]# togglesebool httpd_can_network_connect
httpd_can_network_connect: active

Now you should be able see the login page.

Running in LAN mode you reap the benefits of 3-tier architecture of TooLERP. You have one shared server that stores all your data and it can be accessed from anywhere on the LAN.

3.Wide Area Network (WAN) Installation

In WAN mode TooLERP is accessible from all over the planet. To run a WAN installation you should rent a server that provides an IP Address that can be reached over the Internet. Use the Desktop Installation Method to install TooLERP on your Linux WAN Server. All the installation steps are exactly same. The only difference is that in WAN server you have a public IP Address that you can reach over the Internet.

NOTE: To use TooLERP in WAN mode, it is recommended that you secure the installation using SSL (Secure Socket Layer). SSL is used by all organizations that provide sensitive data over Internet, e.g. Banks, Credit Card Companies etc. SSL encrypts the data before it is sent over Internet between client(your browser) and server(TooLERP Server). Most new Linux servers come preinstalled with Apache and SSL. If you do not have SSL enable Apache installed please read Apache documentaion on how to enable SSL for your Linux Server.

If you are not familiar or comfortable with setting up a WAN Server we can do it for you for a small one time set up fee. TooLERP Demo site http://www.toolerpdemo.com is an example of TooLERP deployed in LAN mode. It is accessible from everywhere on the Internet and even from small devices like Blackberry cell phones and iPhone etc. This provides the greatest access, stability and scalability unmatched by any other small business software currently in the market. It is recommended that you use a Linux server to run TooLERP in WAN mode. To set up TooLERP on Linux server in, please read TooLERP Install Guide for Linux.