User Tools

Site Tools


howtos:admin:setup_server_from_scratch

Setup whatIf? Servers

✅ CONTENT MIGRATED TO GURU ON FEBRUARY 22, 2024

Services to install

  • inet deamon to support the whatif deamon for responding to the client software requests
  • samba for allowing drive mapping to the server
    • Is it installed? look in /etc/init.d and saw the smb script there.
    • start it as follows:
/etc/init.d/smb start 
  • configure it: So it's up and running now but we'll need to set up the config file which means deciding which users we want to configure on it. Let me know when you want to discuss.

Directories

Under the mount point(s) make directories whatif, users, models (owned by root:root with permissions 755). They can be kept on different mount points.

Make symbolic links from the file system root (ie /) to each of these directories

Make sure /tmp has a significant amount of disk space. Start with 10G but if the objects in your model are large and you run out of memory while running this may need to be increased.

Server Accounts

As root make server accounts: whatif, samm, tool with the following features:

  • Make whatif first and let it create it's own group
  • Make samm and tool and make them members of the whatif group
  • The home directories are under /whatif
  • The permissions should be 775
  • Get the .cshrc and .login scripts for that account and put them in the root of that account

Install severs

  • Get the latest and greatest from the web for samm, whatif, and tool and save them temporarily on your computer
  • Get the install scripts too!
  • Use winscp to put them in the correct accounts on the machines (note password for tool,samm,whatif same as root by default or may have been reset)
    • Make sure to remove any other files that end in .tar.gz or at least move them to a sub directory.
  • Run the install*.csh scripts for each of samm, whatif, and tool
    • For example tool, login to the server using putty as tool and run
csh installtool.csh

Configure the inet daemon (linux)

This process is for linux

  • There will be a file available with your whatif server downloads called whatif_inetConf
  • As root copy and rename the whatif_inetConf file to /etc/xinetd.d/whatif the file looks like the following
    • Check the service name on the firts line and the path on the server = line
service whatif
{
        socket_type     = stream
        wait            = no
        user            = root
        server          = /whatif/whatif/progs/whatif
        log_on_failure  += USERID
        disable         = no
        cps             = 1000 30
}
  • Update the /etc/services file and add: (NOTE if 8000 is already taken choose another port number that is free preferably in the 8000's or 9000's)
 whatif          8000/tcp                        # whatif services 
  • Restart the inet deamon by doing
/etc/init.d/xinetd restart

NOTE on older versions of linux like the VM ware images which are fedora 4 you may need to hang up the inet deamon process instead

ps -ea | grep xinet
-- get the pid and run
kill -SIGHUP <pid>

Configure the inet daemon (solaris2)

This process is for solaris2 which is similar to linux:

Change the services file here: /etc/inet/services adding a line like:

whatif          8000/tcp                        # whatif services

Change this file: /etc/inet/services/inetd.conf adding a line like:

whatif  stream  tcp     nowait  root    /whatif/whatif/progs/whatif       whatif

and restart inetd:

/usr/bin/pkill -HUP inetd

Setup error reporting and nightly cleanup

backups

It's important that the server get backed up regularly. All the model, and user accounts as well as the samm, whatif and tool account must be backed up.

checkMB

This runs the whatIf? model base checker which cleans the model base and makes sure it is in a consistent state. We recommend setting up a cron job to run nightly which emails the report to your admin.

Make a text file on your windows machine called crontab.txt that looks like the following but adjusted for your site:

0 3 * * * /whatif/samm/progs/checkMB -force <your MB name> | /usr/bin/Mail -s "checkMB report for `hostname`" <email address of admin>

Use winSCP to put move crontab.txt into the home directory for the samm account

Login with putty to the server as samm and run:

crontab crontab.txt

Check for mailing capabilities Ask your IT department to enable the server to send mail so that you will get the emails from the above command

cleanWhatifAll

This process kills all left over processes that might have gotten hung during the day. It is also a cronjob but it is run by root. You may need your IT department to set this up for you since you may not have the ability to login as root.

Make a text file on your windows machine called crontabRoot.txt that looks like the following but adjusted for your site:

0 4 * * *  /whatif/whatif/progs/cleanWhatifAll

Use winSCP to put move crontabRoot.txt into the home directory for the root account

Login with putty to the server as root and run:

crontab crontabRoot.txt

Trouble shooting whatif deamon and running SAMM

If you can login with samm as user say modelExample then do the followig

check the whatif deamon:

use a ssh connection like:

 ssh -p 8000 whatif@iseee 

then with a putty session on the server iseee do

 ps -ea | grep whatif 

If there is a process then it's fine if not then the whatif service is likely not properly configured.

check the permissions on /tmp:

The whatif deamon and samm will try to write to /tmp

Check the permissions on /tmp they should be:

 drwxrwxrwt.  12 root root 20480 May 13 22:31 tmp 

if they aren't use this command to make them so

 chmod 1777 tmp 
howtos/admin/setup_server_from_scratch.txt · Last modified: 2024/02/22 18:30 by marcus.williams