software_setup
Table of Contents
Setting up a Brewer on a New Computer
Note: For setting up a new brewer on an existing computer, skip to setting up the brewer software
Setting up the computer
- Change the ntp server: ...
- /etc/systemd/timesyncd.conf
# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # Entries in this file show the compile time defaults. # You can change settings by editing this file. # Defaults can be restored by simply deleting this file. # # See timesyncd.conf(5) for details. [Time] NTP=time.nrc.ca FallbackNTP=time.chu.nrc.ca #RootDistanceMaxSec=5 #PollIntervalMinSec=32 #PollIntervalMaxSec=2048
- Restart time service and sync the time.
- Terminal
sudo systemctl restart systemd-timesyncd && timedatectl
- Run an update and upgrade.
- Terminal
sudo apt-get update && sudo apt-get upgrade -y
- Install required applications/services.
- Terminal
sudo apt-get install x11vnc ssh libsdl1.2-dev automake autoconf python3-pip samba screen wine ntpdate apache2 php libapache2-mod-php php-mysqli p7zip-full libssl-dev libncurses5-dev debhelper autossh git net-tools python3-tk python3-numpy python3-pandas python3-matplotlib -y
- Restart the apache service.
- Terminal
sudo service apache2 restart
- Move the required files onto the linux computer from:
- Terminal
rsync cbsnet@cbsn.hiitravel.ca:"/home/cbsnet/brews/QMS/Software_Management/Software_Network_Support/Brewer_linux" . -rtvh cd "Brewer_linux"
- Move the files to the appropriate location.
- Terminal
sudo cp dosbox /bin/dosbox sudo mv icfb /bin/ sudo mv getbrew /bin/ sudo mv tailb /bin/ sudo chmod 777 /bin/dosbox sudo chmod 777 /bin/icfb sudo chmod 777 /bin/getbrew sudo chmod 777 /bin/tailb cp -r schedule_task ~/ rsync -rthv --delete -e "ssh -i "schedule_task/id_depot"" remsens_ext@depot.cmc.ec.gc.ca:/incoming/brewer_programs/schedule_task/ /home/brewer/schedule_task/ cp Desktop/* ~/Desktop/ -r mkdir ~/brews chmod 777 ~/brews
- Setup the log form
- Terminal
sudo /etc/init.d/apache2 reload cd brewer_log sudo sh brewer-logform-mitgrate.sh
- Setup Samba user/password
- Terminal
sudo smbpasswd -a brewer
- Add the user brewer to the dialout group
- Terminal
sudo usermod -a -G dialout $USER
- Setup the crontab.
- Terminal
crontab -e
Add the following to the end of the crontab.
- crontab
0 16 * * * /usr/bin/python3 /home/brewer/schedule_task/year_mover.py #25,55 * * * * /home/brewer/schedule_task/rsync.sh #15 4 * * * /home/brewer/schedule_task/rsync-program.sh #31 06,18 * * * /usr/bin/python3 /home/brewer/schedule_task/timelogger.py #45 * * * * python3 /home/brewer/schedule_task/brewer_restart.py #10,20,30,40,50,0 * * * * /home/brewer/schedule_task/bfileold.py 32 * * * * rsync -vhrult -e "ssh -i "/home/brewer/schedule_task/id_depot"" /home/brewer/dosbox_pidstat/ remsens_ext@depot.cmc.ec.gc.ca:/incoming/brewer/pidstat/ 4 20 * * * rsync -rthv --delete -e "ssh -i "/home/brewer/schedule_task/id_depot"" --exclude-from /home/brewer/schedule_task/schedule_task_exclude.txt remsens_ext@depot.cmc.ec.gc.ca:/incoming/brewer_programs/schedule_task/ /home/brewer/schedule_task/ 0,30 * * * * /var/www/html/Brewer/Forms/scripts/client/pull-cache.sh 0 0 * * * rsync -rthv --delete -e "ssh -i "/home/brewer/schedule_task/id_depot"" remsens_ext@depot.cmc.ec.gc.ca:/incoming/brewer_programs/Brewer_log/ /var/www/html/Brewer/Forms/ 0 * * * * /var/www/html/Brewer/Forms/scripts/client/push-logs.sh
Setup the root's crontab
- Terminal
sudo crontab -e
Add the following code into the crontab
- crontab
0 20 * * * systemctl restart systemd-timesyncd.service
- Setup the VNC, and the clock to auto start. Run the creator script
- Terminal
python3 ~/schedule_task/BrewerConfig.py
- Select 'Auto start script' button, then 'Add a new auto start script' then select 'vnc'
- Select 'Auto start script' button, then 'Add a new auto start script' then select 'clock'
- Setup samba via the creator.py (relaunch BrewerConfig.py with sudo)
- Follow the prompts till the end.
- Disable wayland
- /etc/gdm3/custom.conf
WaylandEnable=false
sudo systemctl restart gdm3
- Set http://localhost/Brewer/Forms/BrewerLogForm.php as the default home page for firefox.
- Set the computer sleep turn off display to Never
TO BE ADDED
sudo vi /etc/apache2/envvars
change the User and Group to brewer
Disable Wayland <webcode name=“Default” frameborder=0 width=100% scrolling=yes externalResources=“,” renderingMode=story >
- /etc/gdm3/custom.conf
WaylandEnable=false
- Terminal
sudo systemctl restart gdm3
software_setup.txt · Last modified: 2025/11/06 16:57 by reno
