Invoice Ninja is a free and open source web based application for invoicing, time tracking and accepting payments. Invoice Ninja is based on PHP and built with the Laravel Framework. You can create Invoices online in just seconds using Invoice Ninja. Invoice Ninja can show you live invoices as PDF files and you can setup your own company logo and use custom invoice templates. Some of its features are listed below:
Create work tasks & track time
Create invoices online in seconds
Email invoices & get paid online
Mobile responsive design
Integrate 45+ payment gateways
View live invoice .PDF creation
Add your company logo to invoices
Quotations convert to invoices
Auto-billing & recurring invoices
Multiple tax settings
Client Portal to View Invoices
Alerts when invoices are paid
Set invoice payment due dates
You'll need a CentOS 7 server and root privileges over it to follow this guide. You can switch between non root user to root user using the sudo -i command. It is recommended to install Invoice Ninja on a freshly updated server so run below given command and it'll do the job for you.
yum -y update
You'll have to install nginx web server along with MariaDB and PHP with some required extensions. So first of all install nginx web server and for that you must have to install epel repository to your centos system.
yum -y install epel-release
Now we can install nginx with yum command from epel repository.
yum -y install nginx
Next start the nginx and enable it to start at boot time using following commands.
systemctl start nginxsystemctl enable nginx
We will need to install MariaDB for database purposes for Invoice Ninja. MariaDB 5.5 is shipped in the default CentOS 7 repository, so just run this command to install MariaDB.
yum -y install mariadb-server
Now you'll have to start the MariaDB service and enable it to start at the boot time like we have done before for nginx web server, to do so please run following command.
You can check status of mariaDB using this below given command and you should see following output.
systemctl status mariadb.service
[root@Sajid ~]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2017-02-08 14:47:40 UTC; 22s ago
Main PID: 18035 (mysqld_safe)
├─18035 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─18192 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/ma...Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: The latest information about MariaDB is available at http://mariadb.org/.
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: You can find additional information about the MySQL part at:
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: http://dev.mysql.com
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: Support MariaDB development by buying support/new features from MariaDB
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: Corporation Ab. You can contact us about this at email@example.com.
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: Alternatively consider joining our community based development effort:
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
Feb 08 14:47:39 ip-172-31-22-142 mysqld_safe: 170208 14:47:39 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Feb 08 14:47:39 ip-172-31-22-142 mysqld_safe: 170208 14:47:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Feb 08 14:47:40 ip-172-31-22-142 systemd: Started MariaDB database server.
We recommend you make sure that this installation is secure and to do so run following command:
You'll be asked to provide root password so enter appropriate password and answer yes to all questions by pressing Y.
Set root password? [Y/n] Y
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
Now you'll have to create a database for Invoice Ninja so please follow the instructions.
mysql -u root -p
You'll be asked to enter password so simply enter a password and now execute the following queries to create a new database.
CREATE DATABASE ninja_data;
The above query will create a database named ninja_data. For the database you can use any name you prefer in the place of ninja_data. Make sure that you use a semicolon at the end of each query as a query always ends with a semicolon. Once the database is created you can create a new user and grant the required permissions to the user for the database.
CREATE USER 'ninja_user'@'localhost' IDENTIFIED BY 'StrongPassword'; The above query will create a user with username ninja_user. You can use any preferred username instead of ninja_user. Replace StrongPassword with a strong password.
Now provide the appropriate privileges to your database user over the database you have created. Run the following query to do so.
GRANT ALL PRIVILEGES ON ninja_data.* TO 'ninja_user'@'localhost';
Now run the following query to immediately apply the changes on the database privileges.
Now you can exit from MariaDB prompt using following command.
Next you'll need to install PHP because Invoice Ninja is based on PHP so you'll have to install PHP. Here we are installing PHP 7, run following commands to install PHP and some required extension.
Once the PHP installation is finished next you'll need to edit your php.ini configuration file to meet Invoice Ninja requirements. Here we are using nano text editor, you can also install it if you want using this command.
yum -y install nanonano /etc/php.ini
Find the line "cgi.fix_pathinfo", uncomment it and change the value to 0 like this. cgi.fix_pathinfo=0
Save the file and exit from the text editor.
Next, you'll have edit PHP-FPM configuration file using any text editor. nano /etc/php-fpm.d/www.conf
Change the user and group on line 8 and 10 to the 'nginx' group.
user = nginx
group = nginx
Change the listen line to '/var/run/php/php-fpm.sock'.
listen = /var/run/php/php-fpm.sock
Find the following lines and uncomment them like this.
Next, start PHP7.0-FPM and enable it to start at boot time using follwing commands.
systemctl start php-fpmsystemctl enable php-fpm
Installing Invoice Ninja
We have successfully installed all the dependencies required by Invoice Ninja now we are ready to download and install Invoice Ninja but first install wget and unzip package on your system if you already don't have them installed.
yum -y install wget unzip
Next create a new directory for web root files of Invoice Ninja and then go to that directory and download the Invoice Ninja using wget package.
Finally open up your favorite web browser and visit your domain that you used before and finish the installation process via web GUI and provide the necessary details like database details, your name,email,password and other.
In this tutorial you've learned how to install and configure Invoice Ninja on your CentOS 7 server. You also learned how to create Invoice online within seconds. We hope now you have enough knowledge to work with Invoice Ninja.
You can create an email email filters through your cPanel control panel which is where you manage your hosting account. Email filters can be set up to target specific word, subject, from or to. Emails that are filtered out can be sent to a different email, deleted, delivered to a...
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...