How to Install Akaunting on CentOS and Ubuntu

By Arslan Ud Din Shafiq, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud’s incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.

Akaunting is an open source software related to online accounting for businesses. It is free to use, and you can access it from any device. You can run your business, check your finance reports, and even get information about your cash flow at any time through its various tools. Akaunting is developed in Laravel (PHP framework), Bootstrap (CSS framework), jQuery and some RESTful APIs. It is available on GitHub and is available in 28 languages.

In this tutorial, we will be installing Akaunting on an Alibaba Cloud Elastic Compute Service (ECS) with Linux. I will be showing the steps for both Ubuntu 16.04 and CentOS 7 as they are quite similar.

Prerequisites

  1. You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. If you are a new user, you can get a free account in your Alibaba Cloud account. If you don’t know about how to setup your ECS instance, you can refer to this tutorial or quick-start guide. Your ECS instance must have at least 1GB RAM and 1 Core processor.
  2. A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  3. Domain name must be pointed to your Alibaba Cloud ECS’s IP address
  4. Access to VNC console in your Alibaba Cloud or SSH client installed in your PC
  5. Set up your server’s hostname and create user with root privileges.

Before proceeding with installation of any kind of package, use the following command to update your system. To execute this command, remember to login from non-root user with sudo privileges.

For Ubuntu

For CentOS

Basic Setup

Install unzip

You will be required to unzip the compressed zip folder of Akaunting, for this purpose, you will have to install unzip.

For Ubuntu

For CentOS

Install build-essential

Some essentials are required for installing and setting up Akaunting. Follow the steps below for build-essential.

For Ubuntu

Install EPEL repository

To install EPEL repository, execute the following command.

For CentOS

Install Webstatic Yum Repository

To install webstatic YUM repository, execute the following command.

For CentOS

Install PHP

PHP is a server-side scripting language. To install PHP, execute the following command.

For Ubuntu

For CentOS

Install PHP Extensions

For installation of Akaunting, some PHP extensions are required. The required extensions include php-cli, php-fpm, php-mbstring, php-mysql, php-common, php-zip, php-curl and php-xml. To install these extensions, execute the following command.

For Ubuntu

For CentOS

Check the Installation of PHP

To check PHP version and installation of PHP, execute the command below.

Install MySQL Server

Akaunting requires MySQL database. To install MySQL, execute the command below.

For Ubuntu

Set a password for your MySQL server and secure the installation with the following command.

For Ubuntu

Now start and enable MariaDB server, so that on reboot, MariaDB can restart automatically.

Set password for your MySQL server and secure the installation with the following command.

Configure Database

In this section, you will have to create a database, add a user, setup its credentials and assign database to user. To do so, login to MySQL shell.

Now execute the following query to create database, username and assign database.

Install Nginx Server

You will be required to install an Nginx server. For this purpose, you will need to follow the steps below.

For Ubuntu

To install, execute the command

After successful installation, you will see the screen below.

For CentOS

To install execute the command

After successful installation, you will see the screen below.

For Ubuntu and CentOS

Now you will need to start Nginx server by executing command below.

To check status of Nginx server, execute the command below.

To check the installation, access IP address of your Alibaba Cloud ECS or your domain name that you have pointed to your IP address. In my case, I have accessed via domain name and the following screen loaded.

To check current version of nginx, execute the command below.

Configure Nginx Server

Create configuration file in available sites for Akaunting. To do so, execute the command below.

For Ubuntu

Now add the following text to the opened file.

Now activate the newly configured akaunting.conf file by adding file to sites-enabled directory.

For CentOS

In case of CentOS, please run the command below.

Now add the following text to opened file.

For CentOS and Ubuntu

To test Nginx configuration, execute the following command.

Now reload nginx server by executing the command below.

Install Akaunting

Create a folder for placing files of Akaunting and then assign necessary permissions.

Create root folder for Akaunting in /var/www directory.

Now change the ownership of /var/www/akaunting directory to aareez. In my case, username is aareez. You can replace it with your username.

Navigate to /var/www/akaunting directory by executing command below.

The following command will fetch the copy of Akaunting.

Execute the command below to extract files from compressed zip folder.

Now remove the downloaded zip folder by executing command below.

Now add the ownership of /var/www/akaunting directory to www-data.

For Ubuntu

For CentOS

Open the file by executing command below, to configure and find the user and group name in opened file. The current user and group are apache. Change apache to nginx and save the file.

Now restart php-fpm by the command below.

Reload the Nginx server by executing the command below.

Now you can access Akaunting installer via your Alibaba Cloud ECS IP address. If you have pointed a domain to your IP address, you can also use it. In my case, I have pointed domain to my ECS IP address: http://softpedia.xyz/ . After accessing, the following screen appears.

Hit the Next button, the following screen will appear. You will be asked to add details for your database. I have added details according the above procedure. Now hit Next.

Add the required details as shown below. Setup admin details, this will be used later to log in to the admin panel.

Hit Next and you will be redirected to login page as shown below.

After login, you will be redirected to the Akaunting dashboard.

Akaunting is now ready to use.

Reference:https://www.alibabacloud.com/blog/how-to-install-akaunting-on-centos-and-ubuntu_594068?spm=a2c41.12144653.0.0

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store