Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Why would you want to use Open Enventory?
This is a User Guide (wiki) for Open Enventory. The links to the software (original version by FR, and forked version by KV) are on the top bar.
Open Enventory is a free, open-source (AGPL v3) programs for chemical inventory and electronic lab notebook. It combines:
a lab notebook,
a database for all spectroscopic data,
a chemical inventory and
a literature database.
It is designed for the requirements of university groups and small companies, focuses primarily in Chemistry research.
It is operated in the web browser (Edge, Firefox, Opera, Apple Safari, Google Chrome) and is therefore platform-independent. The integration means that physical data and safety information from the inventory can be used automatically in the laboratory journal. The automatic query of freely accessible substance data from online chemical catalogs saves manual data entry and catalog searches. Access to the catalog data also enables a price overview to be created with a click of the mouse.
The laboratory journal uses the data from inventory management and makes the results accessible to all members of the working group. Both inventory and laboratory journal allow the data to be shared with other working groups for the purpose of collaboration.
The goals of Open Enventory are:
to make unnecessary and boring tasks in the laboratory obsolete: searching for chemicals, price surveys.
to make knowledge accessible inside and outside (if access is granted) the workgroup, for longer periods.
to improve working safety be easily accessible safety instructions.
to reduce waste amounts and unnecessary costs by an easily searchable inventory database.
Currently, Open Enventory can be used in German, English, French, Spanish, Italian, and Portuguese. Additional language files and modifications can be created with little effort.
Please see the following presentation for a brief intro into Open Enventory, why you would want to use it and some of its functions:
Click the link below to download the presentation:
Official demo site for: - Chemical inventory - Electronic Lab notebook (ELN)
This guide will be updated periodically.
If you want to contribute, you can create an account to generate or edit this guide. Please follow this link.
If you have some documents or guide or videos and want to contribute and do not want to make the page yourself, please feel free to send it over to KV using the contact page:
You have 2 versions to choose from:
KV's modified version. Improvements or changes in this version compared to Felix Rudolphi version is here.
Felix Rudolphi's original version.
Please see the Installation section:
Ideas, guides, comments are welcomed.
You can contact Dr. Khoi Van (modified version of OE), at this email: knv88@pm.me or Twitter
you can contact Felix Rudolphi, the creator: info@sciformation.com
While the quick user backup as this one-line commandmysqldump -u [user] -p mysql > [Path]/[user_backup_filename].sql
might work when you have same version for backup and restore SQL. In most cases, you want to implement something similar to the following bash script
Step 1: On your server, in terminal, prepare the following bash file using vi (or vim or any text-editor of choice)
Step 2: Paste in the content of the file as follow:
PASSWORD
: change to your root
password or the password of the user that you use for the backup process. If you don't use root
then change root
on line 8 to your user
path
: use your specified path to the output file
oe_backup-user-$(date +\%Y\%m\%d).sql
: the output file will have the current date concatenated at the end of the file
This script above also not save oldroot
user info or empty users. You can change it by modify the code on line 12
Step 3: make sure you (or the user that run the mariadb_user_backup.sh
file has the sufficient permission (i.e. chown
) and make the script file executable:
Step 4: Execute the script file to obtain the user backup file
Similar to the guide here.
If your new SQL server is newer than your old one, after importing both database(s) and users, you can run the following command in terminal to upgrade MySQL:
Make sure “Chemical Search” mode is on
Step 1: choose what type of search: e.g “names, cas, supplier #”
Step 2: choose options: e.g. all words, contain (~ similar to), exact
Step 3: type is your search query, this can be name, CAS, supplier #, best with CAS and name
Step 4: choose database(s): choose one, or several (holding Ctrl while Left-click, or All databases (default)
Step 5: click Search
Video demonstration:
Note: when Suppliers search mode is on (see add chemical via suppliers), Open Enventory search includes chemicals from the local database(s) first
The default drawing program in Sciformation Vectormol. You can choose a different program by going to: Settings/Settings/Molecule editing/
and change “Structure Drawing Program” to “ChemDoodle (Javascript)” (recommended).
Step 1: choose search with Structures
Step 2: draw structure
Step 3: choose options: contain, similar to, exact, etc.
Add Storage location if not exists: see this section
Step-by-step instruction here
This clip below is show the process of adding a new chemical from suppliers:
For custom chemicals or chemical that cannot be found from suppliers list, use Method below.
1. Go to your Open Enventory Login page on your web browser
2. On the Login page, fill in the following info:
- Database
: name for the new database
- Username
: root
- Password
: your mysql root password
3. Open Enventory will then create a new empty database
This allows for users in one database to see chemicals in another database and/or vice versa.
Note: in the default setting, OE only allows user in one database to see if other databases have chemical(s) but not revealing the chemical's location.
1. Go to your Open Enventory Login page on your web browser
2. Log into your database of interest using root as Username
and your mysql root password as Password
3. Go to Settings
on Top menus:
4. On the left side menu, choose Manage databases
:
5. There are two types of connections:
2-way connections: users in one database can see/search chemicals in another database AND vice versa
1-way connection: users in one database can see/search chemicals in another database BUT NOT vice versa)
choose the desired connection and follow the instruction below.
Step 1: Choose as databases that you want to connect (hold Ctrl while choosing). You can choose more than 2. Click select all
if you want to connect all databases
Step 2: Click the button Connect selected databases
Using the rubric table, the databases with name in the bold format and listed horizontally in the first row of the table will be able to see/search chemical in database(s) (list vertically in the first column) that has checked check box
For example:
In the picture below, users in romo
database will be able to see/search chemicals in romo_test
database BUT users in romo_test
database will NOT be able to see/search any chemicals in romo
database.
Step 1: using the info above, make the connection of interest by checking the check boxes
Done! You can now search chemicals in other database(s) in the search page
Login into OE and extract the list of chemical containers that need to be move. You don't need all of the details for each container, just: - CAS number - Names - Chemical container barcode: most important thing as this is the lookup point
Open and add a new column with the name of the new location for each container. New LOCATION NAME MUST BE EXACT or OE would create a new storage location.
Skip this step if you want to move all of the chemical containers into the exact same location.
Login into OE with an admin account if you have not done so in step 1
Go to Settings
> Import and Edit via text file
If you don't see Import and Edit via text file
, you might not use the OE version by KV. If you did, you might need to enable it. See more at:
If you want to change all chemical container into the same new storage, simply typing the EXACT STORAGE NAME in the input instead of choosing the column for the storage_name
If your institution has this option turned on, you can edit a list of chemicals automatically.
To know if this option is turned on, please log into Open Enventory with an admin account, then choose Settings
(Top menu). Then if you see Import and Edit via Text File
(Left menu) then this function is turned on for your institution.
To turn on this function, please see this page:
You first need to log in into Open Enventory with an account with admin permission
then:
Step 1: Choose Settings
Step 2: choose Import and Edit via Text File
Step 3: on the Import page:
Choose package in the table field:
Click on Choose file button to choose your prepared file
Choose the number of Lines to preview
Choose number of lines to skip (header lines)
Step 4: click the green check mark to start uploading the file
Step 5: match the appropriate column for each info
Most importantly: match Barcode for chemical container with the correct column on your prepared file. This is how Open Enventory use as ID of the container.
For chemical containers, it checks if the barcode exists in the current database, and not disposed:
If Yes, it will edit the info of that container.
If No (or no barcode in the data entry), it will add the entry as a new container.
Match the rest of the info in the red rectangle area as desired:
Preview of the data:
Step 6: click the green check mark
A similar screen as screenshot below should appear after success uploading
Click on ‘Go to molecule’ button to edit structure and structural info (MW, Formula, etc.)
To change the lab related (person responsible, amount, etc.) info:
This guide is for that is newer than 2020-02-01. If you use an older version of , please see the guide .
Update (2020-02-01): KV's version of OE (on and after 2020-02-01) now accepts:
Excel files (*.xlsx and *.xls)
Comma-separated files (csv)
Tab-separated files (*.txt).
Prepare the Excel file, an example might look similar as below. A few important things:
Columns that are highlight in blue are important info.
You don't need all of the info that show in this example.
Empty cells are OK.
The amount need to be “xx Y” with xx is the amount and Y is the unit.
For unit, it is best to have all in lower case, for example, “ML” should be either “ml” or “mL”. It is best to convert all unit to lower case (use lower() command in excel).
Double check the CAS number column, Open Enventory uses CAS number as primary source to look up chemical info from the internet.
See step 9 for more info about each column in the excel sheet.
2. Login into your database using root user or any users with admin permission
3. Go to Settings
4. Go to Import Tab-separated text file (or Import in KV's version)
5. Choose Browse… and choose the exported text file.
Note: in Lines to skip, put 1 if you have a header rows, if not, choose 0
6. Click green check mark
7. Screens as below should show up, you can scroll down to see if they show up correctly (info appear correctly in each row)
8. Choose Column X for each content. If you choose None, that column will not be imported. You can also add a default value for each column that will apply for ALL items being imported.
Notes:
CAS number: most important info, OE will use this to look up other info (structures, MW, safety data, etc) from this cas #
Name: not too important
Empirical formula: do not import this since OE will use this to find the closest chemicals if CAS# is not present or wrong.
Amount: = size of the bottle + unit (format should be #+space+unit, for example: 5 g, 125 ml, 1 kg, etc)
Still available: the amount that left in the bottles (OK if not imported)
Locations: important. Note: Each location will have its own barcode
Compartments: = sub-location. Note: each compartment does NOT have its own barcode
Barcode: if you already have an existing barcode system, add it here.
Suppliers: = suppliers
Date open: could be in European style (dd.mm.yyyy) or American style (mm/dd/yy, etc.)
9. Click green check mark. Screen similar as below should show. Note: line X:… will tell you which lines in the text file is being imported.
10. Depend of how many chemical containers are imported, this might take a long time, so please be patient.
Step 1: search for the chemical of interest (see Search chemicals section)
Step 2: click Borrow button
Step 1: go to Borrowed chemicals
Step 2: click Return button
Step 1: scan your own barcode
Step 2: scan chemical barcode
Watch the terminal window to make sure the info is transmitted/recorded.
Step 1: Follow the following guide to create a guest account
Action: scan borrowed chemical barcode
Note: you don’t need to scan the your own barcode beforehand. The scan on a borrowed chemical will return the chemical.
Note: if the chemical is free and nobody has logged in, scanning the barcode of that chemical will bring up that chemical’s info in the system.
Step 4: click search
If it appears that the search is not accurate in ChemDraw plugin, you have to active the ChemDraw plugin: a) Right click on the background of the chemdraw drawing window b) Help/Activate my ChemDraw Plugin c) Input your activation info the same (from email) as what you did for installation of Chemdraw
If you want to let users in one database to be able to see location of chemicals in another database, after connecting the databases, please follow the instruction in this .
Step 3: Click the green check mark
Step 2: Click the green check mark
Follow the process that is laid out in .
In Step 5 of , you would only need to choose the column for CAS number
, Name
and most importantly, chemical container barcode
and **chose the correct column for the new location for the storage_name
Click on Edit button () to edit the info. (Or double click on any fields inside the Edit package area.
Click on Edit button () to edit the info. (or double click on any where around these info)
Author: Nathanyal Truax, Baylor University. You can check out his for other useful videos.
This function only works for users and chemical containers in the same database. For cross-databases (guest) borrowing, please see the below.
Computer that connected to the scanner must be ON Barcode terminal window must be ON and ACTIVE, if not log in with terminal username and pass or contact your local admin Active barcode terminal look like below:
Currently, this function is only available in 2020-09-26 or above.
Step 2: Follow the step above in
Computer that connected to the scanner must be ON !!! Barcode terminal window must be ON and ACTIVE
This function only available in KV's version.
TO DO: to be constructed
TO DO: to be constructed
Do NOT create a user with username starting with "auto". Any user with this kind of username will be deleted when linking databases.
You first need to log in into Open Enventory with an account with admin permission
Step 1: Choose Settings
Step 2: Choose Import
Step 3: download the User template and fill out the sheet according to the instruction.
This is a copy of the Excel User Import template. It is better to download the template from Step 2 above
Step 4: on the Import page:
Choose user in the table field:
Click on Choose file button to choose your prepared excel user import file from step 3
Choose the number of Lines to preview
Choose number of lines to skip (header lines)
Step 5: click the green check mark to start uploading the file
Step 6: match the appropriate column for each info
Step 7: click the green check mark
A similar screen as screenshot below should appear after success uploading
borrowing of chemicals by users from outside of the group (guests)
Currently, this function is only available in KV's version of OE 2020-09-26 or above.
The idea is each group should have one ‘user’ account designated for external users (users from outside of the group, guests). When someone outside of the group comes and borrows chemical containers, this account barcode should be scanned and following by the container barcode. This specific account (made by turning on a specific permission setting External borrow
in Predefined permission
) is set so that during checking out of a chemical container by this account, a pop-up window would open and ask for the specific info (borrower’s name, group, contact info, and the group member assisting during checkout). This info is then saved into the history entry of that exact checkout event.
Step 1: Create a new user, ‘guests_<database_name>’ for example.
While creating this user, choose the following ‘External borrow’ in the ‘Predefined permissions’
Step 2: Use this new account barcode in the OE barcode terminal. During checkout, a popup window like this should open to ask for more info:
The provided info will be appended to the history entry for that particular checking out event. Example:
If you want to create multiple new users, please see:
Do NOT create a user with username starting with "auto". Any user with this kind of username will be deleted when linking databases.
You first need to log in into Open Enventory with an account with admin permission
Step 1: Choose Settings
Step 2: Choose Users
Step 4: Add info such as username, password.
Username needs to be unique across the whole server, not just a single database.
Current password requirement is:
7 or more character
include at least 1 number
Step 5: add additional info such as name, locations
Step 6: Choose the appropriate permission
Choose one of the predefined permissions or "User defined" for customized permission
You should see the new user on the new screen if success:
Step 3: Click on the plus side button
Step 7: Click on the green check mark:
Different than Deleting a user, this will not remove the user from the database. It only disable the user from logging into the database
You first need to log in into Open Enventory with an account with admin permission
Step 1: Choose Settings
Step 2: Choose Users
Step 5: check Account disabled
The user must have Storage Administrator permission in order to create new storage
Step 1: After logging into Open Enventory, click on Settings
on the top bar navigation.
Step 2: click on Storages
on the Left.
TO DO: to be constructed
TO DO: to be constructed
TO DO: to be constructed
TODO: add line-by-line instruction
TO DO: to be constructed
Step 3: click on Details button ( ) on the same row of the user of interest
Step 4: click on Edit button () (or double click anywhere on the info window)
Step 6: Click on the green check mark:
Step 3: click on the button
Step 4: after adding the info, click the checkmark ( ) button
All of the guides in this section require you to be in an active Terminal. Please contact your site admin for specific details on how to access a terminal page on Open Enventory.
A terminal site should look similar to this:
If you are an admin and need to set up a Terminal, please see the following page:
You first need to log in into Open Enventory with an account with admin permission
Step 1: Choose Settings
Step 2: Choose Users
Step 5: type in the new password and repeat
First, open up Open Enventory in any web browsers. Your screen should look as follows.
After logging in you should see the general window for searching chemicals.
Click on the “Settings” tab top and center of the page (outlined with a red box below).
This will change the left side bar. At the top of the left side bar you should see “Change password” Click here (the button is outlined with a red box below).
Your screen should have two boxes as shown below. Fill in both boxes press the “Change password” button right next to the text fields and your password has been changed.
Step 3: click on Details button ( ) on the same row of the user you need to change password
Step 4: click on Edit button () (or double click anywhere on the info window)
Step 6: Click on the green check mark:
To be added to this tutorial
• How to add chemical that is already in the database
• How to add MSDS sheet
• How to delete chemicals (3 methods: - normal log-in - barcode scanner - Mass deletion (admin account only)
• How to print chemical barcode
• How to change location (and other info) of many chemicals using barcode terminal
Go to an active Terminal on your Open Enventory page. It should look similar to the following page.
Scan user barcode (will say you are logged in)
2. Scan chemical container (will now show chemical information)
3. Scan new location barcode (will now say “updated and location field will show new location”)
Check the 2 boxes “Stock-keeping mode” and “Set storage for all following containers” (the “Set storage for all following containers” will show up after you check “Stock-keeping mode”). Note: you can check by mouse or use the “Barcode for stock-keeping mode” list from Settings menu.
2. In typical terminal window of database of interest. Login by scanning user barcode
3. Scan the 1st chemical containers
4. Scan the new location. The window will show the new location and say the 1st container “… updated”
5. Scan the 2nd containers, 3rd container, 4th container, etc.
6. When Done, uncheck “Set storage for all following containers”
Go to an active Terminal on your Open Enventory page. It should look similar to the following page.
Without any user logging in, scanning a chemical container barcode will bring up that chemical info.
You first need to log in into Open Enventory with an account with admin permission
Step 1: Choose Settings
Step 2: Choose Users
Step 5: change desired info or permission
Go to an active Terminal on your Open Enventory page. It should look similar to the following page.
Scan user barcode (will say you are logged in)
Scan chemical container (will now show chemical information)
Scan barcode for “Delete” (will say “data set will be deleted in 3 seconds, then deleted)
Notes: If you manually change data (not using the scanner) you will have to click “update” after changing the data manually (mouse and keyboard).
Step 3: click on Details button ( ) on the same row of the user you need to change password
Step 4: click on Edit button () (or double click anywhere on the info window)
Step 6: Click on the green check mark:
These are not hard-setting but might be adapted to specific usage. All pages in this section are for guiding purpose.
quick intro on how to start using Electronic Lab Notebook in Open Enventory
This tutorial was created by Nathanyal Truax, Baylor University
A brief tutorial of creating a new laboratory notebook and creating a reaction entry.
Create new notebook.
If you do not see the + button ask your admin to give you administrator journal privileges.
Generate reaction from scratch.
Generate reaction by copying existing reaction.
Add a new empty notebook page
Sorry we do not have many content for this yet. If you have any guides you would like to share, please contact KV using the following link:
WARNING: this step is not reversible!
You first need to log in into Open Enventory with an account with admin permission
Step 1: Choose Settings
Step 2: Choose Users
Step 4: choose OK to confirm deletion
Step 3: click on Delete button ( ) on the same row of the user of interes
This guide is created for new unmanaged VPS from A2hosting.com
OS: CentOS 7
Ram: 1GB
Hard drive: 20 GB
Bandwidth: 2 TB
Login into A2 account, service to find the following info:
2. Connect to server using ssh. If you are on a Mac, use Terminal and type in the following command. If you are on a Window, you can use CMD (if CMD does not work, google “connecting to ssh on Window” to find the program
: xxxx: port number yy: username zz.zz.zz.zz: ip or hostname
Select “Yes” if asked to continue connecting
If there is a problem, follow this link: https://www.a2hosting.com/kb/getting-started-guide/accessing-your-account/using-ssh-secure-shell
3. To secure your ssh and your server, set up new user and deactivate root login via SSH by following steps 2, 3, and 5 in this tutorial:
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-centos-7
Install sudo by:
4. Optional: Setting up time by following this link: https://www.tecmint.com/set-time-timezone-and-synchronize-time-using-timedatectl-command/
5. Following this link to set up LAMP stack:
In step 3, replace this part:
with:
In step 4: choose PHP7.2
Follow this tutorial from steps 1-5, make sure instruction for specific steps as indicated above
https://www.howtoforge.com/tutorial/centos-lamp-server-apache-mysql-php/
6. Install the following packages to prepare for Open enventory
7. Create a “download” folder; download OE (get the exact link from website: https://sourceforge.net/projects/enventory/files/?source=navbar ); unzip OE and copy to the right location:
8. Go to http://xx.xx.xx.xx/oe
With xx.xx.xx.xx: is the server’s ip address
9. The OE website should load like screenshot below
Database: choose the desired database’s name
Username: root
Password: use the mariadb password that was set up in step 5 of this tutorial
10. If successful, this page will load:
11. Modify .htaccess file
Modify the content of the file as in this screenshot. Important: these setting is for the server with configuration as indicated in the top of this tutorial
Save the file (hit Esc, type “:wq” and then Enter) and restart httpd service
12. Modify mysqld config:
Right after [mysqld]
, add:
Save the file (hit Esc, type “:wq” and then Enter) and restart httpd and mariadb services
You are done with the initial set up here. Open enventory is ready to be used at this time.
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)
Quad Core 1.2GHz Broadcom BCM2837 64bit CPU
1GB RAM
Using SanDisk Ultra 64GB UHS-I/Class 10 Micro SDXC Memory Card as boot and home drive
Initial Setup
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/.
Raspbian image found at https://www.raspberrypi.org/software/operating-systems/ We used "Raspberry Pi OS with desktop and recommended software" zip file
use zip file with balenaetcher to flash to micro SD
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.zip
should 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
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.
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.
This is procedure to backup Open Enventory database and restore it later on the same server or migrating to a different server
This guide is for Linux environment with Apache2, PHP and MariaDB (MySQL) (LAMP) stack:
1. In Terminal window, type the following command:
Replace [italic_text] (including the square bracket) with specific info:
[user]: in most cases, use root
(recommended)
[database]: use the name of the database that you want to backup
[Path] and [backup_filename] : any path and filename
If you want to compress the SQL backup files, you can use this command instead:
| xz
was added for compressing SQL file to .xz file
Make sure that you have .xz
at the end of the file as above.
.xz
files seem to have the best compression vs bzip2 and gzip for SQL files. You can see more info here and here:
For example usage of xz
, see this link.
2. Type in password for the user above and then Enter (nothing will show when you are typing the password)
1. In Terminal window, type the following command:
Replace [italic_text] (including the square bracket) with specific info:
[user]
: in most cases, use root
(recommended)
[Path]
and [backup_filename]
: any path and filename
While this approach might work well in case of same MySQL or MariaDB version, if you migrate or upgrade SQL, you want to follow the instruction here for better users backup:
2. Type in password for the user above and then Enter (nothing will show when you are typing the password)
Step 1: transfer both files (database and users, if you want to keep the same users and passwords) to the new system/server
Step 2: create the database from OE web login if you have not done so.
Step 3 (optional):
If you have compressed the SQL file as instruction above, you will need to decompress the file first.
This is for compressed file with .xz
extension:
-v
: verbose, give more info
k
: to keep the compressed file, this will generated the uncompressed file .sql
Step 4: use ssh and terminal, login as terminal root and run:
Replace [italic_text] (including the square bracket) with specific info:
[database-name]
: use the name of the database that you want to backup
[/path/backup-database]
and [/path/backup-user]
: any path and filename
Step 5: go to OE on web browser and login with mysql root
account.
If the mysql root
user in the old database has password different than the current mysql root
user, after step 3 above, the root
user password will be changed to the old password.If you don't know the old mysql root
password, follow this tutorial to reset mysql root password.
Step 6: go to Settings
and then click on Recreate users
. That should reactivate all users and their passwords.
Again, if you have migrate from MariaDB < 10.4 to MariaDB 10.4+, it might not work and we have to change the command in step 3 above. The reason is because the mysql.user table is deprecated in MariaDB 10.4. You can read more about it here.
While the general steps are similar, the exact paths to the executable command are different for Mac OS and Windows using XAMPP, please follow the corresponding guides below:
1. In Terminal window, type the following command:
Replace [italic_text] (including the square bracket) with specific info:
[user]: in most cases, use root
(recommended).
[database]: use the name of the database that you want to backup
[Path] and [backup_filename] : any path and filename
2. Type in password for the user above and then Enter (nothing will show when you are typing the password)
1. In Terminal window, type the following command:
Replace [italic_text] (including the square bracket) with specific info:
[user]: in most cases, use root
(recommended).
[Path] and [user_backup_filename] : any path and filename
2. Type in password for the user above and then Enter (nothing will show when you are typing the password)
Step 1: transfer both files (database and users, if you want to keep the same users and passwords) to the new system/server
Step 2: create the database from OE web login if you have not done so.
Step 3: use ssh and terminal, login as terminal root and run:
Replace [italic_text] (including the square bracket) with specific info:
[database-name]: use the name of the database that you want to backup
[/path/to/backup-database]: any path and filename
Step 4: go to OE on web browser and login with mysql root
account.
If the mysql root
user in the old database has password different than the current mysql root
user, after step 3 above, the root
user password will be changed to the old password.
If you don't know the old mysql root
password, follow this tutorial to reset mysql root password.
Step 5: go to Settings
and then click on Recreate users
. That should reactivate all users and their passwords.
Again, if you have migrate from MariaDB < 10.4 to MariaDB 10.4+, it might not work and we have to change the command in step 3 above. The reason is because the mysql.user table is deprecated in MariaDB 10.4. You can read more about it here.
1. Open a Window Powershell window, type the following command:
Replace [italic_text] (including the square bracket) with specific info.
[user]: in most cases, use root
(recommended).
[database]: use the name of the database that you want to backup
[Path] and [backup_filename] : any path and filename
In the command above, this part is for the default XAMPP set up. If some error happens, you should find the executable file inside XAMPP folder in your system. You can try to follow this link.
2. Type in password for the user above and then Enter (nothing will show when you are typing the password)
1. In Terminal window, type the following command:
Replace [italic_text] (including the square bracket) with specific info:
[user]: in most cases, use root
(recommended).
[Path] and [user_backup_filename] : any path and filename
2. Type in password for the user above and then Enter (nothing will show when you are typing the password)
Step 1: transfer both files (database and users, if you want to keep the same users and passwords) to the new system/server
Step 2: create the database from OE web login if you have not done so.
Step 3: use ssh and terminal, login as terminal root and run:
Replace [italic_text] (including the square bracket) with specific info:
[database-name]: use the name of the database that you want to backup
[/path/to/backup-database]: any path and filename
Step 4: go to OE on web browser and login with mysql root
account.
If the mysql root
user in the old database has password different than the current mysql root
user, after step 3 above, the root
user password will be changed to the old password.
If you don't know the old mysql root
password, follow this tutorial to reset mysql root password.
Step 5: go to Settings
and then click on Recreate users
. That should reactivate all users and their passwords.
Again, if you have migrate from MariaDB < 10.4 to MariaDB 10.4+, it might not work and we have to change the command in step 3 above. The reason is because the mysql.user table is deprecated in MariaDB 10.4. You can read more about it here.
Edit file lib_global_setting.php
:
from
to
with:
300 (seconds = 5 min) is the time that user is banned from logging in
10: is the number of retries
Edit file lib_global_setting.php
from
to
edit filephp.ini
(in Linux, /etc/php.ini)
with xxx = desired memory in megabytes
2. edit file.htaccess
(in the folder install oe)
with xxx = desired memory in megabytes
For OE original barcode, add Prefix ESC
For existing barcode, (specifically for Tao Tronic scanner: https://smile.amazon.com/TaoTronics-Wireless-Cordless-Handheld-Barcode/dp/B00E0G2M6U/ref=sr_1_4?ie=UTF8&qid=1482003832&sr=8-4&keywords=taotronic+scanner ) add Prefix: [l_shift_on]+[Home]+[l_shift_off]
Chance is you miss php-mbstring and php-gd packages
Install these packaged and restart apache (httpd in CentOS 7) should fix this issue
In CentOS 7, you can install the two above packages by running :
Restart your server (in Centos 7):
Go to OE folder, change …/lib/barcode_terminal.js
, line 174-185, content:
From
To:
Because this is on javascript file on the client browser, it is best to close the browser and restart the browser on the client/terminal computer
Edit lib_global_funcs.php
Change:
to:
2. Restart server
Edit lib_global_funcs.php
by adding autofocus
after id=\"db_name\"
. Around line ~1180
Original:
to:
Backup current OE files
Download the appropriate files from: https://sourceforge.net/projects/enventory/files/?source=navbar
Unzip the file
Copy the content of the folder into your current [OE_folder] and overwrite the old files
Copy the “List of files that have been modified to specific need (different than the original files of oe)” from the backed up OE to the new [OE_folder]
Restart httpd and mariadb (or mysqld) services
Go to web browser and access OE url
Login as root into a database of interest and perform upgrade if necessary (you will have to do this again for all of the databases if major upgrade is required
Create the label by re-design the original file chemical_storage.label
(in /oe/forms/dymo/). You can open and edit ".label" files by using Dymo software: https://www.dymo.com/en-US/online-support/dymo-user-guides
Name these files as chemical_storage1.label
, chemical_storage2.label
, etc.
Save these files in the same location: /oe/forms/dymo/
Edit file edit.js
(in /oe/lib/)
From:
To:
The code block above will show 2 labels in the popup window. You can add more label by copy the block for "Second label", make sure to change:
- variable name for the window (window2
in the example above)
- moveby
specifications
Pic:
Original file:
Modified file:
2. Restart the apache service: in CentOS7 use this in the command line:
Edit file lib_edit.php
(in /oe/)
From:
Pic:
To (remove style=\"display:none\"
)
2. Restart the http/apache service
Install phpMyAdmin by following the instruction from: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-apache-on-a-centos-7-server
Note: if you want remote access then follow step 4 in this tutorial: http://www.krizna.com/centos/install-phpmyadmin-centos-7/
2. Log in into phpMyAdmin using Web browser: http://your.ip.address/phpMyAdmin/ (or https://) with root user
3. Choose the Database in which the containers belong to:
For example in this case, I choose Database storage
4. Create new storage location in OE as usual, see:
5. Identify the storage_id
of the new and old locations by choosing Table storage
in Database “xyz”.
Note: In this example, accidentally, the name of the database (“storage”) is the same as the name of the table. However, the database name can be anything but the table name is always “storage”
Another way of doing this is to use “Console” function in phpMyAdmin
Type in:
You should see similar to:
With the screen above, you should be able to see the storage_name
and the corresponding storage_id
The next few steps is demonstration for changing all of the chemical in “315-R (Personal)” (storage_id=1) into “305-test” (storage_id=9)
In the Console:
6. To check how many chemical, type:
Note: hit Ctrl+Enter to execute command in Console
7. To change, type:
Done
Install phpMyAdmin (See above)
Look up person_id
by going into [Database]/person
Show chemical borrow by that person (i.e. a person with person_id=8)
3. Return by:
Look up person_id
by going into [Database]/person
Show chemical owned by that person (i.e. a person with person_id=7)
3. Change, in this case, to no owner (NULL)
In the following example, show person_id
of user with username=julia
First choose the desired database on the tree folder from the left
Use:
Explain:
LIKE 'FH-2206%'
: show the storage_id
of the storage location with name starting with FH-2206
LIKE '%FH-2206%'
would mean find anything with storage name containing FH-2206
LIKE 'FH-2206%'
would mean find anything with storage name ending with FH-2206
Explain: the above command is used to
Select all of the chemical in the database that match: owner_person_id=15 AND with storage_id is NOT 18
Explain: see above for explanation of the criteria.
Explain:
GROUP BY storage_name
: is added so that duplicates are only shown once
Explain: the command above change responsible people to no one for all of the chemicals being owned by person_id=13 AND in all of the storage_id listed
The below command will search for all the barcode that is assigned to more than 1 container (chemical_storage). This search ignores disposed container as well as container without barcodes (chemical_storage_disabled IS NULL AND chemical_storage_barcode != ""
)
To select info from the list of duplicated barcodes. In this case, created by a specific user and created after some specific timestamp
WARNING!!! BE VERY CAREFUL BEFORE DOING THIS!
This will remove all of the containers, including info about manufactures, order date, barcode, owner, location, etc. However, info about molecule (MW, structures, safety, etc) and database related such as users will be reserved.
This is particularly helpful when you need to update a large amount of chemicals via text import.
Login into your server via ssh
Login into myswl using root account or user account with administrator priviledge for the database that you want to change. Replace “root” with the username if desired
3. Show database and then choose the database of interest. test
is the name of the database in this example
4. Remove the chemical container by running the following command
5. (Optional): Run the command below if you want to reset the id counter (chemical_storage_id
as well as autogenerated barcode)
6. Log out of mysql, restart httpd and mariadb services
7. Go back to OE website and import new tab-separated text file
Update (Oct 11, 2019): new function to delete multiple containers based on barcode has been added into Settings section. Only users with admin permission would see this option.
If you have existing barcodes for your chemical containers, use the following settings
Login into OE with the database that you want to modify, using an admin account, (or root account, or an account with sufficient permission)
Navigate to Settings/Global Settings/Inventory
Important: when switching to this setting, you have to generate your own storage(locations) barcodes as well as user barcodes. See below for way to automatically generate location and user barcodes.
Issue: if the existing barcode column is the last column in the tab-separated text file, when imported into OE, the “\n” will also be imported as part of the barcode. This lead to terminal window does not work with existing barcode. Use the following methods to remove this trailing “\n” character
Login into your server via ssh
Login into mysql using root account or user account with administrator priviledge for the database that you want to change. Replace “root” with the username if desired
3. Show database and then choose the database of interest. “test” is the name of the database in this example:
4. Remove the chemical container by running the following command
5. Log out of mysql, restart httpd and mariadb services
Update (as of 2019-08-01, for Khoi’s modified version): functions “Autogenerate barcode” has been added into Settings for Admin roles. Users with admin permission can login into OE web interface, go to Settings/Autogenerate barcode
and click the corresponding button to autogenerate storage and/or user barcodes.
Issue: when switching to using pre-existing barcode instead of using OE-generated barcodes, the system won’t work well if no existing barcode for storages and users are added. Use the code below in mysql to automatically add barcodes for storage using OE-generated code.
While these barcodes look the same, they have to be generated in order for terminal to work
Login into your server via ssh
Login into mysql using root account or user account with administrator privilege for the database that you want to change. Replace “root” with the username if desired
3. Show database and then choose the database of interest. “test” is the name of the database in this example:
4. You can check if the new generated barcode first by running this in phpMyAdmin (easier to see result). See explanation below for the complicated function. Compared the “new_barcode” with the autogenerated barcode to make sure the function work well.
5. Update the “storage” table, by setting “storage_barcode” field. “storage_barcode” field is a binary so cast() was used. Note, this whole function inside cast() is to convert “storage_id” field to EAN8 barcode. See here for more info on how to make EAN8 barcode: http://www.barcodeisland.com/ean8.phtml
Explain: default in OE, the barcode for storage is “92xxxxxy” with the last digit “y” (digit number 8 on 1-based) is the check sum of the first 7 digits. The “xxxxx” labeled in red is the “storage_id” left padded with “0” (number zero).
For example: if “storage_id”=1 => “storage_barcode”=92000018
Exit mysql:
Update (as of 2019-08-01, for Khoi’s modified version): functions “Autogenerate barcode” has been added into Settings for Admin roles. Users with admin permission can login into OE web interface, go to Settings/Autogenerate barcode
and click the corresponding button to autogenerate storage and/or user barcodes.
Issue: when switching to using pre-existing barcode instead of using OE-generated barcodes, the system won’t work well if no existing barcode for storages and users are added. Use the code below in mysql to automatically add barcodes for USER using OE-generated barcode.
While these barcodes look the same, they have to be generated in order for terminal to work
Login into your server via ssh
Login into mysql using root account or user account with administrator privilege for the database that you want to change. Replace “root” with the username if desired
3. Show database and then choose the database of interest. “test” is the name of the database in this example:
4. You can check if the new generated barcode first by running this in phpMyAdmin (easier to see result). See explanation below for the complicated function. Compared the “new_barcode” with the autogenerated barcode to make sure the function work well.
5. Update the “storage” table, by setting storage_barcode
field. storage_barcode
field is a binary so cast() was used. Note, this whole function inside cast() is to convert storage_id
field to EAN8 barcode. See here for more info on how to make EAN8 barcode: http://www.barcodeisland.com/ean8.phtml
Explain: default in OE, the barcode for PERSON is “91xxxxxy” with the last digit “y” (digit number 8 on 1-based) is the check sum of the first 7 digits. The “xxxxx” labeled in red is the “person_id” left padded with “0” (number zero).
For example: if “person_id”=1 => “person_barcode”=91000019
6. Exit mysql:
In the default setting of OE, the exact location of a chemical belonging to a different group is masked. This setting will help you to allow some specific person or everyone to be able to see locations of chemicals outside of your own groups
Login into the server via ssh and then convert to root user or use sudo command. The following is using sudo command
It is a good idea to save an original copy of this file first. Modify the file lib_output.php
inside open enventory folder. In this example, the open enventory folder is named “oe”. The specific location of your folder might change. Change the path accordingly.
3. Change the content of the file as follow. Note, this is on line 2584 so google to search for some term in vi; otherwise you will need to scroll a lot.
Original content:
To let EVERYONE see the locations:
To let a specific user to see the location, change the content as follow. In this example, the person name is “special_person”
Below guide is referenced from:
Prepare the excel file with one column as storage with the same name as those found in OE. Export to csv file, csv file does not have to have the same column but it is best to have the first 2 columns is the storage name and barcode
Login into mysql as root user using:
2. Show all databases and choose the correct database to modify (in this example “test” is the name of the database):
3. Create a temporary table (in this example temp_storage
is the name of the database, storage and barcode are the 2 headlines of the 2 columns):
4. Load csv data file into temp_storage
table (in this example test
is the name of the database; “ignore 1 lines” because the csv file head 1 line headline):
5. Update storage table
6. Remove the temporary table
Copy csv files into /var/lib/mysql
Open phpMyAdmin console.
Choose the right databases
4. Run ALL of these commands AT ONCE (Ctrl-Enter to run command(s) in phpMyAdmin console)
Installation for Mac using XAMPP
Install XAMPP: https://www.apachefriends.org/index.html
Copy/extract Open Enventory into Applications/XAMPP/htdocs/ . Write down the folder name because this will be the web address. In this case the folder is named ‘open_enventory’
3. Open Applications/XAMPP manager. Start MySQL and Apache.
4. Change mysql root password by following these steps:
Ensure that the MySQL/MariaDB server is running. (see step 3)
Open a new terminal.
Use the mysqladmin command-line utility to alter the MySQL/MariaDB password, using the following syntax:
mysqladmin --user=root password "newpassword"
The mysqladmin command-line utility is located within the bin/ subdirectory of the XAMPP installation directory, typically /Applications/XAMPP.
Or, if a password has already been previously set and you’d like to change it to a new one, you can use the following syntax:
mysqladmin --user=root --password=oldpassword password "newpassword"
For example, to change the root password from 12345 to gue55me, you would execute:
/Applications/XAMPP/bin/mysqladmin --user=root --password=12345 password "gue55me"
5. Test that your password change has been accepted, by attempting to connect to the MySQL/MariaDB server using the mysqlcommand-line client in the same directory. For example, you could use the command below to connect to the server and return the results of a calculation: (make sure you use your own password instead of “gue55me”)
Steps 6 & 7 are for phpmyadmin set up. They are optional. You don’t need to do this if you just want to set up Open Enventory
6. Change the permission for Applications/XAMPP/xamppfiles/phpmyadmin so that you/your_account have the read and write access, through right click, Get Info (or Cmd-I)
7. Use TextEdit to edit file config.inc.php. Locate:
$cfg['Servers'][$i]['auth_type'] = 'config';
and change to:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
8. Using a web browser, go to: http://localhost/open_enventory/
In Database: put in the name for your database server
Log in with username ‘root’ and set password Notice the error messages
9. Under Warning above notice the place of the temp folder (in this case /var/folders/87/…)
10. Go to that folder containing the openenv.log (in this case: T with the path as following in Finder (file maybe hidden):
/var/folders/87/b98_ym4x1r91ldysmq8r29kc0000gn/T/
11. Set permission for everyone to Read&Write for this folder (e.g. “T”)
12. Look-up file php.ini. Should be in Applications/XAMPP/xamppfiles/etc/
And change to:
error_reporting=E_ALL & ~E_NOTICE
13. Restart Apache and SQL in XAMPP manager
14. Restart the web browser and go the server website at: http://localhost/open_enventory/ - In Database: put in the name for your database server - Log in with username ‘root’ and set password
Edit php.ini with TextEdit:
Path: /Applications/XAMPP/xamppfiles/etc/php.ini
Change:
date.timezone=Europe/Berlin
to:
date.timezone=America/Chicago
Restart server
Edit lib_global_funcs.php with TextEdit:
Path: /Applications/XAMPP/xamppfiles/htdocs/open_enventory/
Change:
if ($db_name=="") {
$db_name="storage";
to:
if ($db_name=="") {
$db_name="";
2. Restart server
See this page:
Goal: Setting for adding prefix Ctrl-A. This is to remove all pre-existing data inside an input field
Reference: https://www.honeywellaidc.com/en/-/media/en/files-public/technical-publications/multi-product/00-02544.pdf
Instruction: scan every single barcode on the first column in this order from top to bottom
Explanation:
1st Configurable Prefix = 175 : Left Crtl + 1 character
2nd Configurable Prefix = 065 : Letter “A”
Scanner will transmit <left CRTL Make> “A” <Left CRTL Break>
Step 1: Install this XAMPP from https://www.apachefriends.org/download.html
Step 2: Copy/extract Open Enventory files into C://XAMPP/htdocs/ . Write down the folder name because this will be the web address. In this case the folder is named ‘enventory’
Step 3: Start XAMPP and start Apache and MySQL
Step 4: setting up root password for MySQL. This changes with XAMPP version so consult this FAQ for specific details.
Step 5: Change php.ini content by clicking on Config button on the same row with Apache on XAMPP panel to match the following:
error_reporting = E_ALL & ~E_WARNING & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
(otherwise some warnings being displayed will break the functionality)
safe_mode=Off
magic_quotes_gpc=Off
upload_max_filesize=64M # (or higher)
post_max_size=64M # (or higher)
If still warnings appear in the generated HTML code (breaking open enventory), you should set:
display_errors=Off # (especially on PHP 7+)
Step 6: Change my.cnf (or my.ini) content by clicking on Config button on the same row with MySQL on XAMPP panel to match the following under [mysqld]
section:
Step 7: Restart both Apache and MySQL service by clicking on Stop and then Start for each service.
Step 8: Open this link in your web browser: http://localhost/enventory/ and log in with the following info:
"Database": <database-name> "database-name" can be whatever you choose but should not have blank space and unique; I suggest short name is better as well.
"Username": root (It has to be the exact word "root" for this set up first)
"Password": the root password that we set in the step above
Then click on "Inventory".
Step 9: If successful, it will bring up something similar to this page:
If you are locked from login due to incorrect entries of username and password (for 30 min), find the file named “openenv.log” which you can find in a similar path given below:
C:\Users\sr\AppData\Local\Temp\ openenv.log
Open the file with any text editor program (Notepad), delete the content, save and restart XAMP and then try to access Open Enventory again (http://localhost/enventory/)
Below are some additional SQL commands that can give you some info that are not possible from inside Open Enventory
There are a lot more SQL commands in the following section:
Install phpMyAdmin (See )
Look up person_id
by going into [Database]/person
Show chemical borrow by that person (i.e. a person with person_id=8)
3. Return by:
Look up person_id
by going into [Database]/person
Show chemical owned by that person (i.e. a person with person_id=7)
3. Change, in this case, to no owner (NULL)
In the following example, show person_id
of user with username=julia
First choose the desired database on the tree folder from the left
Use:
Explain:
LIKE 'FH-2206%'
: show the storage_id
of the storage location with name starting with FH-2206
LIKE '%FH-2206%'
would mean find anything with storage name containing FH-2206
LIKE 'FH-2206%'
would mean find anything with storage name ending with FH-2206
Explain: the above command is used to
Select all of the chemical in the database that match: owner_person_id=15 AND with storage_id is NOT 18
Explain: see above for explanation of the criteria.
Explain:
GROUP BY storage_name
: is added so that duplicates are only shown once
Explain: the command above change responsible people to no one for all of the chemicals being owned by person_id=13 AND in all of the storage_id listed
The below command will search for all the barcode that is assigned to more than 1 container (chemical_storage). This search ignores disposed container as well as container without barcodes (chemical_storage_disabled IS NULL AND chemical_storage_barcode != ""
)
To select info from the list of duplicated barcodes. In this case, created by a specific user and created after some specific timestamp
WARNING!!! BE VERY CAREFUL BEFORE DOING THIS!
This will remove all of the containers, including info about manufactures, order date, barcode, owner, location, etc. However, info about molecule (MW, structures, safety, etc) and database related such as users will be reserved.
This is particularly helpful when you need to update a large amount of chemicals via text import.
Login into your server via ssh
Login into myswl using root account or user account with administrator priviledge for the database that you want to change. Replace “root” with the username if desired
3. Show database and then choose the database of interest. test
is the name of the database in this example
4. Remove the chemical container by running the following command
5. (Optional): Run the command below if you want to reset the id counter (chemical_storage_id
as well as autogenerated barcode)
6. Log out of mysql, restart httpd and mariadb services
7. Go back to OE website and import new tab-separated text file
Update (Oct 11, 2019): new function to delete multiple containers based on barcode has been added into Settings section. Only users with admin permission would see this option.
This should be run on the database of interest, table chemical_storage
chemical_storage_disabled is NULL
: to ignored disposed containers
This program is designed specifically for Open Enventory to fix issue with molecules missing structures (could not be extracted through "Read data from supplier")
Edit php.ini
file (/Applications/XAMPP/xamppfiles/etc/php.ini if you use XAMPP in MacOS)
Change:
to:
2. Restart server
This is optional but recommend for any site that requires user login
This specifically apply to:
CentOS 7
Follow the instruction in this website to install and enable ssl:
Ignore Step 3 in the tutorial above
2. Create /etc/httpd/conf.d/oe.conf
(same name as the folder contain Open Enventory, in this case /var/www/html/oe
)
In Terminal, type:
Add the content below:
All of these below info (highlighted in red can be change to match specific ip address as well as document location:
ServerName your_url.net
DocumentRoot /var/www/html/oe
Redirect permanent / https://romo.ddns.net/
2. Restart apache service, in Terminal:
This is optional but recommend for auto back up the OE database as well as the user’s info and password
This specifically apply to: CentOS 7 (Apache version: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.5.25 PHP version: 5.5.25 MySQL server version: 5.5.41-MariaDB)
Go into Terminal in your server and log in as root user (type: “su” and then password at the command line
Note: you can do the rest of the command lines below with prefix “sudo your-command-here” if you don’t want to log in as root
3. At the command line, type:
4. When the file is open, insert the following. Note: everything is red can be changed to match specific details. -$(date +\%Y\%m\%d): is used to set automatic date
5. More example of crontab can be read here:
This guide to use access_log to find out some high frequent access ip and then check them manually and form a block ip if necessary
Specifically, ssh into the server and then log in as root user
Use following command:
change “-20” to “-xx” with “xx” is the number of result. This is sort from most to least access request
Specifically using this command (after ssh into the server and then log in as root)
To list the IP sets known to firewalld in the permanent environment, use the following command as root:
3. To get more information about the IP set, use the following command as root: (in the example below, “test” is the name of ipsets you got from the above command
Or:
To see the extended entries list of the IP set, use the following command as root:
Follow this guide:
See these references:
See the following resources:
and are two fantastic VPS hosting.
This is for CentOS 7 on A2server
A2 hosting was chosen because of:
To make a script to delete files older than X days when there is less than XGB left, see this:
Rclone is used to automatically backup file toGoogle Drive account:
To back up the whole VPS, follow this:
Modified script as this:
danielromogroup.com and other sites on this server has been set up using /etc/httpd/conf.d/site.com.conf
To test your SSL for your site:
To strengthen your SSL connection:
Info:
HSTS Strict-Transport-Security:
OCSP Stapling: help with all SSL security connection a little faster:
We need to modify the httpd.conf
file:
In this file: after <Directory "/var/www/html">
, modify AllowOverride None
to AllowOverride Options
.
Save the file (hit Esc, type :wq
and then Enter)
Restart httpd service:
Creating Template:
DON’T FORGET TO OPEN PORT 7822 FOR SSH WHILE USING A2 SERVER
On current A2 hosting, the server config can be found in /etc/httpd/conf/httpd.conf
For CentOS, generate two #.conf files in /etc/httpd/conf.d/. For example: /etc/httpd/conf.d/site1.com.conf and /etc/httpd/conf.d/site2.com.conf. Each conf file is the apache set up for the site. Example of the content of site2.com.conf:
UpdraftPlus Plugin is used to back up WordPress. To restore Wordpress
Create a fresh install of wordpress as in the link above
Install Updraftplus plugin
Load the backup files
Restore
To use 1-click update on Wordpress, you need
Wordpress folder (in this case /var/www/html/baylorcpritlab.com) to be owned by apache:apache with 755 permission
To secure Wordpress, all folders inside the baylorcpritlab.com should have 755 persmission and all files should have 644 permission
Note: when change the info in the config.php file, make sure to change the:
Install password
User: to ‘root’
Password to ‘root_passowrd’
This program is designed specifically for Open Enventory to fix issue with molecule missing sds (could not be extracted through "Read data from supplier") This programs does:
If you find a blank page after clicking the check mark :
This will create n number of window for different styles of label when click on this Print Dymo Label
button (). Also, this code will close these pop-up windows automatically after 30 seconds (30000 miliseconds)
This will make this button () always show up even if the dymo plugin for browser is not detected.
For example, to change the MySQL/MariaDB root password from its default empty value to the password gue55me, you would execute:/Applications/XAMPP/bin/mysqladmin --user=root password "gue55me"
Set up sshpass to automatically pass the password. Note: this is not ultrasafe but it is simple. Check out this link: (only need to follow how to install, step 1)
Follow this: , first answer
4. Google any ip lookup website and check these IPs(e.g: ). If find any suspicious ones, you can add a rule to block those ip network address by the next step
Follow this guide:
Follow this guide:
Good and comprehensive:
Simple preservation of parent folder group owernship for all files newly created:
SSH set up:
SSH using keys:
Possible error while setting up ssh key:
Disable SSH login for root (recommended):
FTP:
SCP:
To monitor uptime for the server, use:
Install:
Configuration for Google Drive: or
Usage:
For Rclone filtering:
This is more options:
First: Make sure you have the your_site.com.conf file inside /etc/httpd/conf.d. Following the following website: ; For more elaborate see:
Optional, here is another way the step above can be set up (Note: this website set up a bit different than the one above, specifically, the above website use /etc/httpd/conf.d/ instead of /etc/httpd/sites-enabled):
This is a good installation for Certbot Let’sEncrypt (ignore the multiple certificate setting):
Using Certbot (Intro):
Doc:
Rate limit for Let’sEncrypt:
To read more about SSL:
Remove SSLv3 SSLv2:
Assinging password and require immediate pass change after log in:
Add Linux users to a group:
If forgot to open port 7822, follow this link:
Error that need to change packet size:
Setting up multiple Let’sEncrypt certificates for multiple hosts on the same server: (this is for Ubuntu)
After that use “/usr/local/sbin/certbot --apache -d example.com -d ” . The content of site2.com.conf file will be automatically changed. Here is example of the content of site2.com.conf after running the “certbot-auto…”
Read here for more info about a set up a conf file for SSL certificate:
Initial Install:
From A2:
WP security, from A2 hosting:
If there is issue after restore, check here first. A common issue is the rewrite link issue (Wordpress Permanet link), follow the solution in “Using ‘Pretty’ permalinks” in this link:
Optimizing WP, from A2 hosting: ;
Multiple sites (using WordPress) installation:
Moving Wordpress site(s):
Uninstall Wordpress:
Wordpress login trouble:
See here for official guide:
Also see:
Step #
Scan barcode
Explanation
1
Start config mode
2
Configurable Prefix Character #1 – A prefix ID can be added and assigned for data transmission. Use this code with a code byte sequence, on page 16–1, which represents the desired character.
3
Code Byte 1
4
Code Byte 7
5
Code Byte 5
6
Configurable Prefix Character #2 – Assigns a second configurable prefix character.
7
Code Byte 0
8
Code Byte 6
9
Code Byte 5
10
Stop config mode
You can quickly have a container (virtual machine) up and running Centos 7 and LAMP stack by using this Docker Image, see link below to download the docker image and quick instruction. If you have more questions, please feel free to contact KV.
In order to use this image, you need to:
1. Install Docker Community Edition (CE):
2. Go to this link and get the download link
OR download the docker image:
3. Follow the instruction in the Docker hub link above to get the container running
4. Download Open Enventory and put the content inside html
folder inside the project
folder created by following the instruction of the Docker image.
Below is info for changes that are made for OE in KV's github: https://github.com/khoivan88/open_enventory-modified_for_US
Add: option for borrowing of chemicals by users from outside of the group (guests)
Details: The idea is each group should have one ‘user’ account designated for external users (users from outside of the group, guests). When someone outside of the group comes and borrows a chemical containers, this account barcode should be scanned and following by the container barcode. This specific account (made by turning on a specific permission setting External borrow
in Predefined permission
) is set so that during checking out of a chemical container by this account, a pop-up window would open and ask for the specific info (borrower’s name, group, contact info, and the group member assisting during checkout). This info is then saved into the history entry of that exact checkout event.
To use this function:
Create a new user, some thing like ‘guests_<database_name>’ for example.
While creating this user, choose the following ‘External borrow’ in the ‘Predefined permissions’
3. Use this new account in the OE barcode terminal. During checkout, a popup window like this should open to ask for more info:
Add: Select2 javascript library to give users a customizable select box with support for searching, filtering. This change is for Inventory mode.
Change: allow username to be up to 32 character
Add yyyy-mm-dd date format for import chemicals from Excel file
Change to import function to take user input name as the default name of the new molecule (if the molecule does not yet exist)
Merge with Felix v2020-07-27. Noticeable changes include:
2020-07-27:
date format localized, depending on language of user
added missing suppliers, Sigma and Oakwood fixed
minor fixes
2020-07-13:
added the option to import experiments from https://sciflection.com. Read more about Sciflection
and to upload lab notebook entries including spectra - much better than just supporting info
optional: installation script, which will download and install the latest version on Ubuntu 20.04 LTS (and possibly other Linux distributions) from https://sciformation-demo.eu
minor fixes
Add ability to sort by 'order_date' in 'chemical_storage' table
Add ChemDraw JS into drawing tools for both Inventory and ELN. To use it:
You need to obtain the ChemDrawJS license from ChemDraw support. You should be able to obtain Chemdraw JS license if your department/institution has site license for ChemOffice Professional, according to this.
After you obtain the ChemDraw JS license file, rename it to "ChemDraw-JS-License.xml" if neccessary and put that file into chemdraw
folder
Turning on ChemDraw as your drawing tools by going into Settings > Personal settings > Molecule editing (for your own preference) or Settings > Global settings > Molecule editing (for your whole database setting) and change Structure drawing program and Structure drawing program for reactions.
Add function to extract currency when it is in front of the amount
Merge with Felix Rudolphi Official Release of OE-2020-05-03
Fix TCI scraping due to its new website
Fix: buttons size in Lab Notebook side
Fix: Ketcher window size in Inventory and ELN sides
Fix: bug preventing showing of "Print DYMO label" button (Reported by Gaël De Leener, PhD, Université libre de Bruxelles, Belgium. Thanks, Gaël!)
Fix "Reset" button in rxnSearch in ELN
Fix wrong Tooltip for some "Reset" buttons
Fix some English translation
Fix PHP7 Warning: count()
The following features are from Felix Rudolphi:
Fix: Ketcher 1.0 bug
Add: ChemDoodleWeb drawing 9.1.0 for both Inventory and ELN
Add: Ketcher 2.0 beta for both Inventory and ELN
Fix: typo cause PHP Warning "Illegal String offset"
Fix: error in "Import and Edit" chemical containers where it rejects containers without CAS and name even if barcode existed.
Fix for search by container barcode for customized barcode starts with '2'. Why: some users has reported in the case of customized chemical barcodes, for example '10001' or '11345' or '22069'. When searching using barcodes, all of those starts with '1' works fine but those starts with '2' don't return the correct result. This is because the automatically generated barcode by OE starts with '2' and in the code, all search query for barcode starts with '2' will be modified
Add "Import and Edit" and "Import Only" options in the Settings menu for admin roles.
"Import and Edit" option is similar to previous version of Import in which it allows admin users to import: chemical containers ("packages"), storages list, user list, and supplier offers. For chemical containers ("packages"), this function will check if the database has the chemicals based on provided barcode. If the barcode is not found, it will add new container. If the barcode is found, it will change the provided info for that container.
"Import Only": only allow importing of chemical containers AND it will NOT check for existing container.
Right now, this function will only turned on for MIT and Baylor University.
To add your own institution, you need:
Creating lib_customization.your-school-name.php
with your-school-name is short or abbreviation of your school name. Use lib_customization.mit.php
for an example
Add the following line inside lib_customization.your-school-name.php
after $default_g_settings["order_system"]="fundp";
:
Modify lib_global_settings.php
by:
Change this: define("customization",""); // Customization to use: f.e.: ".sample" for use of "lib_customization.sample.php", and "" for "lib_customization.php"
To: define("customization",".your-school-name"); // Customization to use: f.e.: ".sample" for use of "lib_customization.sample.php", and "" for "lib_customization.php"
. Notice there is a period (.) in front of "your-school-name".
Modify sidenav.php
by:
Right before this line: showSideLink(array("url" => "import_edit.php","text" => s("import_edit_tab_sep"), "target" => "mainpage", ));
. On this line: if (in_array($g_settings["customization"], array("baylor", "mit"), true)) {
add "your-school-name"
(the same as "your-school-name" set in lib_customization.your-school-name.php
) right at the end of the array list of institutions. For example:
Add support for importing/deleting from Excel files (both .xlsx and xls).
Add support for importing/deleting from csv (comma-separated text) files. Previously, only tab-separated text files are supported
Changed default criterion to "contains" instead of "is similar to" in Structure search
Made sidenav width resizeable for user that use Bootstrap4
Made sidenav width automatically expand in Structure search
Change format message in Terminal Mode to be more visible
Change 'User Guides' to direct to gitbook (https://open-enventory.gitbook.io/)
Storage barcode and person barcode columns in their respective setting pages
Option to shorten the criteria list in Simple search in Inventory
(developed for Baylor University)
Placeholder for input type date in edit mode with yyyy-mm-dd
Function to delete multiple containers via import text
User guides section
Added 'liters' and 'liter' to the list of recognizing units when importing text file
Updated ChemDoodle to ChemDoodleWeb Component v8.0.0
Upgraded Ketcher to v1.1-beta
Let the cursor default to be in 'Database' input field on login page,
fix for Firefox
Fixed bug where date are deleted in edit mode
Fixed Sigma-Aldrich cannot be accessed from A2 Hosting
Fixed changed location inside normal OE window does not record in History text
Added storage barcode for export functions
Added user barcode for export functions
Added show column for storage
Added show column for user
Fixed minor issue with "Disposed chemicals" list does not show correct view
Applied changes from official OE version 2019-07-24
Added date style to yyyy-mm-dd hh:mm:ss when display in OE so there is no confusion in date style
Added a new login page with mobile responsive
Modified sidenav, topnav to use Bootstrap4
Added option for admin user to turn Bootstrap 4 option on/off in global_settings
fixed bug in Terminal mode: barcodeTerminalAsync.php and lib_language_en.php
while doing inventory for a container (inventory mode or "Set storage for all following containers"), if you scan a non-existing barcode, the location will be removed. When a non-existent barcode is scanned, an error pop-up window appears.
modified History log text to add storage_name; also added History log text
when changing storage in edit mode (lib_db_manip.php, lib_db_manip_edit.php)
import.php, lib_import.php: added importing function for locations and users using tab-separated text file
lib_import.php: fix for importing chemical_storage_barcode bug.
When import tab-dilimited text file of chemical containers, if the barcode column is the last column, it will add white space or \n
character, making the barcodes inaccurate. The fix will trim all the white space \t\n
on the right side of the input column
topnav.php, style.css.php, lib_global_funcs.php, lib_sidenav_funcs.php sidenav.php: edited some fonts, styles
lib_language_en.php, sidenav.php, barcode_autogeneration.php:
Creating option for admin user to auto generate all location and user barcodes while using "Existing barcodes" functions
lib_db_manip.php: edit logging text to reflect chemical containers when
being moved from one location to another
multiple files: Fixed functions for php7 warning
Fixed "Set storage for all following containers" in Terminal
Added barcode Type 128 generation for user using existing barcode
import.php, lib_import.php: Fixed added order_date and open_date in Import tab-separated text file function
SETTING FOR BARCODE TERMINAL USER
To have a barcode terminal client (stand-alone computer), create a user with permission as below and log in into OE using this user.
To create a new user, please see the following link:
You can save link to this user as a bookmark for easy access, but less secure since the password is embedded in the address as below:
http://address/index.php?db_name=databasename&user=username&password=password&desired_action=login&lang=en&loginTarget=barcode_terminal
The following should be changed to your own setting: - adress: your Open Enventory web address - databasename - username - password
Keep in mind that the password for Terminal user will be exposed in your bookmark link above
This is for this scanner:
For OE original barcode, add Prefix ESC
For existing barcode, add Prefix: [l_shift_on]+[Home]+[l_shift_off]
Add "Import and Edit" and "Import Only" options in the Settings menu for admin roles.
This for KV's OE version on or later than March, 12, 2020.
You must have server access
"Import and Edit" option is similar to previous version of Import in which it allows admin users to import: chemical containers ("packages"), storages list, user list, and supplier offers. For chemical containers ("packages"), this function will check if the database has the chemicals based on provided barcode. If the barcode is not found, it will add new container. If the barcode is found, it will change the provided info for that container.
"Import Only": only allow importing of chemical containers AND it will NOT check for existing container.
Right now, this function will only turned on for MIT and Baylor University.
To add your own institution, you need:
Creating lib_customization.your-school-name.php
with your-school-name is short or abbreviation of your school name. Use lib_customization.mit.php
for an example
Add the following line inside lib_customization.your-school-name.php
after $default_g_settings["order_system"]="fundp";
:
Modify lib_global_settings.php
by:
Change this: define("customization",""); // Customization to use: f.e.: ".sample" for use of "lib_customization.sample.php", and "" for "lib_customization.php"
To: define("customization",".your-school-name"); // Customization to use: f.e.: ".sample" for use of "lib_customization.sample.php", and "" for "lib_customization.php"
. Notice there is a period (.) in front of "your-school-name".
Modify sidenav.php
by:
Right before this line: showSideLink(array("url" => "import_edit.php","text" => s("import_edit_tab_sep"), "target" => "mainpage", ));
. On this line: if (in_array($g_settings["customization"], array("baylor", "mit"), true)) {
add "your-school-name"
(the same as "your-school-name" set in lib_customization.your-school-name.php
) right at the end of the array list of institutions. For example: