Manual install Akaunting on Centos 7/ Virtualmin


#1

Follow below guide hope will help you complete the installation with out any error on Centos 7/multi php version/ mariadb10.2 on Virtualmin.

  1. Repair your server

add virtual domain name
add mysql database and mysql user ( in this case. I used mariadb 10.2)
Change default php version for this virtual server to php70

  1. Install Akaunting dependent vendor via CLI
  • install composer if you do not have

yum install composer

  • cd /home/akaunting/public_html

git clone https://github.com/akaunting/akaunting.git
cd akaunting
git checkout -b 1.3.1

  • To prevent error on multi php version environment we need to make some small edit on composer.json

vi composer.json

  • Change default php on file composer.json to php70 to help prevent error happen with artisan ide-helper:generate as below message
 Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan ide-helper:generate
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/akaunting/public_html/akaunting/artisan on line 31
Script php artisan ide-helper:generate handling the post-update-cmd event returned with error code 255
  • The composer.json changed look like:
{
    "name": "akaunting/akaunting",
    "description": "Free accounting software, based on Laravel framework.",
    "homepage": "https://akaunting.com",
    "keywords": ["laravel", "accounting", "software", "online"],
    "license": "GPL-3.0+",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "akaunting/language": "1.0.*",
        "akaunting/money": "1.0.*",
        "akaunting/setting": "1.0.*",
        "akaunting/signed-url": "1.0.*",
        "akaunting/version": "1.0.*",
        "almasaeed2010/adminlte": "2.3.*",
        "barryvdh/laravel-debugbar": "2.3.*",
        "barryvdh/laravel-dompdf": "0.*",
        "barryvdh/laravel-ide-helper": "2.3.*",
        "bkwld/cloner": "3.2.*",
        "consoletvs/charts": "4.6.*",
        "dingo/api": "1.0.0-beta8",
        "doctrine/dbal": "2.5.*",
        "fideloper/proxy": "3.3.*",
        "guzzlehttp/guzzle": "6.3.*",
        "intervention/image": "2.3.*",
        "jenssegers/date": "3.3.*",
        "kyslik/column-sortable": "5.4.*",
        "laracasts/flash": "3.0.*",
        "laravel/framework": "5.4.*",
        "laravel/tinker": "~1.0",
        "LaravelCollective/html": "5.4.*",
        "maatwebsite/excel": "2.1.*",
        "nwidart/laravel-menus": "0.5.*",
        "nwidart/laravel-modules": "1.*",
        "plank/laravel-mediable": "2.5.*",
        "santigarcor/laratrust": "4.0.*",
        "simshaun/recurr": "3.0.*",
        "sofa/eloquence": "5.4.*",
        "tucker-eric/eloquentfilter": "1.1.*"
    },
    "require-dev": {
        "fzaninotto/faker": "1.8.*",
        "phpunit/phpunit": "5.7.*"
    },
    "autoload": {
        "classmap": [
            "database",
            "app/Overrides"
        ],
        "psr-4": {
            "App\\": "app/",
            "Modules\\": "modules/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php70 artisan ide-helper:generate",
            "php70 artisan ide-helper:meta",
            "php70 artisan clear-compiled",
            "php70 artisan optimize",
            "composer dump-autoload"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php70 artisan ide-helper:generate",
            "php70 artisan ide-helper:meta",
            "php70 artisan clear-compiled",
            "php70 artisan optimize",
            "composer dump-autoload"
        ],
        "post-create-project-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php70 artisan ide-helper:generate",
            "php70 artisan ide-helper:meta",
            "php70 artisan clear-compiled",
            "php70 artisan optimize",
            "composer dump-autoload"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

php70 artisan config:cache

  • and

php70 artisan cache:clear

  • install akaunting dependent via composer by run:

php70 composer install --ignore-platform-reqs

  • This command will install vendor requirement and if anything ok, you will not get any “red” error show up on CLI,

3.Install Akaunting database and config information:

  1. Run again the command via CLI to make sure anything run ok for later update

php70 composer update --ignore-platform-reqs

  1. That’s it

#2

Some small customized (Not recommended)

  • Change default logo, default logo of Akauting locate at /home/akaunting/public_html/public/img/
    Change to custom logo by replace your logo to:
akaunting-logo-green.png
akaunting-logo-white.png

upload and replace default file on img folder as mention above

  • Hide: footer login information via CSS
    Locate:

cd /home/akaunting/public_html/public/css/

and run

vi app.css

Find near line 427 of app.css
at add:

.login-box-footer {    
 display: none;
}
  • Hide main footer information: locate:

vi /home/akaunting/public_html//vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css

and

vi /home/akaunting/public_html//vendor/almasaeed2010/adminlte/dist/css/AdminLTE.css

Find near line 104 of AdminLTE.css and AdminLTE.min.css
at add:

.login-box-footer {    
 display:none;
}

#3

To fix the error:

vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.vn.js net::ERR_ABORTED 404 (Not Found)

For exactly language check that you have correct file name of this file, in this case:
the file name on this folder was: bootstrap-datepicker.vi.js
but akaunting need load the file name under name: bootstrap-datepicker.vn.js
So that just need to change vi to vn will fix this issue