mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-18 23:05:07 +01:00
MyST conversion
This commit is contained in:
@@ -5,8 +5,8 @@ This guide describes how to upgrade an existing Alliance Auth (AA) installation
|
||||
This guide shares many similarities with the Alliance Auth install guide, but it is targeted towards existing installs needing to update.
|
||||
|
||||
:::{note}
|
||||
This guide will upgrade the software components only but not change any data or configuration.
|
||||
```
|
||||
This guide will upgrade the software components only but not change any data or configuration.
|
||||
:::
|
||||
|
||||
## Install a new Python version
|
||||
|
||||
@@ -14,59 +14,67 @@ To run AA with a newer Python 3 version than your system's default you need to i
|
||||
|
||||
To install other Python versions than those included with your distribution, you need to add a new installation repository. Then you can install the specific Python 3 to your system.
|
||||
|
||||
Ubuntu 1804, 2004:
|
||||
:::{note}
|
||||
Ubuntu 2204 ships with Python 3.10 already
|
||||
```
|
||||
|
||||
```shell
|
||||
sudo add-apt-repository ppa:deadsnakes/ppa
|
||||
```
|
||||
|
||||
```shell
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
```shell
|
||||
sudo apt-get install python3.10 python3.10-dev python3.10-venv
|
||||
```
|
||||
|
||||
CentOS 7:
|
||||
We need to build Python from source
|
||||
:::
|
||||
|
||||
Centos Stream 8/9:
|
||||
:::{note}
|
||||
A Python 3.9 Package is available for Stream 8 and 9. You _may_ use this instead of building your own package. But our documentation will assume Python3.10 and you may need to substitute as neccessary
|
||||
sudo dnf install python39 python39-devel
|
||||
```
|
||||
A Python 3.9 Package is available for Stream 8 and 9. You _may_ use this instead of building your own package. But our documentation will assume Python3.11 and you may need to substitute as neccessary
|
||||
sudo dnf install python39 python39-devel
|
||||
:::
|
||||
|
||||
::::{tabs}
|
||||
:::{group-tab} Ubuntu 2004, 2204
|
||||
|
||||
```shell
|
||||
sudo add-apt-repository ppa:deadsnakes/ppa
|
||||
sudo apt-get update
|
||||
sudo apt-get install python3.11 python3.11-dev python3.11-venv
|
||||
```
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS 7
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
```
|
||||
|
||||
```shell
|
||||
sudo yum install gcc openssl-devel bzip2-devel libffi-devel wget
|
||||
```
|
||||
|
||||
```shell
|
||||
wget https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz
|
||||
```
|
||||
|
||||
```shell
|
||||
tar xvf Python-3.10.5.tgz
|
||||
```
|
||||
|
||||
```shell
|
||||
cd Python-3.10.5/
|
||||
```
|
||||
|
||||
```shell
|
||||
wget https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tgz
|
||||
tar xvf Python-3.11.5.tgz
|
||||
cd Python-3.11.5/
|
||||
./configure --enable-optimizations --enable-shared
|
||||
```
|
||||
|
||||
```shell
|
||||
sudo make altinstall
|
||||
```
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS Stream 8
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
sudo yum install gcc openssl-devel bzip2-devel libffi-devel wget
|
||||
wget https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tgz
|
||||
tar xvf Python-3.11.5.tgz
|
||||
cd Python-3.11.5/
|
||||
./configure --enable-optimizations --enable-shared
|
||||
sudo make altinstall
|
||||
```
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS Stream 9
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
sudo yum install gcc openssl-devel bzip2-devel libffi-devel wget
|
||||
wget https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tgz
|
||||
tar xvf Python-3.11.5.tgz
|
||||
cd Python-3.11.5/
|
||||
./configure --enable-optimizations --enable-shared
|
||||
sudo make altinstall
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
|
||||
## Preparing your venv
|
||||
|
||||
Before updating your venv it is important to make sure that your current installation is stable. Otherwise your new venv might not be consistent with your data, which might create problems.
|
||||
@@ -74,9 +82,10 @@ Before updating your venv it is important to make sure that your current install
|
||||
Start by navigating to your main project folder (the one that has `manage.py` in it). If you followed the default installation the path is: `/home/allianceserver/myauth`
|
||||
|
||||
:::{note}
|
||||
If you installed Alliance Auth under the allianceserver user, as reccommended. Remember to switch users for easier permission management::
|
||||
If you installed Alliance Auth under the allianceserver user, as reccommended. Remember to switch users for easier permission management::
|
||||
|
||||
sudo su allianceserver
|
||||
```bash
|
||||
sudo su allianceserver
|
||||
```
|
||||
|
||||
Activate your venv:
|
||||
@@ -134,6 +143,7 @@ python manage.py migrate
|
||||
```shell
|
||||
python manage.py collectstatic
|
||||
```
|
||||
|
||||
### Restart and final check
|
||||
|
||||
Do a final restart of your AA supervisors and make sure your installation is still running normally.
|
||||
@@ -166,10 +176,10 @@ At this point we recommend creating a list of the additional packages that you n
|
||||
- Additional tools you are using (e.g. flower, django-extensions)
|
||||
|
||||
:::{hint}
|
||||
While `requirements.txt` will contain a complete list of your packages, it will also contain many packages that are automatically installed as dependencies and don't need be manually reinstalled.
|
||||
While `requirements.txt` will contain a complete list of your packages, it will also contain many packages that are automatically installed as dependencies and don't need be manually reinstalled.
|
||||
:::
|
||||
:::{note}
|
||||
Some guide on the Internet will suggest to use use the requirements.txt file to recreate a venv. This is indeed possible, but only works if all packages can be installed from PyPI. Since most community apps are installed directly from repos this guide will not follow that approach.
|
||||
Some guide on the Internet will suggest to use use the requirements.txt file to recreate a venv. This is indeed possible, but only works if all packages can be installed from PyPI. Since most community apps are installed directly from repos this guide will not follow that approach.
|
||||
:::
|
||||
|
||||
Leave the venv and shutdown all AA services:
|
||||
@@ -190,10 +200,10 @@ mv /home/allianceserver/venv/auth /home/allianceserver/venv/auth_old
|
||||
|
||||
## Create your new venv
|
||||
|
||||
Now let's create our new venv with Python 3.10 and activate it:
|
||||
Now let's create our new venv with Python 3.11 and activate it:
|
||||
|
||||
```shell
|
||||
python3.10 -m venv /home/allianceserver/venv/auth
|
||||
python3.11 -m venv /home/allianceserver/venv/auth
|
||||
```
|
||||
|
||||
```shell
|
||||
|
||||
Reference in New Issue
Block a user