[go: up one dir, main page]

0% found this document useful (0 votes)
11 views3 pages

Instalacao Ubuntu

The document outlines the initial steps to take after installing Ubuntu Server, including updating the system and installing essential packages like Python and Pip. It also details the installation of Instabot.py and Telegram notification setup, along with examples of usage. Additionally, it provides links for further reference and configuration tips.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Instalacao Ubuntu

The document outlines the initial steps to take after installing Ubuntu Server, including updating the system and installing essential packages like Python and Pip. It also details the installation of Instabot.py and Telegram notification setup, along with examples of usage. Additionally, it provides links for further reference and configuration tips.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Primeiros passos após instalar o Ubuntu Server

-----Atualizar os aplicativos e o sistema-----


sudo apt-get update

sudo apt-get upgrade

prepara os pacotes faz o upgrade do servidor:

sudo apt-get update && sudo apt-get dist-upgrade

---Reiniciar após a atualização dos pacotes do upgrade---

sudo shutdown –r now

sudo apt-get install update-manager-core

-----Copia diretório importante do sistema-----


sudo cp /etc/update-manager/release-upgrades /etc/update-manager/release-upgrades.original

sudo sed -i 's/Prompt=normal/Prompt=lts/g' /etc/update-manager/release-upgrades

---Faz o upgrade do servidor---


sudo do-release-upgrade -d

---Reinicia o servidor após o upgrade---


sudo reboot

---verifica a versão instalada do servidor---


lsb_release -a

-----Instalando python-----
https://github.com/instabot-py/instabot.py/wiki/Installing-Python-3.7-on-Raspberry-Pi

apt-get update -y

apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev


libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-
dev libffi-dev -y

---Baixando o arquivo---
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz

---Descompacta o arquivo---
tar xf Python-3.7.2.tar.xz

---Entra na pasta---
cd Python-3.7.2

---Configurar Python---
./configure

make -j 4

sudo make altinstall


-----Instalando Pip no Pythin3-----
https://linuxize.com/post/how-to-install-pip-on-ubuntu-18.04/

--Atualiza os pacotes---
sudo apt update

--Instala o python3
sudo apt install python3-pip

---Verifica a versão instalada no servidor---


pip3 --version

-----Instalando Instabot.py----
https://www.youtube.com/watch?v=n-MQ3XSfFXU

---volte para a pasta onde deseja instalar o instabot---


cd /home/pedro

---Clonando o instabot do servidor do github---


git clone https://github.com/instabot-py/instabot.py.git

---Instala o Instabot.py---
pip3 install instabot.py/

---Entra dentro da pasta do instabot---


cd instabot.py

---rodar o programa (entrar na pasta do instabot)---


instabot-py

-----Instalando Telegram no servidor-----


http://bernaerts.dyndns.org/linux/75-debian/351-debian-send-telegram-notification
https://www.oanalista.com.br/2017/07/17/telegram-notify-servidor-telegram/
https://core.telegram.org/bots

wget https://raw.githubusercontent.com/NicolasBernaerts/debian-
scripts/master/telegram/telegram-notify-install.sh

---Configura as permissões do arquivo---


chmod a+x telegram-notify-install.sh

sudo ./telegram-notify-install.sh

nano /etc/telegram-notify.conf

---Exemplo de mensagem---
sudo telegram-notify --success
--text "Action *sucessful* with
markdown *bold* example"
*Não reconfigurar o idioma, isso está quebrando uma pasta dentro do servidor.
update-locale LANG = en_US.UTF-8 LANGUAGE = en.UTF-8

-----Instalar Virtualenv---
sudo apt-get install -y python3-venv

mkdir ambientes

cd ambientes

-----Exemplos de mensagens do Telegram-----

# telegram-notify --success --text "Action *sucessful* with markdown *bold* example"

# telegram-notify --error --title "Error" --text "Error message with a title"

https://blog.pythonanywhere.com/148/
https://core.telegram.org/bots#3-how-do-i-create-a-bot
https://github.com/instabot-py/instabot.py
https://github.com/NicolasBernaerts/debian-scripts/blob/master/telegram/telegram-notify
https://github.com/GabrielRF/Zabbix-Telegram-Notification
https://github.com/GabrielRF/telegram-id
http://www.bernaerts-nicolas.fr/linux/75-debian/351-debian-send-telegram-notification
http://blog.tiagopassos.com/2016/04/29/como-criar-script-linux/

You might also like