Building from Source
Building from Source
Requirements:
Java 6+
Grails 1.3.4
PostgreSQL 8+ (required for testing; other runtime databases are supported)
To run jBilling from source. you will need to have Java 6+ and Grails 1.3.4 installed. To install Grails, download version 1.3.4 from the Grails Archive and follow the installation instructions for your operating system.
Java and PostgreSQL can be downloaded an installed by visiting the vendors' websites, or in Linux environments by using the package manager (apt-get or yum).
Unzipping Source Code from source package
After downloading the zip file with the source code (available in the download section), uncompress this file to get all of the source files:
unzip jbilling-community-3.0.2-src.zip
Configuring PostgreSQL
Edit the PostgreSQL pg_hba.conf file and change the 'local' and 'IPv4' localhost connection types:
# "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust
Connect to PostgreSQL and create the test user and database.
CREATE ROLE jbilling WITH LOGIN SUPERUSER CREATEDB CREATEROLE PASSWORD 'jbilling'; CREATE DATABASE jbilling_test WITH OWNER jbilling;
Setup
Run the Grails compile target to compile the jBilling source code, then run the prepare-test target to load the reference database and prepare all the required resources.
grails compile
This will start downloading dependencies (a number of jar files are needed to build jBilling). This will happen only once, the very first time. If asked to 'upgrade' a version of a jar file, answer yes.
grails prepare-test
The Grails compile target may halt with a compiler error on some environments, running compile a second time usually resolves the issue.
Running from Source
Windows: run-app.bat Linux/Mac: ./run-app.sh You will need to do chmod +x *.sh to make the script runnable