sudo is unnecessary

This commit is contained in:
tavo-wasd 2024-05-28 20:12:24 -06:00
parent caaaa2cbef
commit f3a2300c27
2 changed files with 13 additions and 10 deletions

View file

@ -20,7 +20,7 @@ sudo apt-add-repository contrib non-free -y
### Non-free codecs & Microsoft Fonts
```shell
sudo apt install vlc libavcodec-extra ttf-mscorefonts-installer
sudo apt install vlc libavcodec-extra ttf-mscorefonts-installer -y
```
#### (Extra) Nvidia drivers
@ -34,7 +34,7 @@ sudo apt install nvidia-driver
```shell
sudo dpkg --add-architecture i386 # Add 32bit packages
sudo apt update # Apply changes
sudo apt install steam-installer
sudo apt install steam-installer -y
```
Enable Proton under Settings > Compatibility > Enable Steam Play for all other titles
@ -76,3 +76,5 @@ sudo locale-gen
You should restart your computer after applying this changes,
especially for flatpak and gpu drivers.
## Recommended software

View file

@ -7,8 +7,7 @@ apt install -y curl nginx python3-certbot-nginx postgresql php php-{fpm,bcmath,b
For some reason that installs apache2, remove it as we don't need it.
```shell
apt purge apache2
apt autoremove
apt purge apache2 -y ; apt autoremove -y
```
### Check PHP version...
@ -24,11 +23,13 @@ php -v | grep -o '[0-9].*(cli)' | cut -d '.' -f 1,2
```shell
systemctl enable --now postgresql
sudo -i -u postgres psql -c "CREATE USER nextcloud WITH PASSWORD 'DB_PASSWORD';"
sudo -i -u postgres psql -c "CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UTF8';"
sudo -i -u postgres psql -c "ALTER DATABASE nextcloud OWNER TO nextcloud;"
sudo -i -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;"
sudo -i -u postgres psql -c "GRANT ALL PRIVILEGES ON SCHEMA public TO nextcloud;"
su -l postgres
postgres$ psql -c "CREATE USER nextcloud WITH PASSWORD 'DB_PASSWORD';"
postgres$ psql -c "CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UTF8';"
postgres$ psql -c "ALTER DATABASE nextcloud OWNER TO nextcloud;"
postgres$ psql -c "GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;"
postgres$ psql -c "GRANT ALL PRIVILEGES ON SCHEMA public TO nextcloud;"
postgres$ exit
```
# Nginx configuration & cert
@ -36,10 +37,10 @@ I modified this config to be easily set up with SSL via certbot,
but you can visit the following url for the official example:
[Nextcloud's nginx example configuration](https://docs.nextcloud.com/server/19/admin_manual/installation/nginx.html).
```shell
certbot certonly --nginx --register-unsafely-without-email --agree-tos -d YOURDOMAIN
curl -L nextcloud-nginx.tavo.one | sed "s/cloud.example.com/YOURDOMAIN/g" | tee /etc/nginx/sites-available/nextcloud.conf
ln -s /etc/nginx/sites-available/nextcloud.conf /etc/nginx/sites-enabled/
systemctl restart nginx
certbot -d YOURDOMAIN --nginx --register-unsafely-without-email --agree-tos
```
# Download & extract latest nextcloud