You can follow these steps to install software or hardware HSM on your Linux server. Please open a ticket for more help you need.
Step 1-Install Missing packages
#yum install rpm-build kernel-header* gcc
Step 2-Install RPMs
Please check your package and choose which one you need to install. If you need to install software HSM you should install "PTKcpsdk-5.0.0-8.x86_64". I'll show you how to install hardware HSM on this post. Also, I'll add software HSM installation at the last step.
#rpm -ivh PTKpcihsmK6-5.1.0-7.x86_64.rpm #/opt/safenet/protecttoolkit5/pcihsm2/driver/vkd-install.sh
You don't need to perform this step for software HSM. Just install this RPM for hardware HSM.
#rpm -ivh ETcpsdk-3.30.00-1.x86_64.rpm
Step 3-Create New Softlinks
#cd /opt/ETcpsdk/lib/linux-x86_64 # ls -lrt total 2820 -rw-r--r-- 1 root root 80098 Dec 7 2006 libutil.a -rwxr-xr-x 1 root root 126030 Dec 7 2006 liblogger.so -rw-r--r-- 1 root root 183038 Dec 7 2006 libkmlib.a -rwxr-xr-x 1 root root 142745 Dec 7 2006 libjcryptoki.so -rwxr-xr-x 1 root root 281564 Dec 7 2006 libjcprov.so -rw-r--r-- 1 root root 5618 Dec 7 2006 libhsmadmin.a -rwxr-xr-x 1 root root 6797 Dec 7 2006 libethsmstub.so -rw-r--r-- 1 root root 135568 Dec 7 2006 libctutil.a -rwxr-xr-x 1 root root 1312734 Dec 7 2006 libctsw.so -rwxr-xr-x 1 root root 406309 Dec 7 2006 libcthsm.so -rw-r--r-- 1 root root 69782 Dec 7 2006 libctextra.a -rw-r--r-- 1 root root 111534 Dec 7 2006 libcmlib.a lrwxrwxrwx 1 root root 45 Aug 19 00:05 libethsm.so -> /opt/ETcpsdk/lib/linux-x86_64/libethsmstub.so lrwxrwxrwx 1 root root 40 Aug 19 00:05 libcryptoki.so -> /opt/ETcpsdk/lib/linux-x86_64/libctsw.so #unlink libcryptoki.so #ln -sf /opt/ETcpsdk/lib/linux-x86_64/libctsw.so libcryptoki.so #cd /opt/safenet/protecttoolkit5/ptk/lib #ln -sf /opt/ETcpsdk/lib/linux-x86_64/libcthsm.so libcryptoki.so #cd /opt/safenet/protecttoolkit5/ptk/lib #ln -sf /opt/ETcpsdk/lib/linux-x86_64/libcthsm.so libcryptoki.so
4-Add LD libraries to your profile or pass it to step 5
#LD_LIBRARY_PATH=/opt/safenet/protecttoolkit5/ptk/lib/:/usr/local/lib:/usr/lib64:/opt/ETcpsdk/lib/linux-x86_64:/opt/ETcpsdk/lib/:/opt/Eracom/lib/ #export LD_LIBRARY_PATH
5-Add this source script to setenv script or bashrc.
How to add this script to bashrc file?
-Add this line to .bashrc file.
#source <path_to_setvars.sh> # cat /opt/safenet/protecttoolkit5/ptk/setvars.sh #!/bin/sh # ************************************************************************** # setvars - Setup PTK Environment # ************************************************************************** # # NOTE: Do not run this script directly. Source it or call it from your # startup script ( ~/.shrc, ~/.bashrc, etc) # # To globally enable this script, copy or link it to # /etc/profile.d/ptkrt.sh or your shell's equivalent # # ************************************************************************** if [ "a$(basename -- "$0")" = "asetvars.sh" ]; then echo "The PTK setvars script should not be executed directly." echo "Source it or call it from a startup script." fi export CPROVDIR=/opt/safenet/protecttoolkit5/ptk export PTKBIN=$CPROVDIR/bin:/opt/Eracom/bin/ export PTKLIB=$CPROVDIR/lib:/opt/Eracom/lib export PTKMAN=$CPROVDIR/man if [ -x /bin/grep ]; then GREPCOMMAND="/bin/grep" else GREPCOMMAND="grep" fi if ! echo $PATH | $GREPCOMMAND -q $PTKBIN; then export PATH=$PTKBIN:$PATH fi if ! echo $LD_LIBRARY_PATH | $GREPCOMMAND -q $PTKLIB; then export LD_LIBRARY_PATH=$PTKLIB:$LD_LIBRARY_PATH fi if ! echo $MANPATH | $GREPCOMMAND -q $PTKMAN; then export MANPATH=$PTKMAN:$MANPATH fi