2020年5月9日星期六

oracle云服务器申请

oracle之前提供了免费的云服务器,据说是终身免费的。不过之前申请后用了一段时间居然被删除了!当时也没想再用,因为速度也不快,不过现在有需要把它重新用起来,于是就重新申请了一个来搭建fq的服务。
oracle的云服务器创建还是比较简单,不过有个坑的地方是有两个地方的防火墙设置,设置ok后才能使用。
第一个地方:云服务器的子网里面有设置防火墙,需要在入站规则里面把服务的端口打开。
第二个地方:在云主机上面,需要把iptables对应的端口打开。
root@instance-xxx:/home/ubuntu# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     udp  --  anywhere             anywhere             udp spt:ntp
ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited
可以看到没有打开我们的服务端口,需要增加一条INPUT规则:
iptables -i INPUT 2 -m tcp --dport 10086 -j ACCEPT

注意不要添加到最后面,-i INPUT 2 即添加到第二条规则。然后就可以访问我们的服务了。