InvoiceNinja is an available supply invoicing, costs and time monitoring.

Several top features of InvoiceNinja:

  • Create work tasks and monitor time.
  • Mobile responsive design.
  • Integrate with 45+ repayment gateway.
  • 10 invoice design that is template
  • Add logo design to invoice.
  • View real time invoice PDF creation.
  • Multiple income tax setings,
  • Multiple money help.
  • Import costs and setup vendors.

You can find out more about InvoiceNinja at InvoiceNinja site.

Objective

In this guide we are going to discover install that is how-to Ninja on Ubuntu 14.04. We shall additionally install and configure its prerequisites

Prerequisites

We will install Invoice Ninja in fresh installing Ubuntu Server 14.04. We likewise require these applications to run Invoice Ninja:

  • Apache 2
  • MySQL 5
  • PHP >= 5.5.9
  • Invoice Ninja require also the php that is following
    • php5-gd
    • php5-curl
    • php5-mcrypt

Update Base System

Before we install Invoice Ninja, let us upgrade the machine towards the latest up-date.

$ Sudo update that is apt-get
$ sudo apt-get upgrade that is-y

Install Apache 2

After using latest up-date to the base system, Lets’s begin putting in Apache 2 and needed libraries.

$ sudo apt-get -y install apache2 apache2-bin apache2-data apache2-mpm-prefork libaio1 libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libterm-readkey-perl libwrap0 tcpd that is ssl-cert

We can check always Apache 2 solution status command that is using:

sudo solution apache2 status
 * apache2 is operating

We may also check always which slot Apache 2 is paying attention on utilizing the demand below.

 sudo netstat 
tcp6       0      0 :::80                   :::*                    LISTEN      14873/apache2

Install MySQL 5.6

We will install and make use of MySQL 5.6 as database for Invoice Ninja.

We uses MySQL Server 5.6 since MySQL 5.6 is considered the most current form of MySQL shipped with Ubuntu 14.04 Trusty Tahr.

$ sudo apt-get install that is-y

We have to setup MySQL root password. Please input password for MySQL root individual.

Verify root password.

Securing MySQL Installation.

We will secure MySQL installation by operating mysql_secure_installation.

Enter root password that people set on installation

$ mysql_secure_installation 
NOTE: RUNNING each ELEMENTS OF THIS SCRIPT IS ADVISED FOR SEVERAL MySQL
      SERVERS IN MANUFACTURING utilize!  PLEASE BROWSE EACH STEP OF THE PROCESS PROPERLY!

In purchase to log into MySQL to secure it, we are going to require the existing password the root individual. If you have simply set up MySQL, and You haven't set the root password yet, the password shall be blank, which means you should simply press enter right here.

Enter present password for root (enter for none): okay, effectively utilized password, moving forward...

Since we curently have root password set, response this spend the n

Setting the basis password helps to ensure that no one can log in to the MySQL
root individual with no authorisation that is proper

You curently have a root password set, to help you properly respond to 'n'.

Change the basis password? [Y/n] letter ... skipping.

Remove anonymous individual to enhance protection. This may make people that are sure application have actually proper password to login to MySQL. Solution with Y

By standard, a MySQL installation has an anonymous individual, enabling anybody
to log into MySQL and never having to have a person account designed for
them.  This is certainly meant limited to evaluating, and also to result in the installation
get somewhat smoother.  They should be removed by you before stepping into a
manufacturing environment.

Remove anonymous users? [Y/n] Y ... Triumph!

We would also like eliminate root login from remote device. Solution with Y

Normally, root should simply be permitted to link from 'localhost'.  This
helps to ensure that some body cannot imagine on root password from community.

Disallow root login from another location? [Y/n] Y ... Triumph!

Previously the test database was made immediately by MySQL installation, but MySQL 5.6 cannot produce test database. We are able to nevertheless select Y, it’ll toss mistake but that is fine.

By standard, MySQL includes a database called 'test' that everyone can
access.  This is certainly additionally meant limited to evaluating, and may be eliminated
before stepping into a manufacturing environment.

Remove Test access and database to it? [Y/n] Y - Dropping test database... MISTAKE 1008 (HY000) at line 1: cannot fall database 'test'; database does not occur ... Failed! Maybe not critical, excersice... - Removing privileges on test database... ... Triumph!

The final action should reload MySQL privilege dining table.

Reloading the privilege tables will make sure that all modifications made up to now
will require impact instantly.

Reload privilege tables now? [Y/n] Y ... Success!

All done! If you have finished all the steps that are above your MySQL installation should now be safe.

Thanks for making use of MySQL!

Cleaning up...

Create a Database for invoiceninja

Now we now have a protected MySQL installation, time for you produce database and individual for invoiceninja it self.

Login to MySQL making use of root credential.

$ Mysql root -p that is-u
Enter password: 
Welcome towards the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 58
Server variation: 5.6.30-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All liberties reserved.

Oracle is a trademark that is registered of Corporation and/or its affiliates. Other names might be trademarks of these particular owners.

Type 'help;' or 'h' for assistance. Type 'c' to clear the existing input declaration.

mysql>

Create brand new database called invoiceninja making use of demand below

mysql> CREATE DATABASE invoiceninja DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Query okay, 1 line impacted (0.00 sec)

Create individual for invoiceninja

Database for invoiceninja is prepared, let us produce password and give privileges to invoiceninja database.

Don’t forget to improve the password invoiceninja123secret below with better password.

mysql> GIVE each PRIVILEGES ON `invoiceninja`.* TO 'invoiceninja'@'localhost' IDENTIFIED with 'invoiceninja123secret';
Query okay, 0 rows impacted (0.00 sec)

We have to run FLUSH PRIVILEGES demand so the privileges dining table may be reloaded by MySQL so we may use brand new credential.

mysql> FLUSH PRIVILEGES;
Query okay, 0 rows impacted (0.00 sec)

Exit from MySQL system by typing q

mysql> q

Install PHP 5

Last component before we can install invoiceninja is PHP 5. We will install PHP 5 and several common PHP libraries.

$ that we have to install sudo apt-get -y install php5-cli php5-common php5-json php5-readline that is php5-mysql

Install extra php libraries:

$ sudo apt-get -y install php5-gd php5-curl that is php5-mcrypt

We have to manually allow mcrypt module

$ sudo mcrypt that is php5enmod

Restart the Apache 2 procedure so that the modifications may be used:

$ sudo solution apache2 restart

Install invoiceninja

All prerequisites is set up. We are prepared to install invoiceninja. The newest stable form of invoiceninja can be acquired Invoice Ninja webpage.

At the full time of the writing, the most recent version that is stable version 3.2.0, let us down load invoiceninja compressed file making use of wget.

$ wget -c https://download.invoiceninja.com/ninja-v3.2.0.zip

Extract the file that is downloaded unzip. If your system don’t have unzip yet, you can install unzip using command below:

$ sudo apt-get install unzip that is-y

Extract invoiceninja making use of unzip

$ ninja-v3.2.0.zip that is unzip

Move ninja directory to Apache directory as invoiceninja

$ sudo mv ninja /var/www/invoiceninja

Change ownership of invoiceninja directory to www-data individual and team.

$ sudo chown www-data that are-R /var/www/invoiceninja

The invoiceninja files are set, now let us produce Apache Virtual Host setup to provide invoiceninja.

Configure Apache Virtual Host for http just

Create brand new apache setup file on /etc/apache2/sites-available/invoiceninja.conf with articles below.

<VirtualHost *:80>
    ServerName invoiceninja.exampleserver.xyz

DocumentRoot /var/www/invoiceninja/public

<Directory /var/www/invoiceninja/public> Choices -Indexes +FollowSymLinks +MultiViews AllowOverride All Need all awarded </Directory>

ErrorLog ${APACHE_LOG_DIR}/invoiceninja.exampleserver.xyz-error.log CustomLog ${APACHE_LOG_DIR}/invoiceninja.exampleserver.xyz-access.log combined

</VirtualHost>

Don’t forget to improve invoiceninja.exampleserver.xyz above because of the domain title that you apply for the invoiceninja installation.

Enable the website making use of a2ensite demand.

$ Sudo invoiceninja that is a2ensite

Reload apache2 procedure therefore it see the brand new virtualhost setup:

$ sudo solution apache2 reload

InvoiceNinja Setup Wizard

Open InvoiceNinja Address and we’ll be rerouted to InvoiceNinja one web page setup.

The very first area is InvoiceNinja Address settings, we are able to enter our InvoiceNinja Address right here.

The next environment is configuration that is database we can enter database name and credential we already created on previous step. We can click Test connection to see if the database credential you can use your own mail server for this but I would recommend using third party email server that is more reliable like Mailgun that we enter is correct

Next is email settings. I’ll skip e-mail settings with this guide.

Enter individual details for InvoiceNinja. Tick we accept the Invoice Ninja regards to provider and then click Submit

After successfuly Invoice that is installing Ninja installer will redirect to Invoice Ninja Login page. We can login using credential that we setup on setup wizard.

After successfully login we will get InvoiceNinja Dashboard.

Configure https only site for invoiceninja

A secure connection is now a requirement for web application. Last step that we will do in this tutorial is changing the connection to only use https.

We assume that you already have SSL certificate and key that is private

Let’s generate brand new apache digital host setup on /etc/apache2/sites-available/invoiceninja-ssl.conf with articles below. Don’t neglect to alter:

  • ServerName
  • SSLCertificateFile
  • SSLCertificateChainFile
  • SSLCertificateKeyFile
<VirtualHost *:80>
   ServerName invoiceninja.exampleserver.xyz
   Redirect permanent / https://invoiceninja.exampleserver.xyz/
</VirtualHost>

<VirtualHost *:443>

ServerName invoiceninja.exampleserver.xyz

DocumentRoot /var/www/invoiceninja/public

<Directory /var/www/invoiceninja/public> Choices -Indexes +FollowSymLinks +MultiViews AllowOverride All Need all awarded </Directory>

ErrorLog ${APACHE_LOG_DIR}/invoiceninja.exampleserver.xyz-error.log CustomLog ${APACHE_LOG_DIR}/invoiceninja.exampleserver.xyz-access.log combined

SSLEngine on SSLCertificateFile /etc/apache2/ssl/invoiceninja.exampleserver.xyz.crt SSLCertificateChainFile /etc/apache2/ssl/invoiceninja.exampleserver.xyz.crt SSLCertificateKeyFile /etc/apache2/ssl/invoiceninja.exampleserver.xyz.key

Header constantly set Strict-Transport-Security "max-age=15768000"

</VirtualHost>

# intermediate setup, tweak towards requirements SSLProtocol all -SSLv2 -SSLv3 SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS SSLHonorCipherOrder on

We will even disable invoiceninja http just digital host and allow this new digital host config.

$ Sudo invoiceninja that is a2dissite
$ sudo a2ensite invoiceninja-ssl

The brand new host that is virtual need Apache mod_ssl and mod_headers modules. We need to enable those modules.

$ Sudo ssl that is a2enmod
$ sudo a2enmod headers

Now, restart Apache 2 solution therefore it will reload its setup. We must restart in the place of reload since we make it possible for brand new module.

$ sudo solution apache2 restart

Summary

In this guide we discovered how-to InvoiceNinja that is install on 14.04.

We set up all of the prerequisites, produced a person and database on MySQL for Invoice Ninja as well as configure Apache 2 digital hosts to provide InvoiceNinja.

We additionally configure https settings for InvoiceNinja so we operate Invoice Ninja firmly.

LEAVE A REPLY

Please enter your comment!
Please enter your name here