Install Invoice Ninja v5 on Enterprise Linux 8

I followed this very information guide to setup IN. And it seems to be mostly established. However, it seems as though the database tables are refusing the establish. I tried a previous walkthrough for an older version before finding this guide and it had me preform a
php artisan db:seed command.
Is there something similar missing from this guide?
I’m using a separately hosted DB.

The setup page defaults to the db-ninja-01 but if I enter my information I receive a “Success” message when testing the connection.

Error when enabling debug
# SQLSTATE[42S02]: Base table or view not found: 1146 Table 'invoices.accounts' doesn't exist (SQL: select * from accounts limit 1)

Hi @TechnicallyComputers , there is any chance for a guide like this for install V5 on FreeBSD12 ?

Probably not, I don’t use it, and have no career prospects that would make use of it. Add to that I have too many things on my plate already. Sorry

I’ve never done that either, but maybe this is a starting point: https://github.com/invoiceninja/invoiceninja/wiki/FreeNAS-11.2-(FreeBSD)

This could be used as a direction/path, however following exact steps won’t work, because minimum PHP is 7.3

i followed this up, and its not working for me… frustrating. anyways thanks for the effort, still trying to get this V5 installed correctly.

Hey there, this is a post by our valuable community member. It’d be best for Alex to reply with help.

However, in order for him/us to help you anyway, you’ll have to provide more info/context on your problem, otherwise, we’re tilting at windmills.

It’s not easy to support and maintain on enterprise Linux. The package is designed for Ubuntu, and running on Enterprise Linux variants requires building IN from source code every time you update the app.

Php-fpm also requires manual configuration on this platform, but for Ubuntu it is ready to go because NGINX and Apache use the same user name on Ubuntu.

There might be some step you missed, or a bug to discover, but the instruction set works on RHEL, and CentOS and even Fedora with some modification.

If you follow the guide for Ubuntu, there is much less manual configuration required and the app can self-update since the app packages are made for Ubuntu.

If you insist to setup on enterprise Linux you can try to post what exactly you’re struggling with.

1 Like

Hi @TechnicallyComputers, I first wanted to say thank you so damn much for your wildly detailed and in-depth guide here. I know it took a ton of your valuable time to produce so your efforts are extremely appreciated!

I hope I’m not having bad forum etiquette by being the first reply here in 3-years somehow, but I was just hoping to get a bit of advice if you’d be willing to oblige.

I’ve followed your guide start-to-finish but for Rocky v9.4 and PHP v8.2 and am having an issue I’ve been hopelessly unable to surmount. Once I get InvoiceNinja accessible in my web browser, I proceed through the setup, successfully test the MySQL connection and created my first user. However, ever since finishing the setup page, my application refuses to output anything else but a blank screen/page…

  • There are no errors in storage/logs/laravel.log, no exceptions in the web debugger panel
  • There aren’t any errors being output to nginx’s error logs.
  • There are no errors in php-fpm/error.log
  • There are no errors in mysqld.log
  • I have all my permissions and ownership correct AFAIK, artisan and npm commands would fail if they weren’t.
  • I intend to debug my way toward keeping it at Enforcing, but atm I have SELinux in Permissive mode, so to my knowledge this shouldn’t be my issue here.
  • The database tables have all been successfully populated from the setup, I can login to MySQL and see my user entry from the setup page is accurately populated.
  • My nginx and php-fpm configs all point to the same www.sock, initially this was an issue preventing the setup page from showing.
  • I have node v20.17.0 and npm v10.8.2

One thing I noticed was that while following your guide the .env’s APP_KEY changed at one point. I have the 2 that I’ve seen copied in a notepad, not sure which one should be used but when I have either one in the .env and then run a sudo -u nginx php artisan optimize either one doesn’t seem to make a difference in the application working or throwing any errors… I kinda wonder if my issue is related to this?

I don’t believe I’m missing any dependencies. After adding the remi-php repo these were my install commands for all the dependencies:

  • dnf install mysql-server gcc-c++ make php php-{bcmath,ctype,common,curl,fileinfo,fpm,gd,gmp,iconv,imagick,intl,json,mbstring,mysqli,openssl,pdo,soap,tokenizer,xml,zip}
  • dnf install libXcomposite libXcursor libXdamage libXext libXi libXtst libmng libXScrnSaver libXrandr libXv alsa-lib cairo pango atk at-spi2-atk gtk3
  • The code-specific dependencies should be okay, as I can run sudo -u nginx npm update --omit=optional and get up to date, audited 988 packages in 9s.

So I’m at a loss here! I’ve reviewed pretty much all of the official self-host troubleshooting that I can. I can’t figure out why this won’t work and more importantly why nothing of any concern is logged anywhere to give me a lead to investigate…

Why is this section of the install guide as it is? I’m beginning to think my issue is related to how composer dependencies were installed. I’ve been using only my root user throughout this whole process.

From then on you can run the following instead of this especially long elaborate php command above:
$ sudo -u nginx php composer i --no -dev

Is there a typo here? It doesn’t seem like the nginx user is able to execute PHP to run a composer command… I get the following:
# sudo -u nginx php composer i --no-dev (assuming there shouldn’t be a space after “--no
Could not open input file: composer

Composer is indeed installed to /usr/bin which is apart of my global $PATH

You may need to add the nginx user to the composer group, so they have the correct privileges.

That being said, the last time I installed it on Fedora, I had to install composer in the InvoiceNinja directory. Even though it was in my path, it was never recognized.

I appreciate your input! Firstly, I don’t see any groups or users specifically related to composer on my system. I wasn’t able to find anything about a composer user/group on their docs either.

Nevertheless, I hadn’t thought of installing it to the InvoiceNinja directory! After deleting everything composer-related using # echo home cache-dir data-dir | xargs -n1 composer config --global (including /usr/bin), I reinstalled composer to the IN directory was finally able to run # sudo -u nginx php composer i --no-dev without any issue!

After that I ensure nginx owns the whole app directory and then run # sudo -u nginx npm install --no-optional and # sudo -u nginx php artisan optimize however after proceeding through the Setup screen and successfully testing the db and adding my user, I STILL get a blank page after finishing the Setup. No logged errors anywhere as usual.

I’m gonna try and dissect this more another time… It’s imperative I get this running! I’ll circle back and make an updated guide once I finally get this.

1 Like

I haven’t read the whole thread, but… if you’re seeing a white screen I suggest trying to login using the desktop/mobile app. If that works it points to a problem specific to the web app.

Great suggestion! I grabbed the MS Store app and it works fantastically!! My health check:

My app still whitepages, however https://weburl.com/client/login seems to work fine.

How can I debug/troubleshoot this further then? Is this related to the React app and/or NPM? Any logs or test scripts specific to React that I can check?

Are there any errors in the browser console?

It may help to clear your browser cache/test with a different browser

Nope, never seen any errors come through the browser DevTools.

I daily LibreWolf but have tried this in vanilla FireFox, Brave, and MS Edge.

Any chance this is relevant to this issue?

Is there anything on the console tab?

How did you install the app?

No sir nothing output to the devtools console!

I installed the app via $ sudo git clone https://github.com/invoiceninja/invoiceninja just as described in the original post.

Only difference is, as a troubleshooting step, I recently reinstalled composer to the app dir so I could get my nginx user to successfully invoke composer commands with php. Here is my app dir:

I noticed this comes in the root document, would this be potentially relevant for my situation?

I think that explains it, you’ll want to use the release tar as it includes the React app.