How to Install Akaunting on Ubuntu Server Latest?
Akaunting is an open-source accounting software built for small to medium-sized businesses. It is easy to use and can be installed on various platforms, including Ubuntu Server.
In this tutorial, we will show you how to install Akaunting on Ubuntu Server.
Requirements
Before starting the installation process, ensure that your Ubuntu Server meets these requirements:
- Ubuntu Server Latest
- Apache HTTP Server
- PHP 7.2 or higher
- MySQL 5.6 or higher
- Composer
- Git
Step 1: Install Required Dependencies
In this step, we will install Apache, PHP, and MySQL on our Ubuntu Server. Run the following command to install all required dependencies:
sudo apt-get update && sudo apt-get -y install apache2 php7.4 libapache2-mod-php7.4 php7.4-mysql mysql-server git composer unzip
Step 2: Clone the Akaunting Repository
We will now clone the Akaunting repository from GitHub by running the following command:
sudo git clone https://github.com/akaunting/akaunting /var/www/html/akaunting
Step 3: Install Akaunting Dependencies
Change to the Akaunting directory and run Composer update to install dependencies.
cd /var/www/html/akaunting
sudo composer update
Step 4: Create a MySQL Database and User for Akaunting
Create a MySQL database for Akaunting using the following command:
sudo mysql -u root -p
Enter your MySQL root password when prompted. Then run the following commands to create a new database and user:
CREATE DATABASE akaunting;
CREATE USER 'akauntinguser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON akaunting.* TO 'akauntinguser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
Make sure to replace the 'yourpassword' with your desired password.
Step 5: Configure Akaunting
Copy the .env.example file to .env and open the .env file in your editor.
cd /var/www/html/akaunting
sudo cp .env.example .env
sudo nano .env
Find the following lines in the file:
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
And replace them with the following:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=akaunting
DB_USERNAME=akauntinguser
DB_PASSWORD=yourpassword
Save the changes and exit the editor.
Step 6: Set Permissions
Adjust the ownership and permissions on the Akaunting files.
sudo chown -R www-data:www-data /var/www/html/akaunting
sudo chmod -R 775 /var/www/html/akaunting/storage
Step 7: Restart Apache Web Server
Restart the Apache web server to apply the changes you have made.
sudo systemctl restart apache2
Step 8: Access Akaunting Web Interface
Open your web browser and go to http://<your_server_ip>/akaunting/public. You will be redirected to the installer page, where you will need to configure your system settings and create an administrator account.
Congratulations! You have successfully installed Akaunting on Ubuntu Server. Enjoy using it for your accounting needs!