strechged_infgtrdswe_mnggtrsg

Embed Size (px)

DESCRIPTION

strechged_infgtrdswe_mnggtrsg

Citation preview

  • The Open Source Enterprise Billing System

    Installation Instructions

    Requirement.

    Software Requirement:

    JDK 6

    Database: PostgreSQL 9.2+ (required for testing, other runtime databases are supported) OR MySQL 5.1.68 OR Oracle 11g

    Hardware Requirements: Processor : 1 GHz x86-64 processor Memory (RAM) : 2 GB HDD : 160 GB

    Operating System: Windows XP, Windows 7, Ubuntu 10.04, red hat Linux.

    Browsers: Mozilla Firefox 18.0.1 and above Internet Explorer 9 Google Chrome 26.0.1410.64

    Steps to Install JDK 6 on Windows.

    1. Find if Windows is 32 bit or 64 bit.

    As describe in first paragraph, you can find if Windows 8 or Windows 7 is 32-bit or 64-bit by checking System Type in Control Panel >> System and Security >> System and then looking at System Type Properties.

    2. Download correct JDK 6 installer from Java download sites

    Go to Java SE download site http://www.oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html and select jdk-6u45-windows-i586.exe for 32 bit and jdk-6u45-windows-x64.exe for 64 bit .

    3. Install JDK by double clicking on Windows installer Once you download correct JDK installer, rest of installation is like installing any other Windows based application. Just follow Instruction given by Java SE Installation Wizard.

    4. Include JDK bin directory in Windows PATH environment variable.

    Go to Start Menu >> Right click on Computer >> Properties >> Advanced System Settings >> Environment Variables >> System Variable >> path >> edit and include C:\Program Files\Java\jdk1.6.0_21\bin in PATH environment variable.

    Steps to Install PostgreSQL for Windows

    1. Go to the following link and click on the windows button of latest stable release of PostgreSQL as per system type (86/64). This will start downloading of the same.

    http://www.enterprisedb.com/products-services-training/pgdownload 2. Run the downloaded exe of postgreSQL to install it. 3. Some screenshots to guide through the installation of postgresql-9.2.4 :-

  • 4. Trust all local connections to the PostgreSQL instance.

    Edit the C:\Program Files\PostgreSQL\9.2\data\pg_hba.conf file and change the IPv4 and local Unix socket lines to trust.

    The version number in the path to the pg_hba.conf might change depending on the version installed by the package manager. Pay attention to the version of PostgreSQL installed.

    pg_hba.conf:

    # IPv4 local connections:

    host all all 127.0.0.1/32 trust

    # IPv6 local connections:

    host all all ::1/128 trust

    5. After that restart the PostgresSQL service from Start >> type services in Search Programs and files or type services.msc in run >> open Services Window >> search PostgresSQL and restart it.

    Create the jBilling database and database user

    PostgreSQL comes with a simple database template that you can connect to temporarily to create the necessary role and database.

    6. Go to Start >> All programs >> PostgresSQL 9.2 >> SQL shell (psql).

    7. You will first need to press the 'Enter' key several times to select the default configuration for starting PosgresSQL. Then you must copy or enter the text as it appears below in its entirely into the command shell.

    8. Create Role and Database using following Commands.

    CREATE ROLE jbilling WITH LOGIN SUPERUSER CREATEDB CREATEROLE PASSWORD 'mypassword';

    CREATE DATABASE jbilling_test WITH OWNER jbilling;

  • Download the jbilling binary zip file on you local machine and Unzip.

    Create jbilling_test database.

    Please note, in order to run a new or updated zip file, if you have already done a database build you need to drop it.

    a) Go to your Start Menu >> All Programs >> PostgresSQL 9.2 >> SQL Shell b) Press the 'Enter' key five (5) times. c) In the SQL Shell enter:

    DROP DATABASE jBilling_test;

    d) Press the 'Enter' key. You should see the text: DROP DATABASE. e) Create a new database by entering: f) In the SQL Shell enter:

    CREATE DATABASE jbilling_test WITH OWNER jbilling;

    g) Press the 'Enter' key. You should see the text: CREATE DATABASE h) In case of windows if binary zip is unpacked in C drive, then open a command prompt i) window. Run all commands one by one, The commands should use paths as below:

    cd C:\Program Files\PostgreSQL\9.2\bin psql jbilling_test jbilling -U jbilling < C:[enter the path to find the file here]\jbilling-enterprise-3.2.0\db- scripts\postgres\jbilling-changelog-table-psql.sql psql jbilling_test jbilling -U jbilling < C:[enter the path to find the file here]\jbilling-enterprise-3.2.0\db-scripts\postgres\jbilling-schema-base-psql.sql psql jbilling_test jbilling -U jbilling < C:[enter the path to find the file here]\jbilling-enterprise-3.2.0\db-scripts\postgres\jbilling-init_data-psql.sql psql jbilling_test jbilling -U jbilling < C:[enter the path to find the file here]\jbilling-enterprise-3.2.0\db-scripts\postgres\jbilling-schema-FKs-psql.sql psql jbilling_test jbilling -U jbilling < C:[enter the path to find the file here]\jbilling-enterprise-3.2.0\db-scripts\postgres\jbilling-upgrade-3.2-psql.sql

    To Run the Application

    1. Just go jbilling-enterprise-3.2.0/bin and double click on the startup.bat file to start tomcat.

    2. Point to url: http://localhost:8080/jbilling/signup. Create your Company by providing necessary details.

    3. After that login into the JBilling System using your username and password which you provided on signup.

    Installation Instructions for Linux

    Steps to Install PostgreSQL

    Red Hat / CentOS

    sudo yum install postgresql-libs postgresql postgresql-server

    sudo service postgresql initdb (or start/stop if initdb not supported by

    postgres version)

    Ubuntu / Debian

    sudo apt-get install postgresql postgresql-client

    Trust all local connections to the PostgreSQL instance.

    Edit the pg_hba.conf file and change the IPv4 and local Unix socket lines to trust. Note that the client should be aware of this and adjust the security to their needs in a production environment, its best if their own system admin consults the PostgreSQL documentation to determine the correct settings for their environment.

    The version number in the path to the pg_hba.conf might change depending on the version installed by the package manager. Pay attention to the version of PostgreSQL installed.

    sudo vim /var/lib/pgsql/data/pg_hba.conf (Red Hat / CentOS)

    sudo vim /etc/postgresql/8.4/main/pg_hba.conf (Ubuntu / Debian)

    pg_hba.conf:

    # "local" is for Unix domain socket connections only

    local all all trust

    # IPv4 local connections:

    host all all 127.0.0.1/32 trust

    Change the PostgresSQL listener to allow connections via TCP. The client should review this later; It might not be necessary to listen on all addresses if the machine has a static IP.

    sudo vim /var/lib/pgsql/data/postgresql.conf (Red Hat / CentOS)

    sudo vim /etc/postgresql/8.4/main/postgresql.conf (Ubuntu / Debian)

    postgresql.conf:

    listen_addresses = '*'

    port = 5432

  • Start or restart PostgreSQL:

    sudo service postgresql restart

    References:

    https://help.ubuntu.com/community/PostgreSQL http://bytes.com/topic/postgresql/answers/779001-how-run-postgresql-debian-terminal

    Create the jBilling database and database user

    PostgreSQL comes with a simple database template that you can connect to temporarily to create the necessary role and database.

    You will first need to press the 'Enter' key several times to select the default configuration for starting PosgresSQL. Then you must copy or enter the text as it appears below in its entirety into the command shell.

    sudo su postgres

    psql template1

    CREATE ROLE jbilling WITH LOGIN SUPERUSER CREATEDB CREATEROLE PASSWORD 'mypassword';

    CREATE DATABASE jbilling_test WITH OWNER jbilling;

    - or

    sudo -u postgres createuser --superuser jbilling -P

    sudo -u postgres createdb jbilling_test

    Oracle Installation For Ubuntu: http://en.kioskea.net/faq/4405-linux-installing-oracle-11g-on-ubuntu#download-oracle

    MySQL Installation

    Go to this link to install MySQL http://www.tutorialspoint.com/mysql/mysql-installation.htm

    Steps to Unpack the JBilling Enterprise Edition Release binary zip

    1. Download the jbilling-enterprise-3.2.0.rcx.zip binary file on you local machine. 2. Unzip jbilling-enterprise-3.2.0.rcx.zip using following command.

    unzip jbilling-enterprise-3.2.0.rc8.zip

    3. Create jbilling_test database & run following commands as per your database to build database.

    For Postgres Database

    Please note, in order to run a new or updated zip file, if you have already done a database build you need to drop it.

    1. Open a command prompt window. Run following commands one by one to build database. The below commands are considering Linux system paths.

    psql jbilling_test < jbilling-enterprise-3.2.0/db-scripts/postgres/jbilling-changelog-table-psql.sql

    psql jbilling_test < jbilling-enterprise-3.2.0/db-scripts/postgres/jbilling-schema-base-psql.sql

    psql jbilling_test < jbilling-enterprise-3.2.0/db-scripts/postgres/jbilling-init_data-psql.sql

    psql jbilling_test < jbilling-enterprise-3.2.0/db-scripts/postgres/jbilling-schema-FKs-psql.sql

    psql jbilling_test < jbilling-enterprise-3.2.0/db-scripts/postgres/jbilling-upgrade-3.2-psql.sql

    By default jbilling-enterprise-3.2.0/jbilling/jbilling-DataSource.groovy is pointing to postgres database.

    For Mysql Database

    1. Open a command prompt window. Run following commands one by one to build database. The below commands are considering Linux system paths.

    mysql -uroot -pjava jbilling_test < jbilling-enterprise-3.2.0/dbscripts/mysql/jbilling-changelog-table-psql.sql

    mysql -uroot -pjava jbilling_test < jbilling-enterprise-3.2.0/db-scripts/mysql/jbilling-schema-base-psql.sql

    mysql -uroot -pjava jbilling_test < jbilling-enterprise-3.2.0/db-scripts/mysql/jbilling-init_data-psql.sql

    mysql -uroot -pjava jbilling_test < jbilling-enterprise-3.2.0/db-scripts/mysql/jbilling-upgrade-3.2-psql.sql

    2. If you are using mysql database then comment the following code from jbilling-enterprise-3.2.0/jbilling/jbilling-DataSource.groovy

    dialect = "org.hibernate.dialect.PostgreSQLDialect"

    driverClassName = "org.postgresql.Driver"

    username = "jbilling"

    password = ""

    url = "jdbc:postgresql://localhost:5432/jbilling_test"

  • 3. After that un-comment the following code from jbilling-enterprise-3.2.0/jbilling/jbilling- DataSource.groovy to point to MySQL database.

    For Oracle Database

    1. In case of windows if binary zip is unpacked in C drive (you can unpack in the drive of your choice). Open a SQL command prompt for oracle database from Start>>All programs>>Oracle Database 10g Express Edition>>Run SQL Command Line. First connect to database using connect command & then run the scripts. You need give the full file path & prepped it with '@'. The below commands are considering windows system paths.

    connect jbilling_test/jbilling

    @C://jbilling-enterprise-3.2.0/db-scripts/oracle/jbilling-schema-base-psql.sql

    @C://jbilling-enterprise-3.2.0/db-scripts/oracle/jbilling-init_data-psql.sql

    @C://jbilling-enterprise-3.2.0/db-scripts/oracle/jbilling-schema-FKs-psql.sql

    @C://jbilling-enterprise-3.2.0/db-scripts/oracle/jbilling-upgrade-3.2-psql.sql

    2. For oracle database comment the following code from jbilling-enterprise-3.2.0/jbilling/jbilling-DataSource.groovy

    dialect = "org.hibernate.dialect.PostgreSQLDialect"

    driverClassName = "org.postgresql.Driver"

    username = "jbilling"

    password = ""

    url = "jdbc:postgresql://localhost:5432/jbilling_test"

    3. After that un-comment the following code from jbilling-enterprise-3.2.0/jbilling/billings- DataSource.groovy to point to Oracle database.

    dialect = "org.hibernate.dialect.Oracle10gDialect"

    driverClassName = "oracle.jdbc.driver.OracleDriver"

    username = "jbilling"

    password = "java"

    url = "jdbc:oracle:thin:@localhost:1521/xe"

    Note: Oracle uses username as a database name, so you need to provide correct username & password to point to oracle database.

    To Run the Application

    1. For Linux system: Open another command prompt window to start tomcat instance using following commands.

    cd jbilling-enterprise-3.2.0/bin

    bin$ chmod +x *.sh

    bin$ ./startup.sh

    2. Open command prompt window to start tomcat instance using following commands.

    cd jbilling-enterprise-3.2.0/bin/startup.bat

    3. Point to url http://localhost:8080/jbilling/signup. Create your Company by providing necessary details.

    4. After that login into the JBilling System using your username and passward.

    dialect = "org.hibernate.dialect.MySQLDialect"

    driverClassName = "com.mysql.jdbc.Driver"

    username = "root"

    password = "java"

    url = "jdbc:mysql://localhost:3306/jbilling_test"