汇成软件 Create the world!!!

Centos7端口查看命令

查看Centos端口命令: 
# netstat -lntp #查看监听(Listen)的端口
# netstat -antp #查看所有建立的TCP连接
其他关于查看服务器网络信息命令:
1、查看Linux系统主机名:
    # hostname
    localhost.localdomain
2、查看服务器IP地址:
    # ifconfig|grep 'inet addr:'|grep -v '127.0.0.1'|cut -d: -f2|awk '{ print $1}'
    192.168.1.89
    192.168.1.1
3、查看linux网关:
    # route |grep default
    default 192.168.1.1 0.0.0.0 UG 0 0 0 em1
4、查看linux打开服务:
    # chkconfig --list|grep 启用 #查看开启的服务
    sshd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
    httpd 0:关闭 1:关闭 2:关闭 3:启用 4:关闭 5:关闭 6:关闭
5、查看服务器DNS配置:
    # cat /etc/resolv.conf
    nameserver 223.5.5.5
    nameserver 223.6.6.6
6、其他网络信息:
    # iptables -L #查看防火墙规则
    # route -n #查看路由表
    # netstat -s #查看网络统计信息

————————————————
版权声明:本文为CSDN博主「小小白兔兔」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/InternetJava/article/details/120381977
作者:admin 分类:Linux 浏览:312 评论:0

centos7 关闭防火墙

1、命令行界面输入命令“systemctl status firewalld.service”并按下回车键。


2、然后在下方可度以查看得到“active(running)”,此时说明防火墙已经被打开了。


3、在命令行中输入systemctl stop firewalld.service命令,进行关闭防火墙。


4、然后再使用命令systemctl status firewalld.service,在下方出现disavtive(dead),这权样就说明防火墙已经关闭。

作者:admin 分类:IT技术 浏览:390 评论:0

在Shopify自建站中添加Google客户评论功能,增加GMC排名

在Shopify自建站中添加Google客户评论功能,增加GMC排名

// this code works(4 Oct 2018), it might need changes depending on if and when shopify or google changes their code)
// Paste this code carefully with in the script tags

window.renderOptIn = function() {
    window.gapi.load('surveyoptin', function() {

    //this code gets all the UPC codes for products ordered, and adds them to product array
    //skip products fields it if you are not using global identifier, it also means that your review is not co-nthrelated back to products ordered

    var products = [
      {% for item in order.line_items %}
        {
          "gtin": {{ item.variant.barcode }}
        },

      {% endfor %}

      ];

      window.gapi.surveyoptin.render(

        {

          // REQUIRED FIELDS

          "merchant_id": 12345, //replace with your own google merchant id

          "order_id": "{{order.order_number}}",

          "email": "{{order.email}}",

          "delivery_country": "{{order.shipping_address.country_code}}",

          //this date dictates when review email would be sent if customer opt in, "plus:345600" is number of seconds for 4 days. Change the number of seconds to delivery time (432000 = 5 days, 604800 = 7 days).

          "estimated_delivery_date": "{{ order.created_at | date:'%s' | plus:345600 | date:'%F' }}",

          //optional: delete this line if you are skipping product GTIN

          "products": [{% for item in order.line_items %}{"gtin":"{{ item.variant.barcode }}"}{% unless forloop.last %}, {% endunless %}{% endfor %}]

          //optional: setting to where to display the dialog(prompt customer to opt in)

          "opt_in_style": "CENTER_DIALOG"

        });

  });

}
作者:admin 分类:网站运营 浏览:367 评论:0

Nginx设置跨域

配置代码

    add_header Access-Control-Allow-Origin '*';
    add_header Access-Control-Allow-Methods 'POST,PUT,GET,DELETE';
    add_header Access-Control-Allow-Headers 'version, access-token, user-token, Accept, apiAuth, User-Agent, Keep-Alive, Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With';
作者:admin 分类:Linux 浏览:580 评论:0