Skip to content

Instantly share code, notes, and snippets.

@keithmorris
keithmorris / drive-format-ubuntu.md
Last active June 10, 2024 15:53
Partition, format, and mount a drive on Ubuntu
## GUAC INSTALL
yum update
yum install docker
systemctl start docker.service
docker run --name docker-postgres -v /some/path/on/host:/var/lib/postgresql/data -e POSTGRES_PASSWORD=PASSWORD_HERE -d postgres
docker run --rm glyptodon/guacamole /opt/guacamole/bin/initdb.sh --postgres > initdb.sql
docker run -it --link docker-postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'
# Enter your postgresql password from line 5
CREATE DATABASE guacamole_db;
\q