medal-data:system-setup
This is an old revision of the document!
Table of Contents
Setup of medAL-data System
Purpose and scope
In this document, you will learn how to perform the basic setup of the MainData System.
Requirements
- Server Linux =8gb ram
- Storage= 300 gb
- Operating System = ubuntu 18.04
Install Docker
- To update ubuntu server, type:
sudo apt update
- Install a few prerequisite packages which let apt use packages over HTTPS by typing:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
- Add the GPG key for the official Docker repository to your system by typing:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Add the Docker repository to APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
- Update the package database with the Docker packages from the newly added repository:
sudo apt update
- Make sure you are about to install from the Docker repository instead of the default Ubuntu repository:
apt-cache policy docker-ce
You will see an output like the following:
docker-ce: Installed: (none) Candidate: <version-number> Version table: <version-number> 500 500 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages
- Finally, install Docker:
sudo apt install docker-ce
- Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running:
sudo systemctl status docker
For more information, you can check on this site (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04)
Install Nginx
- Install nginx:
sudo apt install nginx
- Enable nginx in the firewall by typing:
sudo ufw allow 'Nginx Full'
Install Dokku
- Install dokku
wget https://raw.githubusercontent.com/dokku/dokku/v0.21.4/bootstrap.sh; sudo DOKKU_TAG=v0.21.4 bash bootstrap.sh
- Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings.
- Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure Dokku via the web admin.
Domain Setup
- On Your Server Terminal, set domain:
sudo domains:set medal-data {{domain}}
where domain is the domain for medAL-data.
Setting up letsencrypt with Dokku
- On your Server Terminal, install letsencrypt plugin with:
sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
- Install certificate with
sudo dokku letsencrypt medal-data
- Open your browser and test the system.
Creating an Admin
- On your server terminal, run:
sudo dokku run medal-data php artisan tinker
- Type
$user=new User;
for a new user object
- Type
$user->name=”{{user_name}}”;
for the ADMIN name
- Type
$user->email=”{{user_email}}”;
for the ADMIN email
- Type
$user->password=Hash::make(“{{user_password}}”);
for the ADMIN password
- Type
$user->syncRoles(“ADMIN”);
To make this user an admin
- Try to access the web and log in with this user in the system.
medal-data/system-setup.1642427867.txt.gz · Last modified: 2022/01/17 14:57 by arnaudpoletto