Raspbian on Raspberry pi 3B

How to install open enventory on Raspbian

This guide is to create a working Open enventory running on OS Raspbian on a Raspberry pi 3B (see https://www.raspberrypi.org/products/raspberry-pi-3-model-b/ for information on the RPi 3B)

Initial Setup

  1. Flash a fresh copy of Raspbian onto the micro SD card. (A guide for completing this task can be found here https://www.raspberrypi.org/documentation/installation/installing-images/.

2. Once flashed insert micro SD into the RPi 3B and boot the device with monitor connected. If install completed you should now see the Raspbian desktop as shown below.

3. The first thing that should be done is to update the OS

  • open a terminal window by clicking on terminal icon on top bar or by pressing ctl+alt+t

  • run the following commands

4. After the update has completed we will create a LAMP server on the pi. This was completed following this guide (https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress)

  • Complete the steps to set up the Apache server, install PHP, and install MYSQL mysql is outdated trying the command in the above link will give you an error use the following instead to setup the mariadb and mysql (NOTE: Wordpress does not need to be installed)

5. Install the following packages to prepare for Open enventory

6. Create MYSQL root pwd by entering the following command in terminal the default password is blank. We will subsequently set it up so sudo is not required so that we can login online to create our databases for oe. When asked for a password after command 4, use the password we just set up for mysql_secure_installation.

7. Download Open Enventory image and set up on apache server (exact link to download can be found at https://sourceforge.net/projects/enventory/files/?source=navbar) (NOTE: in terminal commands below, the open_enventory_2019-07-24.zipshould be replaced with the version you wish to use) - Once downloaded unzip and copy to the right location which we will need to make.

8. Now go to the http://xx.xx.xx.xx/oe

With xx.xx.xx.xx: is the server’s ip address

To find the ip address of your raspberry pi on your local network run the following command. The result will yield many things we only care about the ip address number directly following inet

going to servers address in a browser on a device on the local network will look like the following

  • Database: to create a new database, type the desired database’s name

  • Username: root

  • Password: use the mariadb password that was set up in step 6 of this tutorial

9. If successful after clicking inventory you should see the following page

10. Modify .htaccess file

Modify the content of the file as in this screenshot. Important: these settings are for the server with configuration as indicated in the top of this tutorial

Save the file by typing ctrl+o then hitting the enter key then exit by typing ctrl+x. You will then have to tell the raspberry pi to use the settings in the .htaccess file. Navigate to 000-default.conf and add add the Directory lines so that the file is identical to the image below.

Then restart the apache server

11. Note this can only be accessed on the local server if you wish to access the OE database on any network you can set up ngrok. If you sign up you can use the given link indefinitely, and using https://freedns.afraid.org/ you can make a DNS to access the database easily.

12. Install ngrok (see https://thisdavej.com/how-to-host-a-raspberry-pi-web-server-on-the-internet-with-ngrok/ for more details)

13. Start the ngrok server

the output should look as follows (note if you close the terminal window the session will be closed

by navigating to the link provided by your output in a web browser with the directory oe for this example it would be http://2057a4d3.ngrok.io/oe should get you to the open enventory login page from any device on any network.

Last updated

Was this helpful?