Skip to content

Instantly share code, notes, and snippets.

View cloudsmithy's full-sized avatar
🎯
Focusing

cloudsmithy cloudsmithy

🎯
Focusing
  • Beijing
  • 16:09 (UTC +08:00)
View GitHub Profile
@cloudsmithy
cloudsmithy / init.sh
Last active April 6, 2022 02:58
RHCE_init.sh
sudo yum install -y yum-utils qemu-img htop git iotop neofetch axel vim zsh
axel -n 8 https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
# install docker
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io -y
sudo systemctl start docker
sudo systemctl enable docker
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
@cloudsmithy
cloudsmithy / xdrp_i.sh
Last active July 29, 2022 23:16
install xrdp and GUI and RHEL8
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum groupinstall -y "Server with GUI"
sudo yum install -y tigervnc-server xrdp
sudo systemctl start xrdp.service
sudo systemctl status xrdp.service
sudo systemctl enable xrdp.service
sudo netstat -antp | grep xrdp
sudo systemctl status firewalld.service
@cloudsmithy
cloudsmithy / app.py
Last active October 14, 2023 11:33
flask_ip
from flask import Flask, jsonify
import requests
app = Flask(__name__)
@app.route('/')
def index():
local_ip = requests.get('https://checkip.amazonaws.com').text.strip()
return jsonify({