-
Notifications
You must be signed in to change notification settings - Fork 15
/
install_centos.sh
34 lines (26 loc) · 1.11 KB
/
install_centos.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
echo ">>> 1. install Python 3.6"
sudo yum -y install epel-release
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm
sudo yum -y install python36u
sudo yum -y install python36u-pip
python3.6 -V
pip3.6 -V
echo ">>> 2. install FFmpeg"
sudo rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum -y install ffmpeg ffmpeg-devel
ffmpeg -version
echo ">>> 3. setup repository"
python3 -m venv .env
source .env/bin/activate
pip3 install -r requirements.txt
echo ">>> 4. setup configuration"
read -p "Input your bot token: " token
touch global_config/protected_config.py
echo "_telegrambot_token = '$token'" > global_config/protected_config.py
read -p "Input your repo absolute location: " base_dir
echo "_base_dir = '$base_dir'" > global_config/environment_config.py
read -p "Input your cache absolute location: " temp_dir
echo "_temp_dir = '$temp_dir'" >> global_config/environment_config.py
echo ">>> 5. setup entrance"
echo "One more step to be done, setup your bot entrance by yourself."