mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Revise install instructions (+ install Java 11 everywhere, and update pyenv to use Python 3.8.3) (#3847)
* Use `openjdk-r` ppa for Ubuntu 16.04 * Don't add `deadsnakes` ppa for Ubuntu 20.04 * Use Java 11 for Arch Linux * Update getting started guide to recommend Ubuntu 20.04 over 18 * Use Java 11 for Fedora Linux * Use Java 11 for openSUSE Tumbleweed * remove unneded `-u` for ubuntu 20.04 and 18.04 * use `openjdk-11-jre-headless` in all ubuntus * use headless jre everywhere * add non interactive flag to zypper calls * Add emphasis on info about pyenv's warning * reverse order of Ubuntu LTS versions * Install Git 2.11+ with `yum replace` on CentOS/RHEL 7 * Add `--gpg-auto-import-keys` flag to non-interactive `zypper ar` usage * update pyenv instructions to use Python 3.8.3 * Install git after installing everything else in CentOS 7 instructions * use zypper flags properly * improve the sentence a little * I like consistency * add missing `sudo`s in CentOS instructions * add tk-devel to CentOS instructions per pyenv's recommendations * Install gcc 8 from SCL in CentOS 7 * use git222 instead of git2u on CentOS 7 * Add missing `source ~/.bashrc` line * use git224 instead of git222 on CentOS 7 * use yum swap over yum-plugin-replace in CentOS 7
This commit is contained in:
parent
74b209bcc8
commit
cf6966058e
@ -270,7 +270,7 @@ If you want to do it, follow these steps.
|
||||
2. **Install Linux**
|
||||
|
||||
Most of the VPS providers have tools for installing Linux automatically. If
|
||||
you're a beginner, we recommend **Ubuntu 18**.
|
||||
you're a beginner, we recommend **Ubuntu 20.04 LTS**.
|
||||
|
||||
For Raspberry Pi users, just install `Raspbian
|
||||
<https://www.raspberrypi.org/downloads/raspbian/>`_ on a micro-SD card.
|
||||
|
||||
@ -43,14 +43,14 @@ Arch Linux
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo pacman -Syu python python-pip git jre-openjdk-headless base-devel
|
||||
sudo pacman -Syu python python-pip git jre11-openjdk-headless base-devel
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
----
|
||||
|
||||
.. _install-centos:
|
||||
.. _install-rhel:
|
||||
.. _install-centos7:
|
||||
.. _install-rhel7:
|
||||
|
||||
~~~~~~~~~~~~~~~~~
|
||||
CentOS and RHEL 7
|
||||
@ -58,17 +58,27 @@ CentOS and RHEL 7
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
yum -y groupinstall development
|
||||
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
||||
sudo yum -y groupinstall development
|
||||
sudo yum -y install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel \
|
||||
openssl-devel xz xz-devel libffi-devel findutils git2u java-11-openjdk
|
||||
openssl-devel xz xz-devel tk-devel libffi-devel findutils java-11-openjdk-headless
|
||||
sudo yum -y install centos-release-scl
|
||||
sudo yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++
|
||||
echo "source scl_source enable devtoolset-8" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
In order to install Git 2.11 or greater, we recommend adding the IUS repository:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo yum -y install https://repo.ius.io/ius-release-el7.rpm
|
||||
sudo yum -y swap git git224
|
||||
|
||||
Complete the rest of the installation by `installing Python 3.8 with pyenv <install-python-pyenv>`.
|
||||
|
||||
----
|
||||
|
||||
.. _install-centos8:
|
||||
.. _install-rhel8:
|
||||
.. _install-centos:
|
||||
.. _install-rhel:
|
||||
|
||||
~~~~~~~~~~~~~~~~~
|
||||
CentOS and RHEL 8
|
||||
@ -76,12 +86,12 @@ CentOS and RHEL 8
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
yum -y install epel-release
|
||||
yum update -y
|
||||
yum -y groupinstall development
|
||||
yum -y install git zlib-devel bzip2 bzip2-devel readline-devel sqlite \
|
||||
sqlite-devel openssl-devel xz xz-devel libffi-devel findutils java-11-openjdk
|
||||
|
||||
sudo yum -y install epel-release
|
||||
sudo yum -y update
|
||||
sudo yum -y groupinstall development
|
||||
sudo yum -y install git zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel \
|
||||
openssl-devel xz xz-devel tk-devel libffi-devel findutils java-11-openjdk-headless
|
||||
|
||||
Complete the rest of the installation by `installing Python 3.8 with pyenv <install-python-pyenv>`.
|
||||
|
||||
----
|
||||
@ -105,8 +115,8 @@ Debian Stretch. This guide will tell you how. First, run the following commands:
|
||||
sudo echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/red-sources.list
|
||||
sudo apt update
|
||||
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
|
||||
libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev \
|
||||
libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre
|
||||
libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
|
||||
libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless
|
||||
CXX=/usr/bin/g++
|
||||
|
||||
Complete the rest of the installation by `installing Python 3.8 with pyenv <install-python-pyenv>`.
|
||||
@ -127,8 +137,8 @@ Debian/Raspbian Buster. This guide will tell you how. First, run the following c
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
|
||||
libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev \
|
||||
libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre
|
||||
libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
|
||||
libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless
|
||||
CXX=/usr/bin/g++
|
||||
|
||||
Complete the rest of the installation by `installing Python 3.8 with pyenv <install-python-pyenv>`.
|
||||
@ -146,7 +156,7 @@ them with dnf:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo dnf -y install python38 git java-latest-openjdk-headless @development-tools
|
||||
sudo dnf -y install python38 git java-11-openjdk-headless @development-tools
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
@ -197,14 +207,17 @@ First, add the Opt-Python community repository:
|
||||
.. code-block:: none
|
||||
|
||||
source /etc/os-release
|
||||
sudo zypper ar -f https://download.opensuse.org/repositories/home:/Rotkraut:/Opt-Python/openSUSE_Leap_${VERSION_ID}/ Opt-Python
|
||||
sudo zypper -n ar -f \
|
||||
https://download.opensuse.org/repositories/home:/Rotkraut:/Opt-Python/openSUSE_Leap_${VERSION_ID}/ \
|
||||
Opt-Python
|
||||
sudo zypper -n --gpg-auto-import-keys ref
|
||||
|
||||
Now install the pre-requirements with zypper:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo zypper install opt-python38 opt-python38-setuptools git-core java-11-openjdk-headless
|
||||
sudo zypper install -t pattern devel_basis
|
||||
sudo zypper -n install opt-python38 opt-python38-setuptools git-core java-11-openjdk-headless
|
||||
sudo zypper -n install -t pattern devel_basis
|
||||
|
||||
Since Python is now installed to ``/opt/python``, we should add it to PATH. You can add a file in
|
||||
``/etc/profile.d/`` to do this:
|
||||
@ -230,25 +243,31 @@ with zypper:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo zypper install python3-base python3-pip git-core java-12-openjdk-headless
|
||||
sudo zypper install -t pattern devel_basis
|
||||
sudo zypper -n install python3-base python3-pip git-core java-11-openjdk-headless
|
||||
sudo zypper -n install -t pattern devel_basis
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
----
|
||||
|
||||
.. _install-ubuntu:
|
||||
.. _install-ubuntu-1604:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Ubuntu LTS versions (20.04, 18.04, and 16.04)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~
|
||||
Ubuntu 16.04 LTS
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
We recommend adding the ``git-core`` ppa to install Git 2.11 or greater:
|
||||
We recommend adding the ``openjdk-r`` ppa to install Java 11:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install software-properties-common
|
||||
sudo add-apt-repository -yu ppa:openjdk-r/ppa
|
||||
|
||||
We recommend adding the ``git-core`` ppa to install Git 2.11 or greater:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo add-apt-repository -yu ppa:git-core/ppa
|
||||
|
||||
We recommend adding the ``deadsnakes`` ppa to install Python 3.8.1 or greater:
|
||||
@ -261,7 +280,63 @@ Now install the pre-requirements with apt:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt -y install python3.8 python3.8-dev python3.8-venv python3-pip git default-jre-headless \
|
||||
sudo apt -y install python3.8 python3.8-dev python3.8-venv python3-pip git openjdk-11-jre-headless \
|
||||
build-essential
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
----
|
||||
|
||||
.. _install-ubuntu-1804:
|
||||
|
||||
~~~~~~~~~~~~~~~~
|
||||
Ubuntu 18.04 LTS
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
We recommend adding the ``git-core`` ppa to install Git 2.11 or greater:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install software-properties-common
|
||||
sudo add-apt-repository -y ppa:git-core/ppa
|
||||
|
||||
We recommend adding the ``deadsnakes`` ppa to install Python 3.8.1 or greater:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo add-apt-repository -y ppa:deadsnakes/ppa
|
||||
|
||||
Now install the pre-requirements with apt:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt -y install python3.8 python3.8-dev python3.8-venv python3-pip git openjdk-11-jre-headless \
|
||||
build-essential
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
|
||||
----
|
||||
|
||||
.. _install-ubuntu:
|
||||
|
||||
~~~~~~~~~~~~~~~~
|
||||
Ubuntu 20.04 LTS
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
We recommend adding the ``git-core`` ppa to install Git 2.11 or greater:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install software-properties-common
|
||||
sudo add-apt-repository -y ppa:git-core/ppa
|
||||
|
||||
Now install the pre-requirements with apt:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt -y install python3.8 python3.8-dev python3.8-venv python3-pip git openjdk-11-jre-headless \
|
||||
build-essential
|
||||
|
||||
Continue by `creating-venv-linux`.
|
||||
@ -289,7 +364,7 @@ installing pyenv. To do this, first run the following commands:
|
||||
|
||||
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \
|
||||
libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev \
|
||||
libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre
|
||||
libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless
|
||||
CXX=/usr/bin/g++
|
||||
|
||||
And then complete the rest of the installation by `installing Python 3.8 with pyenv <install-python-pyenv>`.
|
||||
@ -315,14 +390,14 @@ virtual environment.
|
||||
|
||||
command -v pyenv && pyenv update || curl https://pyenv.run | bash
|
||||
|
||||
After this command, you may see a warning about 'pyenv' not being in the load path. Follow the
|
||||
instructions given to fix that, then close and reopen your shell.
|
||||
**After this command, you may see a warning about 'pyenv' not being in the load path. Follow the
|
||||
instructions given to fix that, then close and reopen your shell.**
|
||||
|
||||
Then run the following command:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.2 -v
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.3 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
@ -334,7 +409,7 @@ After that is finished, run:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
pyenv global 3.8.2
|
||||
pyenv global 3.8.3
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.8.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user