software_setup
This is an old revision of the document!
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 freeglut3 screen wine32-development wine-development ntpdate apache2 php libapache2-mod-php php-mysqli p7zip-full libssl-dev libncurses5-dev debhelper autossh git net-tools python3-tk -y pip3 install numpy panads matplotlib
- Restart the apache service.
- Terminal
sudo service apache2 restart
- Move the required files onto the linux computer from:
- Terminal
rsync brewer@142.97.231.40:"/home/brewer/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 chmod 777 /bin/dosbox cp -r 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/linux sudo sh brewer_log_form_install_1.sh ; sh brewer_log_form_install_2.sh sudo chmod -R 775 /var/www/html/Brewer chmod 600 "/var/cache/BrewerLogForms/ftp/authentication/brewer_pk_priv.pem" chmod 777 /var/cache/BrewerLogForms -R
- Setup Samba user/password
- Terminal
sudo smbpasswd -a brewer
- Add the user brewer to the dialout group
- Terminal
sudo usermod -a -G dialout $USER
- Download year mover and creator script from the github (Request access from Reno.Sit@canada.ca if you do not have access.)
- Terminal
git clone https://<User>:<Token>@github.com/<User>/Brewer_setup.git mv Brewer_setup/creator.py ~/schedule_task/creator.py mv Brewer_setup/year_mover.py ~/schedule_task/year_mover.py mv Brewer_setup/program_exclude.txt ~/schedule_task/ mv Brewer_setup/brewer_restart.py ~/schedule_task/ mv Brewer_setup/brewer_restart.sh ~/schedule_task/ mv Brewer_setup/timelogger.py ~/schedule_task/ chmod +x ~/schedule_task/*.sh chmod +x ~/schedule_task/*.py sudo rm Brewer_setup/ -r
- 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 0-3,5-22 * * * /home/brewer/schedule_task/rsync.sh 15 4 * * * /home/brewer/schedule_task/rsync-all.sh 0 * * * * /var/cache/BrewerLogForms/ftp/scripts/brewer_log_forms_ftp.sh -b 0 0 * * * /var/cache/BrewerLogForms/updates/update_log_form.sh 0 0 * * 1 cd /var/www/html/Brewer/Forms/DB_Backup/; ./GenerateLocalCache.bat; 31 06,18 * * * /usr/bin/python3 /home/brewer/schedule_task/timelogger.py 45 * * * * python3 /home/brewer/schedule_task/brewer_restart.py
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/creator.py
- Type 5 and press enter, then type 1 and enter then type in vnc
- Type 5 and press enter, then type 1 and enter, then type in clock
- Setup samba via the creator.py (You must run this with sudo)
Setting up the brewer software
- Move the brewer folder (I.E. Br#026) into
- Terminal
/home/brews/
- Run the creator script
- Terminal
python3 ~/schedule_task/creator.py
- Pick option 1 and follow the instruction on the screen
- Pick option 2 to create the data transfer scripts
- Pick option 4 to config the dosbox config and follow the instruction on the screen
- Pick option 5 to setup the auto start script. Type as the script namebr###(where ### is the brewer serial number) to run the brewer script.
- Pick option 7 to setup the shortcuts creator
TO BE ADDED
sudo vi /etc/apache2/envvars
change the User and Group to brewer
run chmod 600 /var/cache/BrewerLogForms/ftp/authentication/brewer_pk_priv.pem
software_setup.1660566565.txt.gz ยท Last modified: 2022/08/15 12:29 by reno