MQ-Jr
MQ-Jr
unixcop Admin

How to Install InvoicePlane on Ubuntu 20.04

In this installation guide, we will show you how to install InvoicePlane on Ubuntu systems

InvoicePlane is a self-hosted open source application for managing your quotes, invoices, clients and payments.

It is specially designed for business owners to create and manage their invoices and client payments.

Install InvoicePlane

Just follow the steps below:

  • Install LAMP Server.
  • Install php modules.
apt install php-gd php-json php-mbstring php-mysqli php-xmlrpc php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php libapache2-mod-php php-mysql php-mysql wget unzip php-cli php-zip php-curl -y
  • Install apache web server and maria database as shown below:
- Advertisement -
apt install apache2
apt install mariadb-server-10.3
  • Start and enable apache and mariadb.
systemctl start apache2 mariadb
systemctl enable apache2 mariadb
systemctl status apache2 mariadb
  • Configure and secure MariaDB as follows:
mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

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

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
  • Log in to MariaDB shell:
mysql -u root -p
CREATE DATABASE invplane_db;
CREATE USER 'invplane'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON invplane_db.* TO 'invplane'@'localhost';
FLUSH PRIVILEGES;
EXIT
  • Download the latest version of InvoicePlane with the following command:
- Advertisement -
wget -c -O v1.5.11.zip https://invoiceplane.com/download/v1.5.11
  • Unzip the downloaded file.
mkdir /var/www/html/invoiceplane
unzip v1.5.11.zip -d /var/www/html/invoiceplane
  • Change the directory to the invoiceplane and copy required files to the Apache root directory 
cd /var/www/html/invoiceplane
sudo cp ipconfig.php.example ipconfig.php
sudo cp htaccess .htaccess
  • Set proper permissions to the invoiceplane directory:
sudo chown -R www-data:www-data /var/www/html/invoiceplane/
sudo chmod -R 755 /var/www/html/invoiceplane/
find  /var/www/html/invoiceplane/ -type f -exec chmod -v 0644 '{}' \;
  • Create an Apache virtual host file for InvoicePlane
vim /etc/apache2/sites-available/invoiceplane.conf
  • Then add the following
<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/invoiceplane
     ServerName example.com

     <Directory /var/www/html/invoiceplane/>
          Options +FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
  • Enable apache virtual host file and rewrite module
sudo a2ensite invoiceplane.conf
sudo a2enmod rewrite
  • Restart Apache service to apply all the changes
systemctl restart apache2
  • Access InvoicePlane by opening your web browser and type the URL http://example.com OR http://IP_Address/invoiceplane/index.php/welcome

You will be directed as follows:

  • Click on the Setup button then choose a Language then click Continue
  • Then click Continue
  • Provide your database details and click on the Try Again 
Install InvoicePlane
Install InvoicePlane
  • The database is successfully configured as shown below. Click Continue
  • Also click Continue.
  • Provide all the required details, then click on the Continue as shown below.
  • Installation complete, so click login
  • Enter your admin username and password then click on the Login
  • You will be redirected to the InvoicePlane dashboard as shown below.

Conclusion

That’s it

In this article we illustrated how to install and configure Invoiceplan in Ubuntu 20.04

Thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook