Overview
Senzing is delivered as a tar package intended to run on CentOS or RedHat 7.2 or higher and Debian based systems on x86_64 architecture. See System Requirements for up to date information.
The package can be extracted to any location, the default Senzing configuration is set to use /opt/senzing, extracting there will simplify initial setup and expedite getting started. See the notes at the bottom of this article for changing the default location.
Once the package is extracted, please review the LICENSE file. If there are any questions please contact us at support@senzing.com, otherwise if you agree to the terms continue on.
Supporting Media
Deployment Contents
The tar package will extract to a directory called g2 containing the following structure
- bin/: Executables for miscellaneous functions
- data/: Configuration data for the core Senzing engine libraries
- lib/: CoreSenzing engine libraries
- LICENSE: License the software is provided under
- NOTICES: 3rd party license information
- python/: Core python loading and reporting utilities that leverage the Senzing engine. Most of the work done will be in this directory tree
- README.1ST: Quickstart in text format with links to articles and help
- sdk: Samples and libraries for programmers
- setupEnv: Shell script that when sourced will setup the environment for the package to run
- sqldb/: Default SQLite database files for Senzing configuration and data stores
Installation Dependencies & Recommendations
You will need sudo access or help from your friendly system administrator to perform some of the installation requirements.
If an existing user id is not already identified or you will not be using your login user, create a new user (and group if required) for use with Senzing.
sudo useradd g2
sudo passwd g2
sudo usermod -aG <group_for_g2_user> g2
- This step is only required if you wish to add the new g2 user to an existing group
To use the default deployment path of /opt/senzing, create the path and change ownership to the user designated for Senzing, i.e., the g2 user if you created it above
sudo mkdir /opt/senzing
sudo chown g2:g2 /opt/senzing
CentOS or RedHat 7.2 or newer
sudo yum install -y python python-devel python-pip
- If you see the warning from yum 'No package python-pip available.'
sudo yum -y install epel-release
sudo yum -y install python-pip
- If you see the warning from yum 'No package python-pip available.'
sudo pip install psutil
Debian 9 or Ubuntu 16.04 (Only tested to these versions currently)
sudo apt install -y python python-dev python-pip
sudo pip install psutil
Depending on your system installation type and packages installed previously on your system, you may see errors during the install of python-pip. For Example, missing commands such as gcc. Use your distributions package installer as above to install any missing requirements e.g. sudo yum install gcc
Deploying Senzing
Firstly, obtain the Senzing API download ready to extract, ensure you are the user you will be running Senzing as and changed ownership of the /opt/senzing path to in the steps above.
su - g2
Next extract the Senzing API package
tar xvf Senzing_API.tgz -C /opt/senzing
Processing the Demo Data
Setup the environment
- Source the setupEnv script
cd /opt/senzing/g2
source setupEnv
To automatically source setupEnv when the user logs in modify the users .bashrc (or similar) file and append the following. Remember to logout/login or source your .bashrc (or similar) to pick up the changes!
#Senzing environment setup
source /opt/senzing/g2/setupEnv
Load the Data
- Change to the G2 python directory
cd /opt/senzing/g2/python
- Execute the G2 loader
python G2Loader.py -P
The G2 Loader will perform a brief load of the demo data and produce status information during the load and a summary once complete.
python > python G2Loader.py -P Loading /opt/senzing/g2/python/demo/sample/project.csv ****LICENSE**** Version: 1.1.18261 (2018-09-18) Customer: Type: EVAL Expiration: 2019-03-20 Records: 10000 Contract: *************** Purging G2 database ... -------------------------------------------------- Data source: PEOPLE, Format: CSV Loading /opt/senzing/g2/python/demo/sample/sample_person.csv ... dropping to single thread due to small file size Finishing up ... Statistics: good records .......... 4 bad records ........... 0 incomplete records .... 0 elapsed time .......... 0.1 minutes records per second .... 0 -------------------------------------------------- Data source: COMPANIES, Format: CSV Loading /opt/senzing/g2/python/demo/sample/sample_company.csv ... dropping to single thread due to small file size Finishing up ... Statistics: good records .......... 4 bad records ........... 0 incomplete records .... 0 elapsed time .......... 0.1 minutes records per second .... 0 Process completed successfully in 0.2 minutes python >
Consuming the Entity Resolved Data
After loading has completed you can start reviewing the resolved entity data:
NOTES
- If the package was extracted to anything other than /opt/senzing, edit the setupEnv file and change the SENZING_ROOT variable to the location the g2 directory was extracted to.
- If the package was extracted to anything other than /opt/senzing, edit the python/G2Module.ini and python/G2Project.ini files and change all occurrences of /opt/senzing/ to the location the g2 directory was extracted to.
- If the package was extracted to anything other than /opt/senzing, modify the above commands to point to the extracted location instead of /opt/senzing.
- If you used the -C flag on the tar command to extract directly to /opt/senzing and are using sudo for privileges to /opt/senzing, you will likely find the uid and group ownership set to 505:505 and the subsequent commands will fail. In this case change the ownership of /opt/senzing to your user/group, for example:
sudo chown -R g2:g2 /opt/senzing/g2
- See General File or Database Not Found Errors if you encounter any errors. If they are not covered here please contact us.
Comments
2 comments
On my RHEL machine, the following steps were needed as well, in order to install psutil
Thanks Adams, corrected. The next release will make this requirement optional.
Please sign in to leave a comment.