zoukankan      html  css  js  c++  java
  • linux暴露端口可以被外部访问


    linux暴露端口可以被外部访问,把端口号换成要暴露的端口:
    /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

    Centos 7 开启端口
    CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的,CentOS 7 采用了 firewalld 防火墙
    查询是否开启80端口则:firewall-cmd --query-port=80/tcp
    开启80端口:firewall-cmd --add-port=80/tcp

    启动mysql:systemctl start mysqld

    InfluxDb
    配置文件:/etc/influxdb/influxdb.conf
    操作:
    1、启动InfluxDb:systemctl start influxdb  或者:influxd 后台启动:nohup ./influxd
    2、查看InfluxDb状态:systemctl status influxdb
    3、停止InfluxDb:systemctl stop influxdb

    /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

  • 相关阅读:
    第五周总结 8.11
    第四周总结 8.2
    第三周总结7.27
    PHP实验四
    PHP实验一
    PHP实验三
    软件工程课程总结
    《梦断代码》阅读笔记03
    找水王
    评价搜狗输入法
  • 原文地址:https://www.cnblogs.com/zhongyehai/p/10643074.html
Copyright © 2011-2022 走看看