Open henryliangt opened 3 years ago
安装PY3 两步 YUM 安装:
yum update -y yum install -y python3
测试: python3
手动安装: yum install gcc openssl-devel bzip2-devel libffi-devel -y curl -O https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
tar -xzf Python-3.8.1.tgz cd Python-3.8.1/ ./configure --enable-optimizations make altinstall python3.8
login key-pair
ssh-keygen && cd .ssh && cat id_rsa.pub >> authorized_keys && chmod 600 authorized_keys && chmod 700 ~/.ssh && echo 'RSAAuthentication yes' >> /etc/ssh/sshd_config && echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config && service sshd restart && vim .ssh/id_rsa.pub
ssh-keygen
cd .ssh cat id_rsa.pub >> authorized_keys
chmod 600 authorized_keys chmod 700 ~/.ssh
vim /etc/ssh/sshd_config RSAAuthentication yes PubkeyAuthentication yes
PermitRootLogin yes
PasswordAuthentication no
service sshd restart
id_rsa copy to local machine
sudo yum -y install epel-release && sudo yum install fail2ban && sudo systemctl enable fail2ban
echo '123.123.123.123' >> /etc/fail2ban/jail.local cat /etc/fail2ban/jail.local sudo vim /etc/fail2ban/jail.local ''' [DEFAULT]
bantime = 3600
banaction = iptables-multiport
[sshd] enabled = true '''
sudo systemctl restart fail2ban sudo fail2ban-client status
sudo fail2ban-client status sshd
sudo nano /etc/fail2ban/jail.conf
ls /etc/fail2ban/filter.d
sudo journalctl -b -u fail2ban
sudo tail -F /var/log/fail2ban.log sudo tail -F /var/log/fail2ban.log sudo iptables -S
Install BT
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh