2021-01-27 15:51:10 +01:00
|
|
|
|image0| |image1| |image2| |image3|
|
2020-10-19 00:20:58 +02:00
|
|
|
|
|
|
|
.. role:: bash(code)
|
|
|
|
:language: bash
|
|
|
|
|
|
|
|
Installing Tuxbot
|
|
|
|
=================
|
|
|
|
|
|
|
|
It is preferable to install the bot on a dedicated user. If you don't
|
|
|
|
know how to do it, please refer to `this guide <https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart>`__
|
|
|
|
|
|
|
|
Installing the pre-requirements
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
- The pre-requirements are:
|
|
|
|
|
2021-02-16 19:28:30 +01:00
|
|
|
- Python 3.9 or greater
|
2020-10-19 00:20:58 +02:00
|
|
|
- Pip
|
|
|
|
- Git
|
|
|
|
|
|
|
|
Operating systems
|
|
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Arch Linux
|
|
|
|
^^^^^^^^^^
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2021-01-27 15:50:52 +01:00
|
|
|
$ sudo pacman -Syu python python-pip python-virtualenv git make gcc postgresql
|
2020-10-19 00:20:58 +02:00
|
|
|
|
2021-01-27 15:50:52 +01:00
|
|
|
Continue to `configure postgresql <#configure-postgresql>`__.
|
2020-10-19 00:20:58 +02:00
|
|
|
|
|
|
|
--------------
|
|
|
|
|
|
|
|
Debian
|
|
|
|
^^^^^^
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ sudo apt update
|
2021-01-27 15:50:52 +01:00
|
|
|
$ sudo apt -y install python3 python3-dev python3-pip python3-venv git make gcc postgresql postgresql-client
|
2020-10-19 00:20:58 +02:00
|
|
|
|
2021-01-27 15:50:52 +01:00
|
|
|
Continue to `configure postgresql <#configure-postgresql>`__.
|
2020-10-19 00:20:58 +02:00
|
|
|
|
|
|
|
--------------
|
|
|
|
|
2021-01-27 18:59:48 +01:00
|
|
|
RHEL and derivatives (CentOS, Fedora...)
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ sudo dnf update
|
|
|
|
$ sudo dnf install python3 python3-devel python3-pip python3-virtualenv git make gcc postgresql-server postgresql-contrib
|
|
|
|
|
|
|
|
Continue to `configure postgresql <#configure-postgresql>`__.
|
|
|
|
|
|
|
|
--------------
|
|
|
|
|
2020-10-19 00:20:58 +02:00
|
|
|
Windows
|
|
|
|
^^^^^^^
|
|
|
|
|
|
|
|
*not for now and not for the future*
|
|
|
|
|
2021-01-30 16:43:17 +01:00
|
|
|
--------------
|
|
|
|
|
2021-01-27 15:50:52 +01:00
|
|
|
Configure PostgreSQL
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
Now, you need to setup PostgreSQL
|
|
|
|
|
|
|
|
Operating systems
|
|
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Arch Linux
|
|
|
|
^^^^^^^^^^
|
|
|
|
|
|
|
|
https://wiki.archlinux.org/index.php/PostgreSQL
|
|
|
|
|
|
|
|
Continue to `create the venv <#creating-the-virtual-environment>`__.
|
|
|
|
|
2021-01-30 16:43:17 +01:00
|
|
|
--------------
|
|
|
|
|
2021-01-27 15:50:52 +01:00
|
|
|
Debian
|
|
|
|
^^^^^^
|
|
|
|
|
|
|
|
https://wiki.debian.org/PostgreSql
|
|
|
|
|
2021-01-27 18:59:48 +01:00
|
|
|
Continue to `create the venv <#creating-the-virtual-environment>`__.
|
2021-01-27 19:06:06 +01:00
|
|
|
|
2021-01-30 16:43:17 +01:00
|
|
|
--------------
|
|
|
|
|
2021-01-27 18:59:48 +01:00
|
|
|
RHEL and derivatives (CentOS, Fedora...)
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
https://fedoraproject.org/wiki/PostgreSQL
|
|
|
|
|
2021-01-27 15:50:52 +01:00
|
|
|
Continue to `create the venv <#creating-the-virtual-environment>`__.
|
|
|
|
|
2021-01-30 16:43:17 +01:00
|
|
|
--------------
|
|
|
|
|
2020-10-19 00:20:58 +02:00
|
|
|
Creating the Virtual Environment
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
To set up the virtual environment and install the bot, simply run this
|
|
|
|
two commands:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ make
|
|
|
|
$ make install
|
|
|
|
|
|
|
|
Now, switch your environment to the virtual one by run this single
|
2021-01-19 16:05:20 +01:00
|
|
|
command: :bash:`source ~/venv/bin/activate`
|
2020-10-19 00:20:58 +02:00
|
|
|
|
|
|
|
Configuration
|
|
|
|
-------------
|
|
|
|
|
|
|
|
It's time to set up your first instance, to do this, you can simply
|
|
|
|
execute this command:
|
|
|
|
|
|
|
|
:bash:`tuxbot-setup [your instance name]`
|
|
|
|
|
|
|
|
After following the instructions, you can run your instance by executing
|
|
|
|
this command:
|
|
|
|
|
|
|
|
:bash:`tuxbot [your instance name]`
|
|
|
|
|
|
|
|
Update
|
|
|
|
------
|
|
|
|
|
|
|
|
To update the whole bot after a :bash:`git pull`, just execute
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ make update
|
|
|
|
|
2021-02-16 19:28:30 +01:00
|
|
|
.. |image0| image:: https://img.shields.io/badge/python-3.9%20%7C%203.10-%23007ec6
|
2021-01-30 13:48:52 +01:00
|
|
|
.. |image1| image:: https://img.shields.io/github/issues/Rom1-J/tuxbot-bot
|
2021-01-19 11:40:49 +01:00
|
|
|
.. |image2| image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
|
|
|
.. |image3| image:: https://wakatime.com/badge/github/Rom1-J/tuxbot-bot.svg
|
|
|
|
:target: https://wakatime.com/badge/github/Rom1-J/tuxbot-bot
|