Deploy and Configure Ubuntu-Server
sudo apt-get update && sudo apt-get upgrade -y &&
sudo apt-get install tmux lnav tree curl wget nmap git python3 python sed vim nano net-tools -y
More info: https://github.com/Nyr/openvpn-install
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
Install the client openvpn:
sudo apt-get install openvpn
Demonize the client:
STEP 1:
export OVPN_CLIENT_NAME=YOUR_OVPN_FILE
OVPN_CLIENT_NAME=$(echo $OVPN_CLIENT_NAME | awk -F. '{print $1}')
STEP 2:
mv -v ${OVPN_CLIENT_NAME}.ovpn /etc/openvpn/client/${OVPN_CLIENT_NAME}.conf &&
sudo systemctl restart openvpn-client@${OVPN_CLIENT_NAME} &&
sudo systemctl enable openvpn-client@${OVPN_CLIENT_NAME}
sudo apt-get install openssh-server ssh;
sudo apt-get install zsh -y && sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
sed -i 's/ZSH_THEME=.*/ZSH_THEME="flazz"/' ~/.zshrc;
sudo apt-get install chrony -y &&
sudo systemctl start chrony &&
sudo systemctl enable chrony &&
sudo timedatectl set-timezone "Europe/Moscow" &&
echo "Date was succsessfully changed\nNow is $( date )"
sudo apt-get install make git zlib1g-dev libssl-dev gperf cmake g++ build-essential;
sudo apt-get update && sudo apt-get upgrade -y &&
sudo apt-get install make git zlib1g-dev libssl-dev gperf cmake g++ -y &&
git clone --recursive https://github.com/tdlib/telegram-bot-api.git &&
cd telegram-bot-api &&
rm -rf build &&
mkdir build &&
cd build &&
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. &&
cmake --build . --target install &&
cd ../.. &&
ls -l telegram-bot-api/bin/telegram-bot-api*
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - && \
sudo apt-get install apt-transport-https && \
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list && \
sudo apt-get update && sudo apt-get install elasticsearch -y;
sudo /bin/systemctl daemon-reload && \
sudo /bin/systemctl enable elasticsearch.service && \
sudo systemctl restart elasticsearch.service && \
sudo systemctl status elasticsearch.service
Add 0.0.0.0 listen to elasticsearch
echo -e "discovery.seed_hosts: [\"127.0.0.1\", \"[::1]\"]\nnetwork.host: 0.0.0.0" \
>> /etc/elasticsearch/elasticsearch.yml && sudo systemctl restart elasticsearch