InvoicePlane is open source and which was built to offer a free application for client management, invoicing and payment tracking. InvoicePlane is a solid app to manage your complete billing circle, from quotes to invoices to payments. The application provides CRM-like management for your clients. Enter contact details, notes or add custom fields. You can customize InvoicePlane to make sure it fits your needs: amount formats, email and PDF templates and many more. InvoicePlane is fully translated into 23 languages by community members and more languages are coming soon.
Prerequisites
You’ll need a freshly installed CentOS 7 server and a user with root privileges over it, you can switch to root user from non root user using sudo -i
command. This guide will help you to install InvoicePlane on your CentOS 7 server.
Update System
It is recommended to update your system and available packages before going through the installation process and to do so underneath command will do the job for you.
yum -y update
Installing Apache Web Server
Once the system is updated, you can install the dependencies required. To install InvoicePlane you will need to install the Apache web server along with MaraiDB and PHP with a few extensions.
Run the following command to install the Apache web server.
yum -y install httpd
Now you can start Apache and enable it to start at boot time, using the following commands.
systemctl start httpd.service systemctl enable httpd.service
You can check the status of Apache web server using the following command.systemctl status httpd
You should see following output:
[root@Sajid ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2017-02-20 05:47:15 UTC; 21s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 10561 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─10561 /usr/sbin/httpd -DFOREGROUND
├─10562 /usr/sbin/httpd -DFOREGROUND
├─10563 /usr/sbin/httpd -DFOREGROUND
├─10564 /usr/sbin/httpd -DFOREGROUND
├─10565 /usr/sbin/httpd -DFOREGROUND
└─10566 /usr/sbin/httpd -DFOREGROUND
Feb 20 05:47:15 ip-172-31-25-114 systemd[1]: Starting The Apache HTTP Server...
Feb 20 05:47:15 ip-172-31-25-114 systemd[1]: Started The Apache HTTP Server.
We will need to install MariaDB for database purposes for InvoicePlane. 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 apache server, to do so please run following command.
systemctl start mariadb.service systemctl enable mariadb.service
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 Mon 2017-02-20 05:48:45 UTC; 20s ago
Main PID: 10704 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─10704 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─10861 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr...
Feb 20 05:48:43 ip-172-31-25-114 mariadb-prepare-db-dir[10625]: The latest information about Ma....
Feb 20 05:48:43 ip-172-31-25-114 mariadb-prepare-db-dir[10625]: You can find additional informa...:
Feb 20 05:48:43 ip-172-31-25-114 mariadb-prepare-db-dir[10625]: http://dev.mysql.com
Feb 20 05:48:43 ip-172-31-25-114 mariadb-prepare-db-dir[10625]: Support MariaDB development by ...B
Feb 20 05:48:43 ip-172-31-25-114 mariadb-prepare-db-dir[10625]: Corporation Ab. You can contact....
Feb 20 05:48:43 ip-172-31-25-114 mariadb-prepare-db-dir[10625]: Alternatively consider joining ...:
Feb 20 05:48:43 ip-172-31-25-114 mariadb-prepare-db-dir[10625]: http://mariadb.com/kb/en/contri.../
Feb 20 05:48:43 ip-172-31-25-114 mysqld_safe[10704]: 170220 05:48:43 mysqld_safe Logging to '/...'.
Feb 20 05:48:43 ip-172-31-25-114 mysqld_safe[10704]: 170220 05:48:43 mysqld_safe Starting mysq...ql
Feb 20 05:48:45 ip-172-31-25-114 systemd[1]: Started MariaDB database server.
Hint: Some lines were ellipsized, use -l to show in full.
We recommend you to make sure that this installation is secure and to do so run following command.
mysql_secure_installation
You’ll be asked to provide root password so enter appropriate password and answer yes to all questions by pressing Y.
Enter current password for root (enter for none): Just press the Enter button
Set root password? [Y/n]: Y
New password: your-root-password
Re-enter new password: your-root-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 InvoicePlane 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 InvoicePlane;
The above query will create a database named InvoicePlane. For the database you can use any name you prefer in the place of InvoicePlane. Make sure that you use 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 'IP_user'@'localhost' IDENTIFIED BY 'StrongPassword';
The above query will create a user with username IP_user. You can use any preferred username instead of IP_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 InvoicePlane.* TO 'IP_user'@'localhost';
Now run the following query to immediately apply the changes on the database privileges.
FLUSH PRIVILEGES;
Now you can exit from MariaDB prompt using following command.
exit
.
We will have to install PHP 7. To do so run following commands as shown below.
yum -y install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Now use this command to install PHP 7 and required extensions.
yum install mod_php71w php71w-gd php71w-common php71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-recode php71w-xmlrpc -y
Next you’ll have to set up preferred timezone for your machine and to do so we will have edit php.ini file using any text editor. Here we are using nano text editor you can also install it usingyum -y install nano
nano /etc/php.ini
Now find the line ;date.timezone =
and change it to date.timezone = Asia/Kolkata
(You’ll have to use your timezone) then save the file and exit from text editor.
Next you’ll have to restart your apache web server to load new components that we just configured and use following command to restart apache web server.
systemctl restart httpd.service
Installing InvoicePlane
Once we have installed all the required dependencies now we are ready to download and install InvoicePlane so so first of all download the latest the stable release available and unzip it. Simply run underneath command it will do the job for you.
wget https://invoiceplane.com/download/v1.4.10 -O v1.4.10.zip
unzip v1.4.10.zip -d /var/www/html
Use nano text editor to open /var/www/html/index.php as shown below:
nano /var/www/html/index.php
Find the line define('IP_URL', '');
and replace it with yourserverIP or your domain name as shown.
define('IP_URL', 'http://203.0.113.1/');
Or
define('IP_URL', 'http://example.com/');
Save the file and exit from the text editor.
Use below given command to open configuration file.nano /var/www/html/application/config/config.php
Find the line $config['index_page'] = 'index.php';
and replace it with $config['index_page'] = '';
, then save the file and exit from text editor.
Next rename the /var/www/html/htaccess file to /var/www/html/.htaccess and to do so use following command.
mv /var/www/html/htaccess /var/www/html/.htaccess
Finnaly open apache configuration file using nano text editor as shown below:
nano /etc/httpd/conf/httpd.conf
Find the line AllowOverride None
and replace it with AllowOverride All
then save the file and exit from the text editor.
Finally restart your apache web server to apply changes that we have just configured use following command to do so:
systemctl restart httpd.service
Next you’ll have to setup proper ownership permission to access InvoicePlane and you can do so using this command.
chown -R apache:apache /var/www/html
mkdir /var/www/html/uploads/customer_files
chown apache:apache /var/www/html/uploads/customer_files
Finally you’ll have to modify firewall rules so if in case you don’t have firewalld services installed on your server then you can install it using yum -y install firewalld
and you can start it using systemctl start firewalld
Next run these below given commands to modify the firewalld rules.
firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --reload
Web Access
Open your favorite web browser and please visit http://yourserverIP and you’ll see a InvoicePlane installation wizard complete this wizard to finish installation process.
HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/305211338.png” alt=” ” />
Click on Setup button to setup this installation settings.
HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/531871524.png” alt=” ” />
Select your preferred language and click on continue button and you’ll see a Prerequisites page like this make sure all are green labled.
HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/1952209921.png” alt=” ” />
Click on continue button to continue to the installation wizard and enter your database details then click on Try Again button.
HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/1732577934.png” alt=” ” />
Click on Continue button to install tables and update tables.
Next create a user account by entering necessary information aboout user and then click on continue button and you can login to InvoicePlane login page using username and password.