====== Setting up a Brewer on a New Computer ====== Note: For setting up a new brewer on an existing computer, skip to [[software_setup#setting_up_the_brewer_software|setting up the brewer software]] Code blocks will indicate whether it is a file or terminal. For files, modify the file so it reflects what it indicates. ... Terminal, enter the command into a terminal. ... ===== Setting up the computer ===== - Change the ntp server: ++...|Note: sudo or root access is required to edit this file. When using root command, you will be required to enter the user password.++ # 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.sudo systemctl restart systemd-timesyncd && timedatectl - Run an update and upgrade. sudo apt-get update && sudo apt-get upgrade -y - Install required applications/services. 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 - Add the fingerprint for exp-studies by connecting to it via ssh. ssh arqxozone@exp-studies.tor.ec.gc.ca Exit the ssh connection. exit - Restart the apache service. sudo service apache2 restart - Move the required files onto the linux computer from: 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. 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 formsudo /etc/init.d/apache2 reload cd brewer_log sudo sh brewer-logform-mitgrate.sh - Setup Samba user/password sudo smbpasswd -a brewer - Add the user %%brewer%% to the dialout groupsudo usermod -a -G dialout $USER - Setup the crontab. crontab -eAdd the following to the end of the 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 sudo crontab -e Add the following code into the crontab 0 20 * * * systemctl restart systemd-timesyncd.service - Setup the VNC, and the clock to auto start. Run the [[creator.py|creator script]] 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|creator.py]] (relaunch BrewerConfig.py with sudo) - Follow the prompts till the end. - Disable wayland 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 WaylandEnable=false sudo systemctl restart gdm3