funkwhale/docs/administrator/uninstall/quick-install.md

171 wiersze
3.7 KiB
Markdown
Czysty Zwykły widok Historia

2022-07-01 09:02:29 +00:00
# Uninstall using the quick install script
The Funkwhale quick install script doesn't currently offer an uninstall command. This is because you may be using its dependencies for other software. To uninstall a quick install Funkwhale installation, follow the instructions in this guide.
```{warning}
Removing Funkwhale data is __irreversible__. Make sure you [back up your data](../upgrade/backup.md).
2022-07-01 09:02:29 +00:00
```
```{contents}
:local:
:depth: 1
```
## Stop the Funkwhale server
Before you uninstall anything from your server, you need to stop the Funkwhale systemd services.
1. Stop all systemd services listed under the `funkwhale` target
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo systemctl stop funkwhale.target
```
2. Disable all systemd services to prevent launch at startup.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo systemctl disable funkwhale-server
sudo systemctl disable funkwhale-worker
sudo systemctl disable funkwhale-beat
```
3. Remove the service files.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo rm /etc/systemd/system/funkwhale-server.service
sudo rm /etc/systemd/system/funkwhale-worker.service
sudo rm /etc/systemd/system/funkwhale-beat.service
sudo rm /etc/systemd/system/funkwhale.target
```
4. Reload all services to pick up the changes.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo systemctl daemon-reload
sudo systemctl reset-failed
```
## Remove the reverse proxy
To stop serving Funkwhale from your web server, you need to remove your reverse proxy configuration.
2022-07-23 13:32:35 +00:00
::::{tab-set}
:::{tab-item} Nginx
:sync: nginx
2022-07-01 09:02:29 +00:00
1. Remove the configuration files from your web host.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo rm /etc/nginx/sites-enabled/funkwhale.conf
sudo rm /etc/nginx/sites-available/funkwhale.conf
sudo rm /etc/nginx/funkwhale_proxy.conf
```
2. Reload the web server.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo systemctl reload nginx
```
2022-07-23 13:32:35 +00:00
:::
2022-07-01 09:02:29 +00:00
2022-07-23 13:32:35 +00:00
:::{tab-item} Apache2
:sync: apache2
2022-07-01 09:02:29 +00:00
1. Remove the configuration files from your web host.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo rm /etc/apache2/sites-enabled/funkwhale.conf
sudo rm /etc/apache2/sites-available/funkwhale.conf
```
2. Reload the web server.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo service apache2 restart
```
2022-07-23 13:32:35 +00:00
:::
::::
2022-07-01 09:02:29 +00:00
## Remove the Funkwhale database
```{warning}
This action is __irreversible__. Make sure you have [backed up your data](../upgrade/backup.md) before proceeding.
2022-07-01 09:02:29 +00:00
```
Once you have stopped the Funkwhale services, you can remove the Funkwhale database.
1. Navigate to your Funkwhale directory.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
cd /srv/funkwhale
```
2. Delete the Funkwhale database.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo -u postgres psql -c 'DROP DATABASE funkwhale;'
```
3. Delete the Funkwhale user.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo -u postgres psql -c 'DROP USER funkwhale;'
```
## Delete the Funkwhale account
2022-07-01 09:02:29 +00:00
```{warning}
This action deletes the `/srv/funkwhale/` directory. Make sure you have [backed up any data](../upgrade/backup.md) you want to keep.
2022-07-01 09:02:29 +00:00
```
Once you have removed the database, you can delete the `funkwhale` user and all associated data.
2022-10-26 20:19:16 +00:00
```{code-block} sh
2022-07-01 09:02:29 +00:00
sudo userdel -r funkwhale
```
This deletes the `funkwhale` user and everything in their home directory (`/srv/funkwhale/`). If your content is hosted in an S3-compatible store, you need to delete this data separately.
## Uninstall dependencies
The quick install script installs the following dependencies on your server:
2022-07-23 13:32:35 +00:00
::::{tab-set}
:::{tab-item} Apt
:sync: apt
2022-07-01 09:02:29 +00:00
2022-10-26 20:19:16 +00:00
```{code-block} text
2022-07-01 09:02:29 +00:00
build-essential
curl
ffmpeg
libjpeg-dev
libmagic-dev
libpq-dev
postgresql-client
python3-dev
libldap2-dev
libsasl2-dev
make
```
2022-07-23 13:32:35 +00:00
:::
2022-07-01 09:02:29 +00:00
2022-07-23 13:32:35 +00:00
:::{tab-item} Python
:sync: python
2022-07-01 09:02:29 +00:00
```{literalinclude} ../../../api/pyproject.toml
:language: toml
:lines: 9-59
```
2022-07-23 13:32:35 +00:00
:::
::::
2022-07-01 09:02:29 +00:00
Uninstall any dependencies you don't need.