甲骨文云关闭防火墙、root登入、改名
用户名是opc或ubuntu
切换到root角色
sudo -i
- 安装相关依赖
CentOS如下
yum -y install wget
yum update -y && yum install curl -y
Ubuntu如下
apt-get install wget
apt-get update -y && apt-get install curl -y
- 删除、关闭、打开各自系统的无用附件、防火墙、端口及规则
CentOS系统
删除多余附件
systemctl stop oracle-cloud-agent
systemctl disable oracle-cloud-agent
systemctl stop oracle-cloud-agent-updater
systemctl disable oracle-cloud-agent-updater
停止firewall
systemctl stop firewalld.service
禁止firewall开机启动
systemctl disable firewalld.service
关闭iptables
service iptables stop
去掉iptables开机启动
chkconfig iptables off
开放所有端口
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -F
Oracle自带的Ubuntu镜像默认设置了Iptable规则,关闭它
apt-get purge netfilter-persistent
reboot
强制删除
rm -rf /etc/iptables && reboot
除此之外如果创建了安全组还需要自行放行安全组
- 修改为密码登入
vi /etc/ssh/sshd_config
设置为密码登陆方式查找
PermitRootLogin yes
删除前面的#注释
查找
PasswordAuthentication no
改为
PasswordAuthentication yes
重启ssh服务或重启服务器
service sshd restart
- 改名
hostnamectl set-hostname