-
Notifications
You must be signed in to change notification settings - Fork 502
Home
Welcome to the telegram-bot wiki!
If you are connecting via SSH to a VPS, chances are you are logged in as root. tg
(telegram-cli) doesn't run if you try to run it as root, so we need to set up a new user:
adduser telegram-bot
adduser telegram-bot sudo
The first adduser
command should set up user info eg. password.
Now close the SSH session and log in to the new user that you set up (or logout and back in).
(from vysheng/tg/README.md: Linux and BSDs)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make unzip git redis-server g++
sudo emerge -av sys-libs/readline dev-libs/libconfig dev-libs/openssl dev-lang/lua dev-libs/libevent dev-libs/jansson
sudo yum install lua-devel openssl-devel libconfig-devel readline-devel libevent-devel libjansson-devel git redis gcc make unzip gcc-c++ expat-devel
sudo pacman -S autoconf patch readline libconfig lua libevent jansson python make unzip redis gcc git
pkg install libconfig libexecinfo lua52
pkg_add libconfig libexecinfo lua
Check out vysheng/tg/README.md: Mac OS X
If you use a different package manager than the ones above, the following is a list of required packages:
libreadline-dev (readline)
libconfig-dev (libconfig)
libssl-dev (openssl)
lua5.2
liblua5.2-dev (liblua)
libevent-dev
libjansson-dev (libjansson)
libpython-dev
make
unzip
git
redis-server (redis)
g++
cd $HOME
git clone https://github.com/yagop/telegram-bot.git
cd telegram-bot
./launch.sh install
./launch.sh # Will ask you for a phone number & confirmation code.
To install everything on this page (except new user) in one command on debian-based distros, use: (useful for VPS deployment)
sudo apt-get update; sudo apt-get upgrade -y --force-yes; sudo apt-get dist-upgrade -y --force-yes; sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson* libpython-dev make unzip git redis-server g++ -y --force-yes && git clone https://github.com/yagop/telegram-bot.git && cd telegram-bot && ./launch.sh install && ./launch.sh
After running that command, leave the VPS for a few minutes (depends on the speed of the VPS) to download and compile everything and when you come back you should just have to enter your phone number 😄