-
Notifications
You must be signed in to change notification settings - Fork 0
Installation with Ubuntu Server
Nathan Rowley-Smith edited this page May 9, 2021
·
6 revisions
Items in brackets () refers to a button you should click.
If you already have the VM installed go to step 14.
- Download Ubuntu Server 18.04.5 (should be a .iso file).
- Download Virtual Box.
- Create a new Ubuntu 64-bit Virtual-Machine in Virtual Box.
- New.
- (expert mode)
- Set name -> sufst.
- Type -> Linux.
- Version -> Ubuntu 64-bit.
- Memory size -> >=2048MB.
- Create a virtual hard disk.
- (create)
- File size -> >=10.00GB
- Hard disk file type -> VDI
- Storage on physical disk -> Dynmanically allocated.
- (create).
- Set the VM Network adapter.
- (Settings) on the new VM.
- (Network).
- Attached to -> Bridged Adapter.
- Name -> MAKE SURE IT IS YOUR LOCAL ADAPTER.
- (Start) the VM.
- (Select start-up disk) menu should appear.
- Chose the Ubuntu Server 18.04.5 .iso file downloaded in step 1.
- (Start)
- Go through the Ubuntu server install.
- Most screens are straightforward.
- Configure a guided storage layout -> Set up this disk as an LVM group.
- Profile setup -> Rest of the guide assumes you put
sufstfor all fields. - Install OpenSSH server -> Mark to install.
- The install of security updates may take a while...
- (Reboot) [will appear once all updates are complete].
- On reboot it will say
Please remove the installation medium.- [If you don't want to assign more CPU] Restart the VM [ON VM WINDOW TOP BAR (machine) -> (reset) -> (Reset)].
- [If you want to assign more CPU] Close the VM -> VM Settings -> System -> Processors -> <= 4 -> Start the VM.
- Wait for VM to start [Should be a screen that starts with
Ubuntu 18.04.5 LTS sufst tty1]. - If you know the VM IP Address skip this step, if not, follow below.
- Log in -> sufst (enter) sufst (enter)
- You should see the VM IP address in the top of the VM screen after you login.
- If you can't see the IP, run
sudo apt install net-toolsand runifconfig-> The VM IP will be under aninetsection on one of the adapters [should be e.g. 192.168.1.232]. - The adapter will be named e.g.
enp0s3[should be of a similar form but will be different on each VM].
- SSH into the VM.
- Open a terminal [IF ON WINDOWS -> I recommend using Windows Terminal which is available on the Windows Store]
-
ssh sufst@<IP>e.g.ssh sufst@192.168.1.232. - If prompted for
yes/nofor security then selectyes.
- Clone the latest version of the Back-End from Git.
- [In home directory] ->
git clone https://github.com/sufst/intermediate-server.git.
- [In home directory] ->
- Install Python.
sudo apt updatesudo apt install software-properties-common-
sudo add-apt-repository ppa:deadsnakes/ppa(enter) sudo apt update-
sudo apt install python3.7-> Y -
sudo apt install python3-pip-> Y -
sudo apt-get install python3-venv-> Y
- Set up a Virtual Environment for the Back-end.
- [Inside
/intermediate-serverfolder] ->python3 -m venv inter-server-venv
- [Inside
- Set up the intermediate-server python environment.
-
source inter-server-venv/bin/activate->(inter-server-venv)should now be right of the terminal user account. -
pip install wheel. -
pip install pipenv. -
pipenv install-> Should install all intermediate-server dependencies.
-
- Test the intermediate-server.
- [In the intermediate-server directory with inter-server-venv active] ->
python server.py. - The Licence should appear with no errors.
-
ctrl-c-> close the server.
- [In the intermediate-server directory with inter-server-venv active] ->
- Set up the backend intermediate-server service.
-
sudo touch /etc/systemd/system/intermediate-server.service. -
sudo nano /etc/systemd/system/intermediate-server.service. - Copy the following
-
[Unit]
Description=SUFST intermediate server service
After=network.target
[Service]
User=sufst
Group=www-data
WorkingDirectory=/home/sufst/intermediate-server
ExecStart=/home/sufst/intermediate-server/inter-server-venv/bin/python3 /home/sufst/intermediate-server/server.py
[Install]
WantedBy=multi-user.target
- Start the intermediate-server service.
-
sudo systemctl daemon-reload. 2sudo systemctl enable intermediate-server.service -
sudo systemctl start intermediate-server.service. sudo systemctl status intermediate-server.service- There should be no errors in the status of the intermediate-server service.
-
- You can now exit the Python venv using
deactivate