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
1
sudo apt-get update
2
sudo apt-get upgrade
Copied!
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)
1
sudo apt-get install mariadb-server-10.0
Copied!
5. Install the following packages to prepare for Open enventory
1
sudo apt-get install -y php-mysql php-gd php-mbstring php-pear ghostscript imagemagick
2
sudo service apache2 restart
Copied!
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.
1
sudo mysql_secure_installation
2
sudo service apache2 restart
3
sudo service mariadb restart
4
sudo mysql -u root -p
5
MariaDB [(none)]> USE mysql;
6
MariaDB [mysql]> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
7
MariaDB [mysql]> FLUSH PRIVILEGES;
8
MariaDB [mysql]> exit;
9
sudo service mariadb restart
Copied!
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.
1
cd ~/Downloads/
2
wget https://sourceforge.net/projects/enventory/files/open_enventory_2019-07-24.zip
3
unzip open_enventory_2019-07-24.zip
4
sudo mkdir /var/www/html/oe
5
sudo cp -r ~/Downloads/open_enventory_2019-07-24/. /var/www/html/oe
Copied!
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
1
ifconfig
Copied!
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
1
sudo nano /var/www/html/oe/.htaccess
Copied!
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.
1
sudo nano /etc/apache2/sites-available/000-default.conf
Copied!
Then restart the apache server
1
sudo service apache2 restart
Copied!
You are done with the initial set up here. Open Enventory is ready to be used at this time.
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.
1
sudo npm install --unsafe-perm -g ngrok
Copied!
13. Start the ngrok server
1
ngrok http 80
Copied!
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 modified 6mo ago
Export as PDF
Copy link