Twentysix26 / Red-Docs

Docs for Red - Discord bot
8 stars 16 forks source link

Linux Documentation #78

Closed Kowlin closed 7 years ago

Kowlin commented 7 years ago

Enhance the docs with a new Linux template for installation and cover the docs with the following distributions

Distributions:

Template:

@palmtree5

Kowlin commented 7 years ago

Archlinux install template:

pacman -S python python-pip git ffmpeg base-devel openssl libffi libsodium
git clone -b develop --single-branch https://github.com/Twentysix26/Red-DiscordBot.git
cd Red-DiscordBot
python launcher.py
Kowlin commented 7 years ago

Alpine install template:

apk add python3-dev ffmpeg git openssl libffi-dev libsodium-dev g++ make
git clone -b develop --single-branch https://github.com/Twentysix26/Red-DiscordBot.git
cd Red-DiscordBot
python3 launcher.py
palmtree5 commented 7 years ago

Centos 7 install template (mostly from a script in https://github.com/Twentysix26/Red-DiscordBot/issues/649):

yum -y groupinstall development
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y install yum-utils wget which python35u python35u-pip python35u-devel openssl-devel libffi-devel git opus-devel
sh -c "$(wget https://gist.githubusercontent.com/mustafaturan/7053900/raw/27f4c8bad3ee2bb0027a1a52dc8501bf1e53b270/latest-ffmpeg-centos6.sh -O -)"
git clone -b develop --single-branch https://github.com/Twentysix26/Red-DiscordBot.git Red-DiscordBot
cd Red-DiscordBot
python3.5 launcher.py

Tagging @pepsifire since they made the script I got these commands from.

EDIT: Compacted the yum commands down, though the ffmpeg compilation script installs a few more packages by itself

Kowlin commented 7 years ago

Not a fan of the above template, seems like something that could just be taken in one go, especially due the fact that we can just use libavtools for this and call it a day

skeith commented 7 years ago

The centos template was made as a complete Red installs hence there is pip stuff (while Kowlin' alpine and archlinux does not list pip stuff) - do correct me if launcher.py able to installs pip

The script uses ffmpeg since that was what I did. I did not know that we can use libavtools.

To further shorten it, just create sh script for all those stuff and run it in one go.

Kowlin commented 7 years ago

@skeith Pip is included in python3-dev for some magic reason ;)

palmtree5 commented 7 years ago

@skeith the archlinux template includes installing pip

palmtree5 commented 7 years ago

@Kowlin Problem with trying to install libavtools on centos: no package available

Kowlin commented 7 years ago

Well... Something along those lines. Will dig later tonight

palmtree5 commented 7 years ago

Ubuntu 16.04 instructions:

sudo apt-get install python3.5-dev python3-pip build-essential libssl-dev libffi-dev git ffmpeg libopus-dev unzip -y
git clone https://github.com/Twentysix26/Red-DiscordBot
cd Red-DiscordBot
python3 launcher.py
palmtree5 commented 7 years ago

Fedora 25 instructions:

dnf group install 'development tools'
dnf install wget redhat-rpm-config libffi-devel python3-devel
dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-25.noarch.rpm
dnf install ffmpeg opus-devel
git clone https://github.com/Twentysix26/Red-DiscordBot
cd Red-DiscordBot
python3 launcher.py
palmtree5 commented 7 years ago

Debian 8 instructions:

apt install nano
nano /etc/apt/sources.list

add deb http://httpredir.debian.org/debian jessie-backports main contrib non-free on its own line at the end of the file. Save and exit (Ctrl+X, y, Enter)

apt update
apt install build-essential libssl-dev libffi-dev git ffmpeg libopus-dev unzip -y
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --enable-optimizations
make -j4
make altinstall
cd ..
wget https://bootstrap.pypa.io/get-pip.py
python3.6 get-pip.py
git clone https://github.com/Twentysix26/Red-DiscordBot
cd Red-DiscordBot
python3.6 launcher.py
tilda commented 7 years ago

For Debian I used pyenv/pyenv instead of the manual build steps.

Installing 3.6 would be like this:

pyenv install 3.6.0
pyenv global 3.6.0
pyenv rehash

This compiles 3.6, sets the python version via a .python-version file, and reloads pyenv's shims for the version change to take effect. (btw pip is included as pip3.6)

Note you need these packages:

build-essential libncursesw5-dev libreadline-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev libbz2-dev git unzip libffi-dev ffmpeg libopus-dev

for a full build with no warnings.

Kowlin commented 7 years ago

Annddd forgot to close this. :/