Installing Akaunting on Debian 9

Using a Different System?

  • Installing Akaunting on Ubuntu 16.04

  • Installing Akaunting on CentOS 7

  • Installing Akaunting on Fedora 28

  • Installing Akaunting on FreeBSD 12

Are we missing a guide for your target system? Request one, or submit your own!


Akaunting is a free, open source and online accounting software designed for small businesses and freelancers. It is built with modern technologies such as Laravel, Bootstrap, jQuery and RESTful API. Akaunting’s source is on GitHub. This guide will show you how to install Akaunting on a fresh Debian 9 Vultr instance.

Requirements

  • MariaDB
  • Nginx
  • PHP 5.6.4 or higher with the following PHP extensions:
    • PDO
    • OpenSSL
    • Mbstring
    • Tokenizer
    • XML
    • Zip
    • cURL

Check the Debian version.

lsb_release -ds# Debian GNU/Linux 9.4 (stretch)

Ensure that your system is up to date.

apt update && apt upgrade -y

Install required packages.

apt install -y sudo unzip

Create a new non-root user account with sudo access and switch to it.

adduser johndoe --gecos "John Doe"usermod -aG sudo johndoesu - johndoe

NOTE: Replace johndoe with your username.

Set up the timezone.

sudo dpkg-reconfigure tzdata

Install PHP and required PHP extensions

Install PHP and necessary PHP extensions.

sudo apt install -y php7.0 php7.0-cli php7.0-fpm php7.0-mbstring php7.0-mysql php7.0-common php7.0-zip php7.0-curl php7.0-xml

Check the version.

php -v

Install MariaDB

Install MariaDB.

sudo apt install -y mariadb-server

Check the version.

mysql --version

Run the mysql_secure installation script to improve MariaDB’s security.

sudo mysql_secure_installation

Connect to the MariaDB shell as the root user.

sudo mysql -u root -p# Enter password:

Create an empty MariaDB database and user for Akaunting, and remember the credentials.

CREATE DATABASE dbname;GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';FLUSH PRIVILEGES;EXIT;

Install Nginx

Install Nginx.

sudo apt install -y nginx

Check the version.

sudo nginx -v

Configure Nginx for Akaunting. Run sudo vim /etc/nginx/sites-available/akaunting.conf and add the following configuration.

server {  listen 80;  listen [::]:80;  server_name example.com;  root /var/www/akaunting;  index index.php index.html;  location / {    try_files $uri $uri/ /index.php?$query_string;  }  location ~ /.php$ {    fastcgi_index index.php;    try_files $uri =404;    include fastcgi_params;    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;    fastcgi_pass unix:/run/php/php7.0-fpm.sock;  }}

Activate the new akaunting.conf configuration by linking the file to the sites-enabled directory.

sudo ln -s /etc/nginx/sites-available/akaunting.conf /etc/nginx/sites-enabled/

Test the configuration.

sudo nginx -t

Reload Nginx.

sudo systemctl reload nginx.service

Install Akaunting

Create a document root directory.

sudo mkdir -p /var/www/akaunting

Change ownership of the /var/www/akaunting directory to johndoe.

sudo chown -R johndoe:johndoe /var/www/akaunting

Download the latest Akaunting software and unzip it.

cd /var/www/akauntingcurl -O -J -L https://akaunting.com/download.php?version=latestunzip Akaunting_1.2.9-Stable.ziprm Akaunting_1.2.9-Stable.zip

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

sudo chown -R www-data:www-data /var/www/akaunting

Launch the installer by opening your domain name/IP address in your web browser and fill in the required information. After that, Akaunting software will be installed on your server.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article

No comments

Powered by Blogger.