Install Simple Invoices on CentOS 7

simpleSimple Invoices is a web based open source invoicing system. It is very simple but functional application, supporting various billing formats. It is great for small organizations and home users. In this blog post we will guide you through the installation for Simple Invoices on a CentOS 7 VPS with Apache, PHP and MariaDB.

To start the Simple Invoices installation, login to your server as user root

ssh root@IP

and as usual, run the following command to make sure that all packages on your CentOS 7 virtual server are up to date:

yum -y update

Now, we will install Apache web server:

yum install httpd

Once it is installed, start Apache and set it to start on system start up:

systemctl start httpd
systemctl enable httpd

Install PHP among with few PHP modules required by the application:

yum -y install php php-pdo php-common php-mysql

Run the following commands to install MariaDB

yum install mariadb mariadb-server

Start the MariaDB server and enable it to start on system start up:

systemctl start mariadb
systemctl enable mariadb

Run the mysql_secure_installation script to secure the database server and set your MariaDB root password.

Simple Invoices requires a blank database. Log in to the MariaDB server as user ‘root’ and create new database and user for the application.

mysql -u root -p

CREATE DATABASE simpleinvoices;
GRANT ALL PRIVILEGES ON `simpleinvoices`.* TO 'siuser'@'localhost';

Don’t forget to replace ‘PASSWORD’ with an actual strong password.

Download the latest stable release of Simple Invoices from their official website:


Install the ‘unzip’ package necessary for unpacking the Simple Invoices zip archive and unpack the downloaded archive to the document root directory of your server:

yum -y install unzip
unzip -d /var/www/html/

Edit the Simple Invoices configuration file and enter the details of the database we created:

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer

Now just $43 .99

vim /var/www/html/simpleinvoices/config/config.ini                            = localhost
database.params.username                        = siuser
database.params.password                        = PASSWORD
database.params.dbname                          = simpleinvoices

Change the ownership of the ‘/var/www/html/simpleinvoices/’ directory:

chown -R apache:apache /var/www/html/simpleinvoices/

Create Apache virtual host for your website. Create ‘/etc/httpd/conf.d/vhosts.conf’ file with the following content:

vim /etc/httpd/conf.d/vhosts.conf

IncludeOptional vhosts.d/*.conf

and create the virtual host:

mkdir /etc/httpd/vhosts.d/
vim /etc/httpd/vhosts.d/

<VirtualHost YOUR_SERVER_IP:80>
DocumentRoot "/var/www/html/simpleinvoices/"
ErrorLog "/var/log/httpd/"
CustomLog "/var/log/httpd/" combined

<Directory "/var/www/html/simpleinvoices/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted

Restart the Apache web server for the changes to take effect:

systemctl restart httpd

Now, open your favorite web browser and point it to to run the web installer. You will have to choose your database type and enter the necessary information to complete the installation.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Simple Invoices for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment