{"id":320622,"date":"2021-03-31T15:01:33","date_gmt":"2021-03-31T15:01:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320622"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320622","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Python Telegram \u0431\u043e\u0442\u0430 \u0438 \u0435\u0433\u043e deploy \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<h3>\u041a\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u044b \u0447\u0430\u0442-\u0431\u043e\u0442\u044b?<\/h3>\n<p>\u0420\u044b\u043d\u043e\u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u0432 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0440\u0430\u0441\u0442\u0435\u0442 \u0441 \u0431\u0435\u0448\u0435\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e  \u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0435\u0436\u0435\u0433\u043e\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043d\u0430 30% \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0442\u0440\u0435\u0445 \u043b\u0435\u0442.  \u0412 2020 \u0433. \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u044b  \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0430 17% \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 2019 \u0433. \u0411\u043e\u043b\u044c\u0448\u0438\u043c \u0441\u043f\u0440\u043e\u0441\u043e\u043c \u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u043b\u044c\u00ad\u0437\u043e\u00ad\u0432\u0430\u0442\u044c\u00ad\u0441\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u0431\u043e\u0442\u044b, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043d\u0438\u0445 \u0432\u044b\u0440\u043e\u0441\u043b\u043e \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430. \u0412 2021 \u0433. \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0441\u0442 \u0447\u0438\u0441\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u044b \u043d\u0430 15-20% \u043e\u0442 \u043e\u0440\u00ad\u0433\u0430\u00ad\u043d\u0438\u0437\u0430\u00ad\u0446\u0438\u0439 \u0438\u0437 \u0433\u043e\u0441\u0441\u0435\u043a\u0442\u043e\u0440\u0430, \u043e\u0431\u00ad\u0440\u0430\u00ad\u0437\u043e\u0432\u0430\u00ad\u043d\u0438\u044f, \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u044b, \u043b\u043e\u00ad\u0433\u0438\u0441\u00ad\u0442\u0438\u00ad\u043a\u0438, \u0440\u0435\u00ad\u0442\u0435\u0439\u00ad\u043b\u0430 \u0438 e-commerce, \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0445 \u0438 \u0434\u043e\u0431\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439.<\/p>\n<h3>\u0428\u0430\u0433\u0438<\/h3>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0430\u0448\u0435\u0433\u043e telegram \u0431\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c <\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0434\u043b\u044f \u0435\u0433\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0431\u0435\u0441\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u043e\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<h3>\u0428\u0430\u0433 1.  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430 \u0432 Telegram<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0448\u0430\u0433\u0430 \u043e\u043f\u0438\u0448\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043c\u043d\u043e\u0433\u043e \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0435\u0442 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0438\u043a\u0430\u043a\u0438\u0445  \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0435\u0439. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <a href=\"http:\/\/telegram.me\/BotFather\" rel=\"noopener noreferrer nofollow\">BotFather<\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/227\/166\/164\/227166164aa946410162a4e8b010054f.png\" width=\"1932\" height=\"1256\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"%5Bobject%20Object%5D\" width=\"0\" height=\"0\"><figcaption><\/figcaption><\/figure>\n<h3>\u0428\u0430\u0433 2. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e.<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 telebot, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p><code>$ pip install pytelegrambotapi<\/code><\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0435\u0441\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0433\u043e\u0441\u043f\u043e\u0434\u044c Google.  <\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0442\u044c \u043d\u0430\u043c \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 Emoji \u0438\u0445 \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u0435 PNG \u043a\u043e\u043f\u0438\u0438:<\/p>\n<pre><code class=\"python\">import telebot import PIL from PIL import Image from requests import get  #\u0421\u044e\u0434\u0430 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u0442\u043e\u043a\u0435\u043d bot = telebot.TeleBot('1653707062:AAHxX29RP5HY-nVb21SSD8ZRbKpxKseSyS4')  @bot.message_handler(commands=['start']) def start_message(message):     bot.send_message(message.chat.id, '\u041f\u0440\u0438\u0448\u043b\u0438 \u043c\u043d\u0435 Emoji, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u043c.)                       @bot.message_handler(content_types=['text']) def send_text(message):     if message.text.lower() == '\u043d\u0430\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043c\u0430\u0439\u043b\u0438\u043a':         img = open('\u0421\u043c\u0430\u0439\u043b\u0438\u043a\u0438 \u0438 \u043b\u044e\u0434\u0438 1.png', 'rb')                  bot.send_document(message.chat.id, img)      elif message.text.lower() == '\u043d\u0430\u0448 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u043c\u0430\u0439\u043b\u0438\u043a':         img = open('\u0421\u043c\u0430\u0439\u043b\u0438\u043a\u0438 \u0438 \u043b\u044e\u0434\u0438 2.png', 'rb')         bot.send_document(message.chat.id, img)             else:         bot.send_message(message.chat.id, '\u041f\u0440\u043e\u0441\u0442\u0438, \u043d\u043e \u043f\u043e\u043a\u0430 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u044d\u0442\u0438\u0445 Emoji')  bot.polling() #\u0441\u0430\u043c\u0438 \u0441\u043c\u0430\u0439\u043b\u0438\u043a\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443, \u0438\u043d\u0430\u0447\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 habr<\/code><\/pre>\n<p>\u041d\u0430\u0448 \u0431\u043e\u0442 \u0433\u043e\u0442\u043e\u0432, \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0435\u0433\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.  \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u0441\u043b\u0430\u043b  <a href=\"http:\/\/telegram.me\/BotFather\" rel=\"noopener noreferrer nofollow\">BotFather<\/a>  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/20d\/588\/6c0\/20d5886c0785e0045eeab80287c5869f.png\" width=\"2278\" height=\"1800\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u043d\u0430\u0448 \u0431\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418 \u0442\u0443\u0442 \u043c\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043c \u043a \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435: \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0431\u043e\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u043c-\u0442\u043e \u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b. <\/p>\n<h3>\u0428\u0430\u0433 3. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443!<\/h3>\n<h4>\u0427\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435 \u044d\u0442\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430?<\/h4>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 (\u0412\u041c ) \u2014 \u044d\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0434\u0438\u0441\u043a, \u0430\u0434\u0430\u043f\u0442\u0435\u0440). \u042d\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0412\u041c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e. \u041f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e.<\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0448\u0435\u043c\u0443 \u0431\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c 24 \u043d\u0430 7<\/p>\n<h4>\u041a\u0430\u043a \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443?<\/h4>\n<p>\u0412\u041c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u044e\u0434\u0436\u0435\u0442\u0430. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0435\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0431\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u0432\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441. <\/p>\n<p>\u041b\u0438\u0447\u043d\u043e \u044f \u043c\u043e\u0433\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/mcs.mail.ru\/cloud-servers\/\" rel=\"noopener noreferrer nofollow\">Mail cloud solutions<\/a>  &#8212; \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 3000 \u0440. \u043d\u0430 \u0434\u0432\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430. (\u0418\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u044f \u0438 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435)<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cloud.yandex.ru\" rel=\"noopener noreferrer nofollow\">Yandex.Cloud<\/a> &#8212; \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 2000 \u0440. \u043d\u0430 \u0434\u0432\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cloud.google.com\/gcp\/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=emea-ru-all-en-dr-bkws-all-all-trial-e-gcp-1009139&amp;utm_content=text-ad-none-any-DEV_c-CRE_500325076022-ADGP_Hybrid%20%7C%20BKWS%20-%20EXA%20%7C%20Txt%20~%20GCP%20~%20General%23v29-KWID_43700053281231272-aud-488003287395%3Akwd-282319266210-userloc_9047022&amp;utm_term=KW_%D0%B3%D1%83%D0%B3%D0%BB%20%D0%BA%D0%BB%D0%B0%D1%83%D0%B4-NET_g-PLAC_&amp;ds_rl=1242853&amp;ds_rl=1245734&amp;ds_rl=1242853&amp;ds_rl=1245734&amp;gclid=Cj0KCQjwo-aCBhC-ARIsAAkNQitOPeKZZVt42ZMLuc-n33NKiSd_0zDC5IuEWnF5naY_iKUeLHLgro8aAkkKEALw_wcB&amp;gclsrc=aw.ds\" rel=\"noopener noreferrer nofollow\">Google Cloud Platform<\/a> &#8212; \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 300$ \u043d\u0430 \u0442\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. <\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b.<\/h4>\n<p>\u042f \u0432\u044b\u0431\u0440\u0430\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0431\u043e\u0442\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044d\u043d\u0435\u0440\u0433\u043e\u0440\u0435\u0441\u0443\u0440\u0441\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0b9\/69b\/a2d\/0b969ba2d645091481373d909a1038d5.png\" width=\"2324\" height=\"1596\"><figcaption><\/figcaption><\/figure>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438.<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/07a\/bae\/718\/07abae718ca69105cefa470d5a3db2d3.png\" width=\"2322\" height=\"1332\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b SSH. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0441\u0432\u044f\u0437\u043a\u0443 ssh-\u043a\u043b\u044e\u0447\u0435\u0439.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><code>$ ssh-keygen<\/code><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0438\u043c\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0438 \u043d\u0430\u0436\u043c\u0435\u043c Enter. \u041d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0441\u043e\u0437\u0434\u0430\u043d. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f public-key \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .pub. \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u043b\u0435 \u00ab\u041a\u043b\u044e\u0447 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b\u00bb<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0433\u0443. <\/p>\n<h4>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435<\/h4>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><code>ssh -i ~\/.ssh\/\u0418\u043c\u044f\u0412\u0430\u0448\u0435\u0433\u043e\u041a\u043b\u044e\u0447\u0430 ubuntu@\u0432\u0430\u0448 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 IP \u0410\u0434\u0440\u0435\u0441<\/code><\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>ssh -i ~\/.ssh\/my_key ubuntu@22.222.222.222<\/code><\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0434\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0435\u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1b4\/3fb\/28f\/1b43fb28f13f79257f85da1efb8dce8f.png\" width=\"1620\" height=\"530\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u043b\u043e\u0436\u043d\u043e\u043c\u0443 \u0448\u0430\u0433\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0442\u043e\u043b\u044c \u0442\u0440\u0443\u0434\u043d\u044b\u043c \u0434\u043b\u044f \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u044f.<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Python. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<\/li>\n<\/ul>\n<pre><code>$ sudo apt update $ sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev $ wget https:\/\/www.python.org\/ftp\/python\/3.8.5\/Python-3.8.5.tgz $ tar -xf Python-3.8.5.tgz $ cd Python-3.8.5 $ .\/configure --enable-optimizations $ make  # ~15 \u043c\u0438\u043d\u0443\u0442 $ sudo make altinstall $ cd \/home <\/code><\/pre>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>$ python3.8 -m pip install --upgrade pip  $ pip install virtualenv $ mkdir \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0412\u0430\u0448\u0435\u0433\u043e\u0411\u043e\u0442\u0430 $ cd \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0412\u0430\u0448\u0435\u0433\u043e\u0411\u043e\u0442\u0430 $ virtualenv venv $ source venv\/bin\/activate $ python -V $ deactivate <\/code><\/pre>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c Redis-server:<\/p>\n<pre><code>$ sudo apt install redis-server $ redis-cli <\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u043d\u0430\u0448 Redis-server, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u00abping\u00bb <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a9a\/a2f\/d78\/a9aa2fd780c5b86337ec69ae28a2d38b.png\" width=\"912\" height=\"190\"><figcaption><\/figcaption><\/figure>\n<p> \u0415\u0441\u043b\u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 PONG,  \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435!<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u043d\u0430\u0448 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 <a href=\"https:\/\/cyberduck.io\" rel=\"noopener noreferrer nofollow\">CyberDuck<\/a> <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f2c\/159\/e43\/f2c159e436f5c256e0f8be3aa09ba17a.png\" width=\"994\" height=\"536\"><figcaption><\/figcaption><\/figure>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e SFTP, \u0432\u0432\u043e\u0434\u0438\u043c IP \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, !\u041f\u0420\u0418\u0412\u0410\u0422\u041d\u042b\u0419! ssh-\u043a\u043b\u044e\u0447, \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b.<\/p>\n<ul>\n<li>\n<p>\u041c\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440, \u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c Python, \u043f\u0430\u043f\u043a\u043e\u0439 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0412\u0421\u0415 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/824\/a31\/d29\/824a31d2976e17d619efa2b0e3dc97f9.png\" width=\"1432\" height=\"748\"><figcaption><\/figcaption><\/figure>\n<\/li>\n<li>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u043c\u044b \u043d\u0430 \u0444\u0438\u043d\u0438\u0448\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code>$ cd \/home\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0412\u0430\u0448\u0435\u0433\u043e\u0411\u043e\u0442\u0430\/  # \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 $ source venv\/bin\/activate  # \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 $ pip install -r requirements.txt  # \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 $ python main.py  # \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0431\u043e\u0442\u0430 <\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 deactivate. \u041d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<h3>\u0428\u0430\u0433 5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0435\u0441\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/h3>\n<p>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <code>nano \/lib\/systemd\/system\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430.service<\/code><\/p>\n<pre><code>[Unit] Description=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 After=network.target  [Service] EnvironmentFile=\/etc\/environment ExecStart=\/home\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430\/venv\/bin\/python main.py ExecReload=\/home\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430\/venv\/bin\/python main.py WorkingDirectory=\/home\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430\/ KillMode=process Restart=always RestartSec=5  [Install] WantedBy=multi-user.target <\/code><\/pre>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c CTRL+O -&gt; Enter -&gt; CTRL+X \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.  \u042d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433: \u0421\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u043d\u043e \u0443\u0436\u0435 \u0441 \u0431\u0435\u0441\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439. <\/p>\n<pre><code>sudo systemctl enable \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430 sudo systemctl start \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430 <\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u0413\u041e\u0422\u041e\u0412\u041e! \u041d\u0430\u0448 \u0431\u043e\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 24\/7, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u043d\u0430\u0448 \u0441 \u0432\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0430\u043c. \u0415\u0441\u043b\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u00absudo\u00bb (\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430)<\/p>\n<p>P.S. \u0422\u0435\u043c\u0430 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0431\u043e\u0442\u043e\u0432 \u0441\u0442\u0430\u043b\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0437\u0434\u0440\u0430\u0432\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043c\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0442\u044c\u0438. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0438\u0434\u0435\u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438\u0445 \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u0442\u044c. <\/p>\n<p>\u0425\u043e\u0447\u0443 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440  \u043c\u043e\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u0443\u044e \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 2 \u0441\u0435\u043a\u0443\u043d\u0434: <a href=\"https:\/\/t.me\/Facsimile_bot\" rel=\"noopener noreferrer nofollow\">Telegram: Contact <\/a><a class=\"mention\" href=\"\/users\/facsimile_bot\">@Facsimile_bot<\/a><\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/549962\/\"> https:\/\/habr.com\/ru\/post\/549962\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<h3>\u041a\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u044b \u0447\u0430\u0442-\u0431\u043e\u0442\u044b?<\/h3>\n<p>\u0420\u044b\u043d\u043e\u043a \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u0432 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0440\u0430\u0441\u0442\u0435\u0442 \u0441 \u0431\u0435\u0448\u0435\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e  \u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0435\u0436\u0435\u0433\u043e\u0434\u043d\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043d\u0430 30% \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0442\u0440\u0435\u0445 \u043b\u0435\u0442.  \u0412 2020 \u0433. \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u044b  \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0430 17% \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 2019 \u0433. \u0411\u043e\u043b\u044c\u0448\u0438\u043c \u0441\u043f\u0440\u043e\u0441\u043e\u043c \u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u043b\u044c\u00ad\u0437\u043e\u00ad\u0432\u0430\u0442\u044c\u00ad\u0441\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u0431\u043e\u0442\u044b, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043d\u0438\u0445 \u0432\u044b\u0440\u043e\u0441\u043b\u043e \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u0430. \u0412 2021 \u0433. \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0441\u0442 \u0447\u0438\u0441\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0447\u0430\u0442-\u0431\u043e\u0442\u044b \u043d\u0430 15-20% \u043e\u0442 \u043e\u0440\u00ad\u0433\u0430\u00ad\u043d\u0438\u0437\u0430\u00ad\u0446\u0438\u0439 \u0438\u0437 \u0433\u043e\u0441\u0441\u0435\u043a\u0442\u043e\u0440\u0430, \u043e\u0431\u00ad\u0440\u0430\u00ad\u0437\u043e\u0432\u0430\u00ad\u043d\u0438\u044f, \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u044b, \u043b\u043e\u00ad\u0433\u0438\u0441\u00ad\u0442\u0438\u00ad\u043a\u0438, \u0440\u0435\u00ad\u0442\u0435\u0439\u00ad\u043b\u0430 \u0438 e-commerce, \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0445 \u0438 \u0434\u043e\u0431\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439.<\/p>\n<h3>\u0428\u0430\u0433\u0438<\/h3>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0430\u0448\u0435\u0433\u043e telegram \u0431\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u043f\u043e\u0434 \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c <\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0434\u043b\u044f \u0435\u0433\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0431\u0435\u0441\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u043e\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<h3>\u0428\u0430\u0433 1.  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430 \u0432 Telegram<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0448\u0430\u0433\u0430 \u043e\u043f\u0438\u0448\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043c\u043d\u043e\u0433\u043e \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0435\u0442 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0438\u043a\u0430\u043a\u0438\u0445  \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0435\u0439. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <a href=\"http:\/\/telegram.me\/BotFather\" rel=\"noopener noreferrer nofollow\">BotFather<\/a><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0428\u0430\u0433 2. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e.<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 telebot, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p><code>$ pip install pytelegrambotapi<\/code><\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0435\u0441\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0433\u043e\u0441\u043f\u043e\u0434\u044c Google.  <\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0442\u044c \u043d\u0430\u043c \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 Emoji \u0438\u0445 \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u0435 PNG \u043a\u043e\u043f\u0438\u0438:<\/p>\n<pre><code class=\"python\">import telebot import PIL from PIL import Image from requests import get  #\u0421\u044e\u0434\u0430 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u0442\u043e\u043a\u0435\u043d bot = telebot.TeleBot('1653707062:AAHxX29RP5HY-nVb21SSD8ZRbKpxKseSyS4')  @bot.message_handler(commands=['start']) def start_message(message):     bot.send_message(message.chat.id, '\u041f\u0440\u0438\u0448\u043b\u0438 \u043c\u043d\u0435 Emoji, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u043c.)                       @bot.message_handler(content_types=['text']) def send_text(message):     if message.text.lower() == '\u043d\u0430\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043c\u0430\u0439\u043b\u0438\u043a':         img = open('\u0421\u043c\u0430\u0439\u043b\u0438\u043a\u0438 \u0438 \u043b\u044e\u0434\u0438 1.png', 'rb')                  bot.send_document(message.chat.id, img)      elif message.text.lower() == '\u043d\u0430\u0448 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u043c\u0430\u0439\u043b\u0438\u043a':         img = open('\u0421\u043c\u0430\u0439\u043b\u0438\u043a\u0438 \u0438 \u043b\u044e\u0434\u0438 2.png', 'rb')         bot.send_document(message.chat.id, img)             else:         bot.send_message(message.chat.id, '\u041f\u0440\u043e\u0441\u0442\u0438, \u043d\u043e \u043f\u043e\u043a\u0430 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u044d\u0442\u0438\u0445 Emoji')  bot.polling() #\u0441\u0430\u043c\u0438 \u0441\u043c\u0430\u0439\u043b\u0438\u043a\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443, \u0438\u043d\u0430\u0447\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 habr<\/code><\/pre>\n<p>\u041d\u0430\u0448 \u0431\u043e\u0442 \u0433\u043e\u0442\u043e\u0432, \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0435\u0433\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.  \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u0441\u043b\u0430\u043b  <a href=\"http:\/\/telegram.me\/BotFather\" rel=\"noopener noreferrer nofollow\">BotFather<\/a>  <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u043d\u0430\u0448 \u0431\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418 \u0442\u0443\u0442 \u043c\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043c \u043a \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435: \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0431\u043e\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u043c-\u0442\u043e \u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b. <\/p>\n<h3>\u0428\u0430\u0433 3. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443!<\/h3>\n<h4>\u0427\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435 \u044d\u0442\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430?<\/h4>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 (\u0412\u041c ) \u2014 \u044d\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0434\u0438\u0441\u043a, \u0430\u0434\u0430\u043f\u0442\u0435\u0440). \u042d\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0412\u041c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e. \u041f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e.<\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0448\u0435\u043c\u0443 \u0431\u043e\u0442\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c 24 \u043d\u0430 7<\/p>\n<h4>\u041a\u0430\u043a \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443?<\/h4>\n<p>\u0412\u041c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u044e\u0434\u0436\u0435\u0442\u0430. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0435\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0431\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u0432\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441. <\/p>\n<p>\u041b\u0438\u0447\u043d\u043e \u044f \u043c\u043e\u0433\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/mcs.mail.ru\/cloud-servers\/\" rel=\"noopener noreferrer nofollow\">Mail cloud solutions<\/a>  &#8212; \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 3000 \u0440. \u043d\u0430 \u0434\u0432\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430. (\u0418\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u044f \u0438 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435)<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cloud.yandex.ru\" rel=\"noopener noreferrer nofollow\">Yandex.Cloud<\/a> &#8212; \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 2000 \u0440. \u043d\u0430 \u0434\u0432\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cloud.google.com\/gcp\/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=emea-ru-all-en-dr-bkws-all-all-trial-e-gcp-1009139&amp;utm_content=text-ad-none-any-DEV_c-CRE_500325076022-ADGP_Hybrid%20%7C%20BKWS%20-%20EXA%20%7C%20Txt%20~%20GCP%20~%20General%23v29-KWID_43700053281231272-aud-488003287395%3Akwd-282319266210-userloc_9047022&amp;utm_term=KW_%D0%B3%D1%83%D0%B3%D0%BB%20%D0%BA%D0%BB%D0%B0%D1%83%D0%B4-NET_g-PLAC_&amp;ds_rl=1242853&amp;ds_rl=1245734&amp;ds_rl=1242853&amp;ds_rl=1245734&amp;gclid=Cj0KCQjwo-aCBhC-ARIsAAkNQitOPeKZZVt42ZMLuc-n33NKiSd_0zDC5IuEWnF5naY_iKUeLHLgro8aAkkKEALw_wcB&amp;gclsrc=aw.ds\" rel=\"noopener noreferrer nofollow\">Google Cloud Platform<\/a> &#8212; \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 300$ \u043d\u0430 \u0442\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. <\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b.<\/h4>\n<p>\u042f \u0432\u044b\u0431\u0440\u0430\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0431\u043e\u0442\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044d\u043d\u0435\u0440\u0433\u043e\u0440\u0435\u0441\u0443\u0440\u0441\u044b.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438.<\/h4>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b SSH. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0441\u0432\u044f\u0437\u043a\u0443 ssh-\u043a\u043b\u044e\u0447\u0435\u0439.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><code>$ ssh-keygen<\/code><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0438\u043c\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0438 \u043d\u0430\u0436\u043c\u0435\u043c Enter. \u041d\u0430\u0448 \u043a\u043b\u044e\u0447 \u0441\u043e\u0437\u0434\u0430\u043d. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f public-key \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .pub. \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u043b\u0435 \u00ab\u041a\u043b\u044e\u0447 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b\u00bb<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0433\u0443. <\/p>\n<h4>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435<\/h4>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><code>ssh -i ~\/.ssh\/\u0418\u043c\u044f\u0412\u0430\u0448\u0435\u0433\u043e\u041a\u043b\u044e\u0447\u0430 ubuntu@\u0432\u0430\u0448 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 IP \u0410\u0434\u0440\u0435\u0441<\/code><\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>ssh -i ~\/.ssh\/my_key ubuntu@22.222.222.222<\/code><\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0434\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0435\u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u043b\u043e\u0436\u043d\u043e\u043c\u0443 \u0448\u0430\u0433\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0442\u043e\u043b\u044c \u0442\u0440\u0443\u0434\u043d\u044b\u043c \u0434\u043b\u044f \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u044f.<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Python. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<\/li>\n<\/ul>\n<pre><code>$ sudo apt update $ sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev $ wget https:\/\/www.python.org\/ftp\/python\/3.8.5\/Python-3.8.5.tgz $ tar -xf Python-3.8.5.tgz $ cd Python-3.8.5 $ .\/configure --enable-optimizations $ make  # ~15 \u043c\u0438\u043d\u0443\u0442 $ sudo make altinstall $ cd \/home <\/code><\/pre>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>$ python3.8 -m pip install --upgrade pip  $ pip install virtualenv $ mkdir \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0412\u0430\u0448\u0435\u0433\u043e\u0411\u043e\u0442\u0430 $ cd \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0412\u0430\u0448\u0435\u0433\u043e\u0411\u043e\u0442\u0430 $ virtualenv venv $ source venv\/bin\/activate $ python -V $ deactivate <\/code><\/pre>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c Redis-server:<\/p>\n<pre><code>$ sudo apt install redis-server $ redis-cli <\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u043d\u0430\u0448 Redis-server, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u00abping\u00bb <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p> \u0415\u0441\u043b\u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 PONG,  \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435!<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u043d\u0430\u0448 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 <a href=\"https:\/\/cyberduck.io\" rel=\"noopener noreferrer nofollow\">CyberDuck<\/a> <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e SFTP, \u0432\u0432\u043e\u0434\u0438\u043c IP \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, !\u041f\u0420\u0418\u0412\u0410\u0422\u041d\u042b\u0419! ssh-\u043a\u043b\u044e\u0447, \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b.<\/p>\n<ul>\n<li>\n<p>\u041c\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440, \u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c Python, \u043f\u0430\u043f\u043a\u043e\u0439 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0412\u0421\u0415 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<\/li>\n<li>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u043c\u044b \u043d\u0430 \u0444\u0438\u043d\u0438\u0448\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code>$ cd \/home\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0412\u0430\u0448\u0435\u0433\u043e\u0411\u043e\u0442\u0430\/  # \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 $ source venv\/bin\/activate  # \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 $ pip install -r requirements.txt  # \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 $ python main.py  # \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0431\u043e\u0442\u0430 <\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 deactivate. \u041d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<h3>\u0428\u0430\u0433 5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0435\u0441\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/h3>\n<p>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <code>nano \/lib\/systemd\/system\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430.service<\/code><\/p>\n<pre><code>[Unit] Description=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 After=network.target  [Service] EnvironmentFile=\/etc\/environment ExecStart=\/home\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430\/venv\/bin\/python main.py ExecReload=\/home\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430\/venv\/bin\/python main.py WorkingDirectory=\/home\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430\/ KillMode=process Restart=always RestartSec=5  [Install] WantedBy=multi-user.target <\/code><\/pre>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c CTRL+O -&gt; Enter -&gt; CTRL+X \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.  \u042d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433: \u0421\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u043d\u043e \u0443\u0436\u0435 \u0441 \u0431\u0435\u0441\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439. <\/p>\n<pre><code>sudo systemctl enable \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430 sudo systemctl start \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0411\u043e\u0442\u0430 <\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u0413\u041e\u0422\u041e\u0412\u041e! \u041d\u0430\u0448 \u0431\u043e\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 24\/7, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u043d\u0430\u0448 \u0441 \u0432\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0430\u043c. \u0415\u0441\u043b\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u00absudo\u00bb (\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430)<\/p>\n<p>P.S. \u0422\u0435\u043c\u0430 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0431\u043e\u0442\u043e\u0432 \u0441\u0442\u0430\u043b\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0437\u0434\u0440\u0430\u0432\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043c\u043e\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0442\u044c\u0438. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0438\u0434\u0435\u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438\u0445 \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u0442\u044c. <\/p>\n<p>\u0425\u043e\u0447\u0443 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440  \u043c\u043e\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u0443\u044e \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 2 \u0441\u0435\u043a\u0443\u043d\u0434: <a href=\"https:\/\/t.me\/Facsimile_bot\" rel=\"noopener noreferrer nofollow\">Telegram: Contact <\/a><a class=\"mention\" href=\"\/users\/facsimile_bot\">@Facsimile_bot<\/a><\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/549962\/\"> https:\/\/habr.com\/ru\/post\/549962\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320622","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320622"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320622\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}