mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Docs] Add virtualenv guide and compress install guides (#2029)
* [Docs] Add virtualenv guide and compress install guides Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * [Docs] Better cross-referencing Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * Fix pyenv-installer link Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * Use sudo -e instead of sudo nano * Add note about launcher for linux/mac * Include launcher notes in Windows guide * Add missing colon
This commit is contained in:
parent
e6495bc7c0
commit
ce031cf7bd
@ -10,7 +10,7 @@ Creating the service file
|
|||||||
|
|
||||||
Create the new service file:
|
Create the new service file:
|
||||||
|
|
||||||
:code:`sudo nano /etc/systemd/system/red@.service`
|
:code:`sudo -e /etc/systemd/system/red@.service`
|
||||||
|
|
||||||
Paste the following and replace all instances of :code:`username` with the username your bot is running under (hopefully not root):
|
Paste the following and replace all instances of :code:`username` with the username your bot is running under (hopefully not root):
|
||||||
|
|
||||||
|
|||||||
@ -11,13 +11,8 @@ Welcome to Red - Discord Bot's documentation!
|
|||||||
:caption: Installation Guides:
|
:caption: Installation Guides:
|
||||||
|
|
||||||
install_windows
|
install_windows
|
||||||
install_mac
|
install_linux_mac
|
||||||
install_ubuntu_xenial
|
venv_guide
|
||||||
install_ubuntu_bionic
|
|
||||||
install_debian
|
|
||||||
install_centos
|
|
||||||
install_arch
|
|
||||||
install_raspbian
|
|
||||||
cog_dataconverter
|
cog_dataconverter
|
||||||
autostart_systemd
|
autostart_systemd
|
||||||
|
|
||||||
|
|||||||
@ -1,55 +0,0 @@
|
|||||||
.. arch install guide
|
|
||||||
|
|
||||||
==============================
|
|
||||||
Installing Red on Arch Linux
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. warning:: For safety reasons, DO NOT install Red with a root user. Instead, make a new one.
|
|
||||||
|
|
||||||
:code:`https://wiki.archlinux.org/index.php/Users_and_groups`
|
|
||||||
|
|
||||||
-------------------------------
|
|
||||||
Installing the pre-requirements
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
sudo pacman -Syu python-pip git base-devel jre8-openjdk
|
|
||||||
|
|
||||||
------------------
|
|
||||||
Installing the bot
|
|
||||||
------------------
|
|
||||||
|
|
||||||
To install without audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot --user`
|
|
||||||
|
|
||||||
To install with audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
To install the development version (without audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot --user`
|
|
||||||
|
|
||||||
To install the development version (with audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
------------------------
|
|
||||||
Setting up your instance
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
|
|
||||||
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
|
|
||||||
for confirmation of that selection. Next, it will ask you to choose your storage backend
|
|
||||||
(the default here is JSON). It will then ask for a name for your instance. This can be
|
|
||||||
anything as long as it does not contain spaces; however, keep in mind that this is the
|
|
||||||
name you will use to run your bot, and so it should be something you can remember.
|
|
||||||
|
|
||||||
-----------
|
|
||||||
Running Red
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
|
|
||||||
your token and a prefix.
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
.. centos install guide
|
|
||||||
|
|
||||||
==========================
|
|
||||||
Installing Red on CentOS 7
|
|
||||||
==========================
|
|
||||||
|
|
||||||
.. warning:: For safety reasons, DO NOT install Red with a root user. Instead, `make a new one <https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Step_by_Step_Guide/s1-starting-create-account.html>`_.
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
Installing pre-requirements
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
yum -y groupinstall development
|
|
||||||
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
|
||||||
yum -y install yum-utils wget which python36u python36u-pip python36u-devel openssl-devel libffi-devel git java-1.8.0-openjdk
|
|
||||||
|
|
||||||
--------------
|
|
||||||
Installing Red
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Without audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot --user`
|
|
||||||
|
|
||||||
With audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
To install the development version (without audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot --user`
|
|
||||||
|
|
||||||
To install the development version (with audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
----------------------
|
|
||||||
Setting up an instance
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
|
|
||||||
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
|
|
||||||
for confirmation of that selection. Next, it will ask you to choose your storage backend
|
|
||||||
(the default here is JSON). It will then ask for a name for your instance. This can be
|
|
||||||
anything as long as it does not contain spaces; however, keep in mind that this is the
|
|
||||||
name you will use to run your bot, and so it should be something you can remember.
|
|
||||||
|
|
||||||
-----------
|
|
||||||
Running Red
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
|
|
||||||
your token and a prefix.
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
.. debian install guide
|
|
||||||
|
|
||||||
================================
|
|
||||||
Installing Red on Debian Stretch
|
|
||||||
================================
|
|
||||||
|
|
||||||
.. warning:: For safety reasons, DO NOT install Red with a root user. Instead, `make a new one <https://manpages.debian.org/stretch/adduser/adduser.8.en.html>`_.
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
Installing pre-requirements
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev git unzip default-jre
|
|
||||||
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
|
|
||||||
|
|
||||||
After that last 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.6.5 -v
|
|
||||||
|
|
||||||
This may take a long time to complete.
|
|
||||||
|
|
||||||
After that is finished, run:
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
pyenv global 3.6.5
|
|
||||||
|
|
||||||
------------------
|
|
||||||
Installing the bot
|
|
||||||
------------------
|
|
||||||
|
|
||||||
To install without audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot`
|
|
||||||
|
|
||||||
To install with audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot[voice]`
|
|
||||||
|
|
||||||
To install the development version (without audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
|
|
||||||
|
|
||||||
To install the development version (with audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
|
|
||||||
|
|
||||||
------------------------
|
|
||||||
Setting up your instance
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
|
|
||||||
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
|
|
||||||
for confirmation of that selection. Next, it will ask you to choose your storage backend
|
|
||||||
(the default here is JSON). It will then ask for a name for your instance. This can be
|
|
||||||
anything as long as it does not contain spaces; however, keep in mind that this is the
|
|
||||||
name you will use to run your bot, and so it should be something you can remember.
|
|
||||||
|
|
||||||
-----------
|
|
||||||
Running Red
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
|
|
||||||
your token and a prefix.
|
|
||||||
203
docs/install_linux_mac.rst
Normal file
203
docs/install_linux_mac.rst
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
.. _linux-mac-install-guide:
|
||||||
|
|
||||||
|
==============================
|
||||||
|
Installing Red on Linux or Mac
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
For safety reasons, DO NOT install Red with a root user. If you are unsure how to create
|
||||||
|
a new user, see the man page for the ``useradd`` command.
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Please install the pre-requirements using the commands listed for your operating system.
|
||||||
|
|
||||||
|
The pre-requirements are:
|
||||||
|
- Python 3.6 or greater
|
||||||
|
- pip 9.0 or greater
|
||||||
|
- git
|
||||||
|
- Java Runtime Environment 8 or later (for audio support)
|
||||||
|
|
||||||
|
~~~~~~~~~~
|
||||||
|
Arch Linux
|
||||||
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
sudo pacman -Syu python-pip git base-devel jre8-openjdk
|
||||||
|
|
||||||
|
~~~~~~~~
|
||||||
|
CentOS 7
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
yum -y groupinstall development
|
||||||
|
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
||||||
|
yum -y install yum-utils wget which python36u python36u-pip python36u-devel openssl-devel libffi-devel git java-1.8.0-openjdk
|
||||||
|
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Debian and Raspbian Stretch
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
Audio will not work on Raspberry Pi's **below** 2B. This is a CPU problem and
|
||||||
|
*cannot* be fixed.
|
||||||
|
|
||||||
|
We recommend installing pyenv as a method of installing non-native versions of python on
|
||||||
|
Debian/Raspbian Stretch. This guide will tell you how. First, run the following commands:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev git unzip default-jre
|
||||||
|
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
|
||||||
|
|
||||||
|
After that last 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.7.0 -v
|
||||||
|
|
||||||
|
This may take a long time to complete.
|
||||||
|
|
||||||
|
After that is finished, run:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
pyenv global 3.7.0
|
||||||
|
|
||||||
|
Pyenv is now installed and your system should be configured to run Python 3.7.
|
||||||
|
|
||||||
|
~~~
|
||||||
|
Mac
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Install Brew: in Finder or Spotlight, search for and open *Terminal*. In the terminal, paste the
|
||||||
|
following, then press Enter:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
|
|
||||||
|
After the installation, install the required packages by pasting the commands and pressing enter,
|
||||||
|
one-by-one:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
brew install python3 --with-brewed-openssl
|
||||||
|
brew install git
|
||||||
|
brew tap caskroom/versions
|
||||||
|
brew cask install java8
|
||||||
|
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Ubuntu 18.04 Bionic Beaver
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
sudo apt install python3.6-dev python3-pip build-essential libssl-dev libffi-dev git unzip default-jre -y
|
||||||
|
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Ubuntu 16.04 Xenial Xerus
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
We recommend adding the ``deadsnakes`` apt repository to install Python 3.6 or greater:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
sudo apt install software-properties-common
|
||||||
|
sudo add-apt-repository ppa:deadsnakes/ppa
|
||||||
|
sudo apt update
|
||||||
|
|
||||||
|
Now, install python, pip, git and java with the following commands:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
sudo apt install python3.6-dev build-essential libssl-dev libffi-dev git unzip default-jre wget -y
|
||||||
|
wget https://bootstrap.pypa.io/get-pip.py
|
||||||
|
sudo python3.6 get-pip.py
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
Creating a Virtual Environment
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
We **strongly** recommend installing Red into a virtual environment. See the section
|
||||||
|
`installing-in-virtual-environment`.
|
||||||
|
|
||||||
|
.. _installing-red-linux-mac:
|
||||||
|
|
||||||
|
--------------
|
||||||
|
Installing Red
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Choose one of the following commands to install Red.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
If you're not inside an activated virtual environment, include the ``--user`` flag with all
|
||||||
|
``pip3`` commands.
|
||||||
|
|
||||||
|
To install without audio support:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
pip3 install -U --process-dependency-links --no-cache-dir Red-DiscordBot
|
||||||
|
|
||||||
|
Or, to install with audio support:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
pip3 install -U --process-dependency-links --no-cache-dir Red-DiscordBot[voice]
|
||||||
|
|
||||||
|
Or, install with audio and MongoDB support:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
pip3 install -U --process-dependency-links --no-cache-dir Red-DiscordBot[voice,mongo]
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
To install the development version, replace ``Red-DiscordBot`` in the above commands with the
|
||||||
|
following link:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
Setting Up and Running Red
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
After installation, set up your instance with the following command:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
redbot-setup
|
||||||
|
|
||||||
|
This will set the location where data will be stored, as well as your
|
||||||
|
storage backend and the name of the instance (which will be used for
|
||||||
|
running the bot).
|
||||||
|
|
||||||
|
Once done setting up the instance, run the following command to run Red:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
redbot <your instance name>
|
||||||
|
|
||||||
|
It will walk through the initial setup, asking for your token and a prefix.
|
||||||
|
|
||||||
|
You may also run Red via the launcher, which allows you to restart the bot
|
||||||
|
from discord, and enable auto-restart. You may also update the bot from the
|
||||||
|
launcher menu. Use the following command to run the launcher:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
redbot-launcher
|
||||||
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
.. mac install guide
|
|
||||||
|
|
||||||
=====================
|
|
||||||
Installing Red on Mac
|
|
||||||
=====================
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
Installing pre-requirements
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
* Install Brew
|
|
||||||
* In Finder or Spotlight, search for and open terminal. In the window that will open, paste this:
|
|
||||||
:code:`/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
|
|
||||||
and press enter.
|
|
||||||
* After the installation, install the required packages by pasting the commands and pressing enter, one-by-one:
|
|
||||||
* :code:`brew install python3 --with-brewed-openssl`
|
|
||||||
* :code:`brew install git`
|
|
||||||
* :code:`brew tap caskroom/versions`
|
|
||||||
* :code:`brew cask install java8`
|
|
||||||
|
|
||||||
--------------
|
|
||||||
Installing Red
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Without audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot`
|
|
||||||
|
|
||||||
With audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot[voice]`
|
|
||||||
|
|
||||||
To install the development version (without audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
|
|
||||||
|
|
||||||
To install the development version (with audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
|
|
||||||
|
|
||||||
----------------------
|
|
||||||
Setting up an instance
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
To set up an instance, run :code:`redbot-setup` and follow the steps there, providing the requested information
|
|
||||||
or accepting the defaults. Keep in mind that the instance name will be the one you use when running the bot, so
|
|
||||||
make it something you can remember
|
|
||||||
|
|
||||||
-----------
|
|
||||||
Running Red
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Run :code:`redbot <your instance name>` and go through the initial setup (it will ask for the token and a prefix).
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
.. raspbian install guide
|
|
||||||
|
|
||||||
==================================
|
|
||||||
Installing Red on Raspbian Stretch
|
|
||||||
==================================
|
|
||||||
|
|
||||||
.. warning:: For safety reasons, DO NOT install Red with a root user. Instead, `make a new one <https://www.raspberrypi.org/documentation/linux/usage/users.md>`_.
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
Installing pre-requirements
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev git unzip default-jre
|
|
||||||
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
|
|
||||||
|
|
||||||
After that last 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.6.5 -v
|
|
||||||
|
|
||||||
This may take a long time to complete.
|
|
||||||
|
|
||||||
After that is finished, run:
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
pyenv global 3.6.5
|
|
||||||
|
|
||||||
--------------
|
|
||||||
Installing Red
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Without audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot --user`
|
|
||||||
|
|
||||||
With audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
To install the development version (without audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot --user`
|
|
||||||
|
|
||||||
To install the development version (with audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
----------------------
|
|
||||||
Setting up an instance
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
|
|
||||||
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
|
|
||||||
for confirmation of that selection. Next, it will ask you to choose your storage backend
|
|
||||||
(the default here is JSON). It will then ask for a name for your instance. This can be
|
|
||||||
anything as long as it does not contain spaces; however, keep in mind that this is the
|
|
||||||
name you will use to run your bot, and so it should be something you can remember.
|
|
||||||
|
|
||||||
-----------
|
|
||||||
Running Red
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
|
|
||||||
your token and a prefix.
|
|
||||||
|
|
||||||
.. warning:: Audio will not work on Raspberry Pi's **below** 2B. This is a CPU problem and *cannot* be fixed.
|
|
||||||
@ -1,54 +0,0 @@
|
|||||||
.. ubuntu bionic install guide
|
|
||||||
|
|
||||||
==============================
|
|
||||||
Installing Red on Ubuntu 18.04
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. warning:: For safety reasons, DO NOT install Red with a root user. Instead, `make a new one <http://manpages.ubuntu.com/manpages/artful/man8/adduser.8.html>`_.
|
|
||||||
|
|
||||||
-------------------------------
|
|
||||||
Installing the pre-requirements
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
sudo apt install python3.6-dev python3-pip build-essential libssl-dev libffi-dev git unzip default-jre -y
|
|
||||||
|
|
||||||
|
|
||||||
------------------
|
|
||||||
Installing the bot
|
|
||||||
------------------
|
|
||||||
|
|
||||||
To install without audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot --user`
|
|
||||||
|
|
||||||
To install with audio:
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
To install the development version (without audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot --user`
|
|
||||||
|
|
||||||
To install the development version (with audio):
|
|
||||||
|
|
||||||
:code:`pip3 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
------------------------
|
|
||||||
Setting up your instance
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
|
|
||||||
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
|
|
||||||
for confirmation of that selection. Next, it will ask you to choose your storage backend
|
|
||||||
(the default here is JSON). It will then ask for a name for your instance. This can be
|
|
||||||
anything as long as it does not contain spaces; however, keep in mind that this is the
|
|
||||||
name you will use to run your bot, and so it should be something you can remember.
|
|
||||||
|
|
||||||
-----------
|
|
||||||
Running Red
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
|
|
||||||
your token and a prefix.
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
.. ubuntu xenial install guide
|
|
||||||
|
|
||||||
==============================
|
|
||||||
Installing Red on Ubuntu 16.04
|
|
||||||
==============================
|
|
||||||
|
|
||||||
.. warning:: For safety reasons, DO NOT install Red with a root user. Instead, `make a new one <http://manpages.ubuntu.com/manpages/artful/man8/adduser.8.html>`_.
|
|
||||||
|
|
||||||
-------------------------------
|
|
||||||
Installing the pre-requirements
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
sudo apt install software-properties-common
|
|
||||||
sudo add-apt-repository ppa:deadsnakes/ppa
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install python3.6-dev build-essential libssl-dev libffi-dev git unzip default-jre wget -y
|
|
||||||
wget https://bootstrap.pypa.io/get-pip.py
|
|
||||||
sudo python3.6 get-pip.py
|
|
||||||
|
|
||||||
|
|
||||||
------------------
|
|
||||||
Installing the bot
|
|
||||||
------------------
|
|
||||||
|
|
||||||
To install without audio:
|
|
||||||
|
|
||||||
:code:`pip3.6 install -U --process-dependency-links red-discordbot --user`
|
|
||||||
|
|
||||||
To install with audio:
|
|
||||||
|
|
||||||
:code:`pip3.6 install -U --process-dependency-links red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
To install the development version (without audio):
|
|
||||||
|
|
||||||
:code:`pip3.6 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot --user`
|
|
||||||
|
|
||||||
To install the development version (with audio):
|
|
||||||
|
|
||||||
:code:`pip3.6 install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice] --user`
|
|
||||||
|
|
||||||
------------------------
|
|
||||||
Setting up your instance
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Run :code:`redbot-setup` and follow the prompts. It will ask first for where you want to
|
|
||||||
store the data (the default is :code:`~/.local/share/Red-DiscordBot`) and will then ask
|
|
||||||
for confirmation of that selection. Next, it will ask you to choose your storage backend
|
|
||||||
(the default here is JSON). It will then ask for a name for your instance. This can be
|
|
||||||
anything as long as it does not contain spaces; however, keep in mind that this is the
|
|
||||||
name you will use to run your bot, and so it should be something you can remember.
|
|
||||||
|
|
||||||
-----------
|
|
||||||
Running Red
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Run :code:`redbot <your instance name>` and run through the initial setup. This will ask for
|
|
||||||
your token and a prefix.
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
.. windows installation docs
|
.. _windows-install-guide:
|
||||||
|
|
||||||
=========================
|
=========================
|
||||||
Installing Red on Windows
|
Installing Red on Windows
|
||||||
@ -21,23 +21,74 @@ Needed Software
|
|||||||
|
|
||||||
.. attention:: Please choose the "Windows Online" installer
|
.. attention:: Please choose the "Windows Online" installer
|
||||||
|
|
||||||
|
.. _installing-red-windows:
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
Installing Red
|
Installing Red
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
1. Open a command prompt (open Start, search for "command prompt", then click it)
|
1. Open a command prompt (open Start, search for "command prompt", then click it)
|
||||||
2. Run the appropriate command, depending on if you want audio or not
|
2. Create and activate a virtual environment (strongly recommended), see the section `using-venv`
|
||||||
|
3. Run **one** of the following commands, depending on what extras you want installed
|
||||||
|
|
||||||
* No audio: :code:`python -m pip install -U --process-dependency-links Red-DiscordBot`
|
.. note::
|
||||||
* Audio: :code:`python -m pip install -U --process-dependency-links Red-DiscordBot[voice]`
|
|
||||||
* Development version (without audio): :code:`python -m pip install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot`
|
|
||||||
* Development version (with audio): :code:`python -m pip install -U --process-dependency-links git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=red-discordbot[voice]`
|
|
||||||
|
|
||||||
3. Once that has completed, run :code:`redbot-setup` to set up your instance
|
If you're not inside an activated virtual environment, include the ``--user`` flag with all
|
||||||
|
``pip`` commands.
|
||||||
|
|
||||||
* This will set the location where data will be stored, as well as your
|
* No audio:
|
||||||
storage backend and the name of the instance (which will be used for
|
|
||||||
running the bot)
|
|
||||||
|
|
||||||
4. Once done setting up the instance, run :code:`redbot <your instance name>` to run Red.
|
.. code-block:: none
|
||||||
It will walk through the initial setup, asking for your token and a prefix
|
|
||||||
|
python -m pip install -U --process-dependency-links --no-cache-dir Red-DiscordBot
|
||||||
|
|
||||||
|
* With audio:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
python -m pip install -U --process-dependency-links --no-cache-dir Red-DiscordBot[voice]
|
||||||
|
|
||||||
|
* With audio and MongoDB support:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
python -m pip install -U --process-dependency-links --no-cache-dir Red-DiscordBot[voice,mongo]
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
To install the development version, replace ``Red-DiscordBot`` in the above commands with the
|
||||||
|
following link:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
Setting Up and Running Red
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
After installation, set up your instance with the following command:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
redbot-setup
|
||||||
|
|
||||||
|
This will set the location where data will be stored, as well as your
|
||||||
|
storage backend and the name of the instance (which will be used for
|
||||||
|
running the bot).
|
||||||
|
|
||||||
|
Once done setting up the instance, run the following command to run Red:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
redbot <your instance name>
|
||||||
|
|
||||||
|
It will walk through the initial setup, asking for your token and a prefix.
|
||||||
|
|
||||||
|
You may also run Red via the launcher, which allows you to restart the bot
|
||||||
|
from discord, and enable auto-restart. You may also update the bot from the
|
||||||
|
launcher menu. Use the following command to run the launcher:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
redbot-launcher
|
||||||
|
|||||||
132
docs/venv_guide.rst
Normal file
132
docs/venv_guide.rst
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
.. _installing-in-virtual-environment:
|
||||||
|
|
||||||
|
=======================================
|
||||||
|
Installing Red in a Virtual Environment
|
||||||
|
=======================================
|
||||||
|
Virtual environments allow you to isolate red's library dependencies, cog dependencies and python
|
||||||
|
binaries from the rest of your system. It is strongly recommended you use this if you use python
|
||||||
|
for more than just Red.
|
||||||
|
|
||||||
|
.. _using-venv:
|
||||||
|
|
||||||
|
--------------
|
||||||
|
Using ``venv``
|
||||||
|
--------------
|
||||||
|
This is the quickest way to get your virtual environment up and running, as `venv` is shipped with
|
||||||
|
python.
|
||||||
|
|
||||||
|
First, choose a directory where you would like to create your virtual environment. It's a good idea
|
||||||
|
to keep it in a location which is easy to type out the path to. From now, we'll call it
|
||||||
|
``path/to/venv/`` (or ``path\to\venv\`` on Windows).
|
||||||
|
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
``venv`` on Linux or Mac
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Create your virtual environment with the following command::
|
||||||
|
|
||||||
|
python3 -m venv path/to/venv/
|
||||||
|
|
||||||
|
And activate it with the following command::
|
||||||
|
|
||||||
|
source path/to/venv/bin/activate
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
|
||||||
|
You must activate the virtual environment with the above command every time you open a new
|
||||||
|
shell to run, install or update Red.
|
||||||
|
|
||||||
|
Continue reading `below <after-activating-virtual-environment>`.
|
||||||
|
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
``venv`` on Windows
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
Create your virtual environment with the following command::
|
||||||
|
|
||||||
|
python -m venv path\to\venv\
|
||||||
|
|
||||||
|
And activate it with the following command::
|
||||||
|
|
||||||
|
path\to\venv\Scripts\activate.bat
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
|
||||||
|
You must activate the virtual environment with the above command every time you open a new
|
||||||
|
Command Prompt to run, install or update Red.
|
||||||
|
|
||||||
|
Continue reading `below <after-activating-virtual-environment>`.
|
||||||
|
|
||||||
|
.. _using-pyenv-virtualenv:
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
Using ``pyenv virtualenv``
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This is for non-Windows users only.
|
||||||
|
|
||||||
|
Using ``pyenv virtualenv`` saves you the headache of remembering where you installed your virtual
|
||||||
|
environments. If you haven't already, install pyenv with `pyenv-installer`_.
|
||||||
|
|
||||||
|
First, ensure your pyenv interpreter is set to python 3.6 or later with the following command::
|
||||||
|
|
||||||
|
pyenv version
|
||||||
|
|
||||||
|
Now, create a virtual environment with the following command::
|
||||||
|
|
||||||
|
pyenv virtualenv <name>
|
||||||
|
|
||||||
|
Replace ``<name>`` with whatever you like. If you forget what you named it, use the command ``pyenv
|
||||||
|
versions``.
|
||||||
|
|
||||||
|
Now activate your virtualenv with the following command::
|
||||||
|
|
||||||
|
pyenv shell <name>
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
|
||||||
|
You must activate the virtual environment with the above command every time you open a new
|
||||||
|
shell to run, install or update Red.
|
||||||
|
|
||||||
|
Continue reading `below <after-activating-virtual-environment>`.
|
||||||
|
|
||||||
|
.. _pyenv-installer: https://github.com/pyenv/pyenv-installer/blob/master/README.rst
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
.. _after-activating-virtual-environment:
|
||||||
|
|
||||||
|
Once activated, your ``PATH`` environment variable will be modified to use the virtual
|
||||||
|
environment's python executables, as well as other executables like ``pip``.
|
||||||
|
|
||||||
|
From here, install Red using the commands listed on your installation guide (`Windows
|
||||||
|
<installing-red-windows>` or `Non-Windows <installing-red-linux-mac>`).
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The alternative to activating the virtual environment each time you open a new shell is to
|
||||||
|
provide the full path to the executable. This will automatically use the virtual environment's
|
||||||
|
python interpreter and installed libraries.
|
||||||
|
|
||||||
|
--------------------------------------------
|
||||||
|
Virtual Environments with Multiple Instances
|
||||||
|
--------------------------------------------
|
||||||
|
If you are running multiple instances of Red on the same machine, you have the option of either
|
||||||
|
using the same virtual environment for all of them, or creating separate ones.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This only applies for multiple instances of V3. If you are running a V2 instance as well,
|
||||||
|
You **must** use separate virtual environments.
|
||||||
|
|
||||||
|
The advantages of using a *single* virtual environment for all of your V3 instances are:
|
||||||
|
|
||||||
|
- When updating Red, you will only need to update it once for all instances (however you will still need to restart all instances for the changes to take effect)
|
||||||
|
- It will save space on your hard drive
|
||||||
|
|
||||||
|
On the other hand, you may wish to update each of your instances individually.
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
|
||||||
|
Windows users with multiple instances should create *separate* virtual environments, as
|
||||||
|
updating multiple running instances at once is likely to cause errors.
|
||||||
Loading…
x
Reference in New Issue
Block a user