How to Install Akaunting on CentOS 7
Akaunting is a open source online accounting software. It is specially designed for small businesses and startups. It has enabled with full features like invoicing, expense tracking, online payments, multi companies, multi currencies, etc. It supports multiple platforms like Windows, Linux, MacOS, iOS and Android, so that you can access the financials online anytime, anywhere on your Mac, PC, tablet or mobile phone.
Akaunting is built with modern technologies such as Laravel, Bootstrap, jQuery, Swift Mailer, API etc.
Requirement
- HTTP server running Apache
- PHP version >= 7.2.5 (7.4 is recommended)
- PHP Extensions - pdo, openssl, mysqli, tokenizer, mbstring, xml, curl, bcmath, zip, ctype, json
- MariaDB database equivalent >= 10 (10.4 is recommended)
Update System
sudo yum update
Install Basic Packages
sudo yum install vim wget git
Change SELinux mode to Permissive
Edit the /etc/selinux/config file as follows and reboot the system
sudo vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Install PHP
For installing PHP 7, EPEL and Remi repository need to install and enable on CentOS 7 system with the below commands.
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Install yum-utils, it is a collection of tools and programs for managing yum repositories, installing debug packages, source packages, extended information from repositories and administration. Use the yum-config-manager program to enable Remi repository as the default repository for installing PHP 7.4 version.
sudo yum install yum-utils
sudo yum-config-manager --enable remi-php74
Install PHP and the required extensions.
sudo yum install php php-cli php-common php-mbstring php-xml php-mysql php-zip php-curl php-bcmath php-pdo php-json php-openssl
Configure the timezone in php.ini file. Uncomment date.timezone = and enter the respective timezone.
sudo vim /etc/php.ini
date.timezone = Asia/Kolkata
Install Apache
sudo yum install httpd
Start and enable the Apache services at boot time.
sudo systemctl start httpd
sudo systemctl enable httpd
Enable .htaccess file in Apache
.htaccess file allows to set up URL rewrite and redirection rules without changing Apache configuration file. To enable .htaccess file in Apache, look for the section and change the "AllowOverride" directive from "None" to "All".
sudo vim /etc/httpd/conf/httpd.conf
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Install MariaDB Database
By default CentOS 7 base repository provides MariaDB 5.5 version, which will work for osTicket application. But in this tutorial, we will install the latest version of MariaDB 10.4
Create repo for MariaDB 10.4
sudo vim /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Install MariaDB and its dependencies
sudo yum install MariaDB-server
Start and enable the MariaDB Server services at boot time.
sudo systemctl start mariadb
sudo systemctl enable mariadb
Configure MariaDB
sudo mysql_secure_installation
Create Database and user account for Nextcloud
sudo mysql -u root -p
create database akauntingdb;
create user 'akauntinguser'@'localhost' identified BY 'Linuxyogi@123';
grant all privileges on akauntingdb.* to akauntinguser@localhost;
flush privileges;
Install Akaunting
Download the latest stable release of Akaunting to document root directory.
cd /var/www/html/
git clone https://github.com/akaunting/akaunting.git
Configuration
Change the ownership and permission on support directory.
chown apache:apache -R /var/www/html/akaunting/
Dependencies
Install the composer package and install akaunting dependencies.
cd /var/www/html/akaunting/
sudo yum install composer
composer install
Change the ownership and permission on support directory.
chown apache:apache -R /var/www/html/akaunting/
Allow http or https (in case of SSL use) services from Firewall for Akaunting web installer and Dashboard access.
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload
Open browser and navigate to "http://<server-ip>/akaunting". Select Language and Click Next.
example - http://10.0.0.15/akaunting

Create admin user and fill the database information like Database Name, Database Username, Database Password and Database Server Address.

Provide Company Name, Company Email Address and admin email address as username and password.

Enter the admin email address and password to login.

Dashboard is ready to access.
