Browse Source

Update install_rpi.md

pull/5/head
Per-Arne Andersen 5 years ago
committed by GitHub
parent
commit
f483a36ce9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 54
      docs/install_rpi.md

54
docs/install_rpi.md

@ -1,20 +1,31 @@
# Installation for raspberry-pi 4 # Installation for raspberry-pi 4
These instructions are untested, and should be verified by someone. Please create a ticket :) These instructions are untested, and should be verified by someone. Please create a ticket :)
### 1. Install dependencies
```
sudo apt-get update && sudo apt-get install git python3 python3-pip
```
### 2. Setup required environment variables ## 1. Setup required environment variables
``` ```
export <ENV> <VALUE> export <ENV> <VALUE>
``` ```
Make it permanent with putting it in bashrc Make it permanent with putting it in bashrc
Refer to the list in the main readme file. Refer to the list in the main readme file.
### 2. Installing wireguard ## 2. Install Depedencies
```
sudo apt-get update && sudo apt-get install git python3 python3-pip python3-venv -y
```
### Node.JS
```
curl -sL https://deb.nodesource.com/setup_13.x | sudo bash -
sudo apt-get install -y nodejs
```
### WireGuard: Ubuntu
```
sudo add-apt-repository ppa:wireguard/wireguard -y
sudo apt install wireguard wireguard-tools -y
```
### WireGuard: Debian/RPI
``` ```
# Get signing keys to verify the new packages, otherwise they will not install # Get signing keys to verify the new packages, otherwise they will not install
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
@ -26,27 +37,30 @@ sudo apt update
sudo apt install wireguard wireguard-tools -y sudo apt install wireguard wireguard-tools -y
``` ```
### 3. Installing node.js ## 3. Building front-end
```
curl -sL https://deb.nodesource.com/setup_13.x | sudo bash -
sudo apt-get install -y nodejs
```
### 3. Installing
``` ```
# Building frontend # Building frontend
sudo git clone https://github.com/perara/wireguard-manager.git /opt/wireguard-manager sudo git clone https://github.com/perara/wireguard-manager.git /opt/wireguard-manager
cd /opt/wireguard-manager/wg_dashboard_frontend cd /opt/wireguard-manager/wg_dashboard_frontend
sudo npm install > /dev/null || sudo npm install @angular/cli > /dev/null sudo npm install > /dev/null && sudo npm install @angular/cli > /dev/null
sudo ng build --configuration="production" > /dev/null sudo node_modules/@angular/cli/bin/ng build --configuration="production" > /dev/null
```
## 4. Setup back-end
```
sudo mv dist ../wg_dashboard_backend/build sudo mv dist ../wg_dashboard_backend/build
cd ../wg_dashboard_backend/ cd ../wg_dashboard_backend/
sudo python3 -m venv venv && source venv/bin/activate sudo python3 -m venv venv && source venv/bin/activate
sudo pip install -r requirements.txt pip install -r requirements.txt
sudo pip install uvicorn pip install uvicorn
sudo uvicorn main:app uvicorn main:app --host=0.0.0.0
```
## 5. Complete
You should now see the following
```
#INFO: Started server process [259296] #INFO: Started server process [259296]
#INFO: Waiting for application startup. #INFO: Waiting for application startup.
#INFO: Application startup complete. #INFO: Application startup complete.
``` #INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
```

Loading…
Cancel
Save