Copy CONTROL
Rsync from sam ccstandard to new server's ccstandard (do this from sam)
rsync --delete -avkz /u/ccstandard/ root@<new_server>:/u/ccstandard/
on the new machine
mkdir /u/ccr.<release_no> cd /u/ccr.<release_no> rsync -av /u/ccstandard/ ./
Create a new environment:
mkdir /u/cc<companyname>
cd /u/cc<companyname>
rsync -av /u/ccr.<release_no>/{adm,binl,binx11,LOG,overlay,usr} ./
ln -s /u/ccr.<release_no>/{env,lang_ts,lib,manual,pixmap,standard,std} ./Set up a new company
export CCDIR=/u/cc<companyname> export NODEID=vnc:5 cp -a standard <COMPANYNAME> cd ln -s `which coaad` contrl ./contrl
Clone the "standard" company to <COMPANYNAME> (make sure COMPANYNAME is in all caps, and 8 characters or less)
<insert screen cap of company file maintenance here>
Don't forget to delete your link
rm ./contrl
Then go to your company:
conset -c <COMPANYNAME>
Need to find out why gorel and other utilities don't work at this point. In the meantime just run
export CCDIR=/u/cc<companyname> . /u/cc/usr/commonx11.sh
Adding new session:
Add a Linux user and set their password
Important: do not create <session_name> to be the same as one of the locations. If you need to, add a number at the end. Instead of calling session_name "stafford", call it "stafford1" as there are programs that will automatically create employees with same name as a location.
adduser -b ${CCDIR}/usr -m <session_name> -G sftpusers
mkdir -p /sftp/<session_name>/<session_name>
chmod 755 /sftp/<session_name>
passwd <session_name>Add this to /etc/fstab:
/u/cc/usr/<session_name> /sftp/<session_name>/<session_name> none bind
Then mount it.
mount -a
Edit the file /u/cc/usr/vncusers.sh and add a line
USER[<USER_NUMBER>]='<session_name>' RESO[<USER_NUMBER>]='800x600' HOST[<USER_NUMBER>]='<hostname>'
<USER_NUMBER> is a vnc session number, for now keep this between 6 and 100. 5 is the screen we use for support.
The 'RESO' line is optional, if you leave it out, it defaults to 1600x900
The 'HOST' line is optional, if you specify something it will put this on the session name when they connect via VNC. If not, it leaves it blank. This is so that when binarylane assigns a strange hostname it is easy to hide it from the end users.
Start up the vnc session manually:
initctl start turbo VNC=<USER_NUMBER>
Use a VNC client to connect to <ip_address_of_server>:<USER_NUMBER>. Initial password is set to "123456"
If the menu is on top, go to System->Log out <session_name>, then click OK. If the screen saver has started, unlock it with the linux password and log out. This will move the menus to the bottom of the screen and disable the screen saver.
Create terminal record and change the VNC password:
Open a terminal inside the session:
vi .vnc/xstartup.turbovnc
Insert the export CCDIR command under the 2 "unset" commands
unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS export CCDIR=/u/cc<companyname> export NODEID=vnc:`echo $DISPLAY|cut -d\: -f2` export GTK2_RC_FILES="/etc/gtk-2.0/gtkrc"
Run ccusers to create the new terminal.:
ccusers
Choose terminal type 14, and if it asks you to press "cancel" use Ctrl-A as F1 won't likely be working.
conset -c <COMPANY_NAME>
/opt/TurboVNC/bin/vncpasswd
Edit the file /etc/init/start-xvncs.conf and add the number to the string ACTIVE_VNCSCREENS
env ACTIVE_VNCSCREENS="5 6 7 8 9 10 11 12"
This is to make sure the session will auto startup if the server was restarted.
create guacamole account:
in the web page http://<ip address>:8080/guacamole, log in as guacadmin
click on the guacadmin on the upper right then click on settings
click on connections
click on New Connection
Name: <session_name> Maximum number of connections: 5 Maximum number of connections per user: 5 Hostname: localhost Port: <5900+USER_NUMBER> Password: <vnc_password> Enable SFTP: <Tick> Hostname: localhost Port: 22 Username: <session_name> Password: <Linux_password> Default upload directory: /<session_name>
and then click Save.
Click on Users
Click on Add New User
Username: <session_name> Password: <set up a password for end user> Re-enter Password: same as Password Change own password: <tick>
Connections:
tick on <session_name>
Post Control Installation Options
Backups
- backups should be set up in the hosting provider's control panel. Typical would be:
Take daily backups, stored for 2 days Take weekly backups, stored for 2 weeks Do not take a monthly backup.
Restoring a backup is as simple as deploying a new VM. First, if you don't already have one, you need to set up a new VM with the same or more storage space available. There is no need to install an OS on it. Then, on the web control panel for your particular VM, click on the "Last Backup" link under "Disk" at the bottom. Select which backup you want to restore from and click "Clone from Selected". You will be given a list of VM's you will clone to. THIS VM WILL BE COMPLETELY WIPED. DO NOT CHOOSE THE WRONG VM.
Scheduled processes
Have to change <CCDIR>/binx11/{clrdayqty,post_sum,auto_eom,auto_postal} so that:
export CCDIR=<CCDIR>
also make sure the following NODEID's exist and are conset to an existing company:
POSTING, BACKUP, AUTO_EOM
crontab
setup auto_postal, eom_job, initda/backups and other scripts that need to run automatically.
For ccc:
* * * * * <CCDIR>/binx11/auto_postal 2>&1 > /u/cc/LOG/auto_postal.out 1 0 1 * * <CCDIR>/binx11/auto_eom >/u/cc/LOG/auto_eom 2>&1 10 0 * * * <CCDIR>/binx11/post_sum > /u/cc/LOG/post_sum 2>&1 0 22 * * * <CCDIR>/binx11/clrdayqty > /cc/LOG/clrdayqty.out 2>&1
For root:
30 2 * * * /u/cc/binl/netchecktime > /u/cc/LOG/netchecktime.out 2>&1 # Initialise dayfile. Only needed if not using our backup script #0 3 * * * /u/cc/binl/initda -s > /u/cc/LOG/initda.out 2>&1
Background tasks
If your binarylane VM starts acting up
Restore to new VM
If your binarylane VM starts acting up (drops packets, everything is slow) this might be a hardware related issue. Immediately fire up a new VM with the same specs as original and immediately deploy from last backup (see restoring above). Once complete, don't forget to change the following:
copy up to date data. On new host:
sync -avxz root@<old_host_ip>:/u/ /u/hostname -> /etc/sysconfig/network
- Point customer DNS (CNAME) to new hostname.
Don't do any of the following yet.
Make console (DISPLAY=0) a VNC server
Edit /etc/X11/xorg.conf
Section "Module"
Load "vnc" # Add this line
EndSection
Section "Screen"
Option "PasswordFile" "/u/cc/usr/ccc/.vnc/passwd" # Add this line
EndSection
Installing FVWM
Post Control Installation Options
Backups
cocont option Days before display system warning mesg should be set to 30. This allows the client to have at least one system backup to restore various configuration system configuration files in the event of a failure.
Enter the Linux device into cocont's Backup device field.
Scheduled processes
Enter the company code in the script /cc/binl/clrdayqty . crontabsetup auto_postal, eom_job, initda/backups and other scripts that need to run automatically.
For ccc:
* * * * * <CCDIR>/binl/auto_postal 2>&1 > /u/cc/LOG/auto_postal.out 1 0 1 * * <CCDIR>/binl/auto_eom >/u/cc/LOG/auto_eom 2>&1 59 23 * * * <CCDIR>/binl/auto_signoff > /u/cc/LOG/auto_signoff 2>&1 10 0 * * * <CCDIR>/binl/post_sum > /u/cc/LOG/post_sum 2>&1 0 22 * * * <CCDIR>/binl/clrdayqty > /cc/LOG/clrdayqty.out 2>&1
For root:
30 2 * * * /u/cc/binl/netchecktime > /u/cc/LOG/netchecktime.out 2>&1 # The daily backup script 0 3 * * * /u/cc/binl/bacint -s > /u/cc/LOG/bacint.out 2>&1 # Initialise dayfile. Only needed if not using our backup script #0 3 * * * /u/cc/binl/initda -s > /u/cc/LOG/initda.out 2>&1
Background tasks
You will need to edit /etc/inittab:
id:5:initdefault: # Need to change run level from 3 to 5 v5:345:respawn:su - ccc -c /usr/local/bin/inittab_vnc 2>&1 >> /var/log/vnc.ccc
Customer Company
coaad Setup the company record(s) for the customer.
Ensure that the /u/cc/<CUSTOMER> directory exists and is a copy of standard. Also make sure that the correct amount of users and locations have been set.
Enter the customer's company name into cocont's Company codes to be backed up field.
Printers, Overlays and Docket Logos
You will need to get the customer's logo and artwork from the sales team.
To create a docket logo, see Docket_Logo.
For a list of compatible laser printers, seeLaser_Printers.
For setting up printers, see InstallingPrinter.
Data Imports
- Run any data imports necessary.
Setting up a DEMO company in a server
Follow DemoCD under Linux steps 1-14 for the DEMO company and additional companies as needed.
Describe Installing_Control here.
