# Migration to jBASE: Preparing jBASE on Linux

Updated: 11/30/2021, 7:00:45 PM
Created: 11/30/2021, 7:00:45 PM
Last Updated By: Jake Tuttle
Read Time: 9 minute(s)

Tags: preparing minimal specs jbase conversion jbase migration linux

This is a step-by-step setup of a jBASE system on Linux, in preparation to converting from another multivalue database using jBASE migration tools.

# Preparing the jBASE System

Stage a server to run your converted application on jBASE.

# Minimal specifications

16 GB Memory Though jBASE will run the application with less, the conversion process will utilize the memory and run much more efficiently.
2 Processors A single processor will suffice, however the conversion process will run better with two. It is seldom recommended to use more than 4 in a VM.
2 File systems /dbms file system of at least 40GB.  Size is recommended to be twice that of your current system.  This  allows for growth and may vary according to you requirements.
/u file system of at least 40GB.  This file system would contain non-jBASE hashed files such as historical pdfs, ftp csv files,etc.

Load CentOS 7 or RedHat 7 on the server

# CheckList

Use this to be sure all steps are completed as documented.

# For all these steps, be sure to be logged in as root or sudo to the root shell prompt (#)

______ Update Centos / RedHat

______ Update host name of server

______ Disable SELinux and turn off firewall

______ Install latest jBASE with the installer

______ Set permissions and ownership of  /u and /dbms directory

______ Install and setup samba server

______ Update jbaseadm user .profile

______ Add user jbaseadm and group jbsudo to sudoers file

______ Alter cupsd.conf for cups

______ Update /etc/skel items for new users

______ Optionally change time zone setting

# SELinux

SELinux is a additional security layer that protects your system from attacks. It is recommended that SELinux be turned off or put into Permissive mode while doing your conversion. Permissive mode will make SELinux generate errors in your Logs where it would have stopped programs/services. It is recommended you have an understanding of Linux administration with SELinux before setting it to Active mode.

# Update CentOS/RedHat

yum -y update
yum -y upgrade
yum -y update
yum -y upgrade
1
2
3
4

# Update host name of server

Change the hostname of the template to reflect the server.  This is generally a simple name ending in jbase01

hostnamectl set-hostname _________jbase01
1

# Disable SELinux and turn off firewall

echo "SELINUX=disabled" > /etc/sysconfig/selinux
echo "SELINUXTYPE=targeted" >> /etc/sysconfig/selinux
systemctl stop firewalld
systemctl disable firewalld
1
2
3
4

# Install latest jBASE with the installer

Obtain the latest release of jBASE from the Zumasys web site and load it into a directory with enough space to hold the installer which is generally less than 50MB.

Run the installer with sh by simply typing sh and the name of the installer .bin

sh jBASE_Server_v5.7.1.21639_x64_Linux.bin
1

...program loads.

Press <Enter> to start the installation process or [C]ancel <Enter>
Company is registered <O>utside the EU, [W]ithin the EU or [C]ancel :O<Enter>
1
2

... License agreement...

To continue, type "YES" to accept the agreement, or "NO" to exit:YES<Enter>
[E]xpress : Install jBASE with typical options and services
[A]dvanced :  Select components to install and services to start
[C]ancel installation
Install type: E<Enter>
1
2
3
4
5

Take the defaults unless otherwise instructed.

License Keys
--------------------------------------------------------------------
[E]valuation license    :
[S]ystem license        :
[M]ulti-session license :
[W]eb session license   :

Enter license type to edit, or [N]ext or [C]ancel E<Enter> or S<Enter> if you have a permanent license
Enter evaluation license key: 6m9w6S... eval key ...8Wts4U4u<Enter>

Enter license type to edit, or [N]ext or [C]ancel N<Enter>
1
2
3
4
5
6
7
8
9
10
11
Installation Summary
-----------------------------------------------------------------------

Release directory : /opt/jbase/5.7.1
Symbolic link : /opt/jbase/CurrentVersion
Data directory        : /dbms
jBASE admin user      : zumasys
jBASE group           : jbase
SYSTEM file           : /dbms/SYSTEM     [will create]
JBASEADM account      : /dbms/JBASEADM   [will create]
Spooler directory     : /dbms/jspooler   [will initialize spooler]
Start jDLS            : Y
jRCS TCP Port         : 8236
Evaluation License    : aS1NwXGX+AMwpdHSQ53LtTmRipBQqvQy
Begin installation? ([Y]es/[N]o) :Y<Enter>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

The jBASE installer will check for needed packages and install those packages and the jBASE release.

# Set permissions and ownership of /u and /dbms file systems

chmod -R 770 /u
chmod -R 770 /dbms
chown -R jbaseadm:jbase /u
chown -R jbaseadm:jbase /dbms
1
2
3
4

# Install and setup samba server

This is used to share the pdf printer and simple open windows share for other files

# Install Samba package

yum -y install samba*
1

# Copy original samba configuration to the side and update

cp /etc/samba/smb.conf /etc/samba/smb.conf_orig
1

# Create new configuration file

vi /etc/samba/smb.conf
1

delete all original lines of the smb.conf and add the following:

[Global
disable netbios = yes
hosts allow = 0.0.0.0/0.0.0.0
security = user
guest account = root
map to guest = Bad User
log file = /var/log/samba/%m.log
max log size = 1024
[pdfs]
path = /dbms/pdfs
read only = no
guest ok = yes
guest only = yes
force create mode = 0777
force directory mode = 0777
[shared]
path = /dbms/winshared
read only = no
guest ok = yes
guest only = yes
force create mode = 0777
force directory mode = 0777
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# Enable and start the samba service

systemctl enable smb.service
systemctl start smb.service
1
2

# Use smbclient and test shares are okay

smbclient -L localhost
Enter root’s password:   <Enter>
1
2

Just press <Enter> at the password.  pdfs Disk and shared Disk should show in the list

# Update jbaseadm user .profile

rm -f /home/jbaseadm/.bash_profile   (Optional profile for bash shell only.   Not recommended)
echo . /dbms/profilesource/env_user > /home/jbaseadm/.profile
mkdir -m770 /dbms/profilesource
chown jbaseadm:jbase /dbms/profilesource
1
2
3
4

Add the /dbms/profilesource/env_user

#
### This is to be sourced into user profile
#
  HOME=/dbms/$MYACCT
  if [ ! -d "$HOME" ]; then
    echo "Warning... $HOME is not a valid directory"
    exit 1
  fi
#
### Add umask and stty for backspace and disable CTRL-D for exit
#
  umask 002
  export IGNOREEOF=999
  stty erase ^h susp ^- quit ^-
#
### jBASE Release
#
  if [ -z "$JBCRELEASEDIR" ];then
    if [ -d "/opt/jbase/CurrentVersion" ]; then
      JBCRELEASEDIR=/opt/jbase/CurrentVersion
    else
      echo echo '!!!! Warning... jBASE release not found'
      echo .
      read AnyKey
    fi
  fi
#
### Set jBASE base environment
#
  export JBCRELEASEDIR ;# Where is jBASE release
  export JBCGLOBALDIR=$JBCRELEASEDIR ;# Where is jBASE configuration
  export PATH=$PATH:$JBCRELEASEDIR/bin ;# Where are JBASE programs
  export LD_LIBRARY_PATH=$JBCRELEASEDIR/lib ;# Where are jBASE shared object
  export JEDIFILENAME_SYSTEM=/dbms/SYSTEM ;# Where are system accounts defined
  export JBCSPOOLERDIR=/dbms/jspooler ;# Where is the spooler based
#
### Set additional environment variables
#
  export JBCPORTNO=400-5000 ;# What port numbers to assign
  export JEDIENABLEQ2Q=1 ;# Allow Q-point to Q-point
  export Z_DISABLE_QUEUEING=1 ;# Multiple Z run in background
#
### Allow for "GLOBAL" programs / subroutines
#
  PATH=/dbms/bin:$PATH ;# Where are my GLOBAL programs
  JBCOBJECTLIST=/dbms/lib ;# Where are my GLOBAL subroutines
#
### Add Stack and set Prompt to show shelltype, account, userid and directory
#
  userid=`id -u -n`
  export JSH_PROMPT="$%s $%a $userid $%c -->",">>",jsh
  export JSH_COMMAND_STACK=USERNAME,150000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
chown jbaseadm:jbase /dbms/profilesource/env_user
1

# Add user jbaseadm and jbsudo group to sudoers file

Add group jbsudo

groupadd jbsudo
1

# Edit sudoers file and add jbaseadm user and jbsudo group

You will add the jbaseadm user to be the same as root in that in can run any command as super-user

jbsudo is added as a group with specific commands which can be run by anyone in that group without prompting for password

These two lines can be added anywhere in the file and you may want to put them at the very top

sudoedit /etc/sudoers
1
jbaseadm ALL=(ALL) ALL
%jbsudo ALL=NOPASSWD: /usr/local/bin/dojb5 ZL
1
2

in this case the specific command is the ZL program. You then add this group to the users that need it with -a -G group in usermod

usermod -a -G jbsudo user123
1

# Alter cupsd.conf to allow all users access and permission

vi /etc/cups/cupsd.conf
1

# Allow any IP access

Find “Listen localhost:631” and add comment them out.  Then add Port 631 line.

#Listen localhost:631
#Listen 192.168.99.252:631
Port 631<Enter>
1
2
3

# Allow any location access

Find “<Location />” and “<Location /admin>” parameters sections
<Location /> and <Location /admin>
Order allow,deny
Allow all<Enter>
</Location>
1
2
3
4
5

# Change retry policy to retry job if it fails

Find “</Policy>” and add this line after it to assure new printers retry-job if they fail

ErrorPolicy retry-job<Enter>
1

# Allow anyone to cancel any job

Change line from <Limit Cancel-Job CUPS-Authenticate-Job> to <Limit CUPS-Authenticate-Job>

# Restart the service

systemctl restart cups.service
1

# Update /etc/skel items for new users

Assuming this machines main purpose is jBASE and that most new users added will be added for this purpose, we can change the Linux skeleton for new users to setup those new users as a typical jBASE user

# Remove .bash_profile and add .profile item

cd /etc/skel
ls -la
total 28
drwxr-xr-x. 2 root root 71 Sep 10 10:47 .
drwxr-xr-x. 93 root root 8192 Feb 11 08:37 ..
-rw-r--r--. 1 root root 18 Sep 6 2017 .bash_logout
-rw-r--r--. 1 root root 231 Sep 6 2017 .bashrc
-rw-r--r--. 1 root root 172 Aug 2 2017 .kshrc
-rwxr-xr-x   1 root root  735 Sep 10 10:47 .bash_profile
rm -f /etc/skel/.bash_profile

Add /etc/skel/.profile
1
2
3
4
5
6
7
8
9
10
11
12

The first line is dot space /dbms/profilerouce/env_user and makes Linux use the env_user entered earlier as included script for this .profile The second line will LOGTO xxxx assuming xxxx is the account where users will want to begin.   LOGTO alone will prompt for the account name

vi /etc/skel/.profile
. /dbms/profilesource/env_user
exec LOGTO xxxx
1
2
3

# Setting up new users

useradd -c”User Name” -g jbase newuser
1

# Optionally change time zone setting

If the timezome is incorrect, you can change it to the correct one with timedatectl

timedatectl list-timezones  | grep America
America/Adak
America/Anchorage
America/Anguilla
America/Antigua
…
America/Vancouver
America/Whitehorse
America/Winnipeg
America/Yakutat
1
2
3
4
5
6
7
8
9
10

# Set timezone that is appropriate (e.g America/New_York)

timedatectl set-timezone America/New_York <Enter>
1

Back to Data Conversion