Deployment

Code Igniter

Prerequisite:

You should have following softwares installed on your machine.

  • Apache 2
  • PHP (Version 5 or higher)
  • MySQL

Database Setup

The downloaded file includes a SQL file in location <project>/sql/create.sql, run it on your local MySQL instance.

Change the following line in <project>/application/config/database.php

'username' => 'root',
'password' => '<root password>',

Note

Do not use root user in production, create a seperate user for the application who has access to only the application database. These values are given only for testing purpose.

Deploying using PHP internal server

Once you have downloade the source code, unzip it to a location of your choice.

Using a terminal/command line to navigate to the directory.

Change the following line in <project>/application/config/config.php

$config['base_url'] = 'http://localhost:7070/<name of your application>'
run ` php -S localhost:7070`

remember the name of application should be same as folder name

Note

Do not use PHP internal server in production, deploy your application on Apache or similar servers. These values are given only for testing purpose.

Deploying using Apache 2 on Ubuntu

Unzip the folder under /var/www/html

Change the following line in <project>/application/config/config.php

$config['base_url'] = 'http://localhost/<name of your application>'

remember the name of application should be same as folder name

Spring MVC

Prerequisite:

You should have following softwares installed on your machine.

  • Apache Tomcat
  • Java (Version 7 or higher)
  • MySQL
  • Apache Maven

Database Setup

The downloaded file includes a SQL file in location <project>/src/main/create.sql, run it on your local MySQL instance.

Change the following line in <project>/src/main/resources/database.properties

jdbc.username=root
jdbc.password=root

Note

Do not use root user in production, create a seperate user for the application who has access to only the application database. These values are given only for testing purpose.

Deploying on Apache Tomcat

Once you have downloade the source code, unzip it to a location of your choice.

Using a terminal/command line to navigate to the directory.

mvn clean install

This command should create a war file in <project>/target folder, copy this war file to tomcat webapps directory and restart tomcat.

Your application should be available at http://localhost:8080/<name of your application>

Running on Jetty

Once you have downloade the source code, unzip it to a location of your choice.

Using a terminal/command line to navigate to the directory.

mvn jetty:run

This command should start an instance of inbuilt jetty server using maven-jetty-plugin.

Your application should be available at http://localhost:8080/<name of your application>

Note

Do not use inbuilt jetty server in Production. These values are given only for development environment.