BISD Inventory

Install in-house inventory system based on web2py


web2py Service

Cluster Database Service


Cluster Database Management Service

Cluster Load Balancer Service

Runs on with a database on and load balanced by

Install Software

First we want to create our database. On the database server, run:

mysql -u<user> -p -e "create database inventory;"

Next we want to remove the example applications:

cd /var/web2py/applications
sudo rm -Rf examples/ welcome/

Now we install the inventory software:

sudo git clone
sudo mv pyInventory init

Note: the init application is automatically run if no application is specified in the URL.

Next we need to patch web2py as currently Active Directory groups do not work by default:

cd /tmp
sudo mv /var/web2py/gluon/contrib/login_methods/
sudo rm /var/web2py/gluon/contrib/login_methods/ldap_auth.pyc
sudo chmod -R 755 /var/web2py
sudo chown -R www-data:www-data /var/web2py/
sudo service uwsgi restart

Finally you will want to edit /var/web2py/applications/init/models/ to add your configuration details.

It is usually a good idea to compile your application after getting everything working as it will make performance better. You can do this from the web2py admin interface.

Troubleshooting Database Issues

If you are installing this for a new database, you need to set migrate=True in the model After the tables are created set migrate back to False.

If you are installing over an existing database, but your database metadata got deleted, set migrate=False,fake_migrate_all=True to create metadata then remove the fake_migrate_all.

Table Of Contents

Previous topic

Cluster Load Balancer Service

Next topic


This Page