zoukankan      html  css  js  c++  java
  • 服务器相关指令

    开通阿里ECS,请先设置安全组规则

    https://blog.csdn.net/sinat_25957705/article/details/80641077 

    一、登录

    ssh root@你的公网IP 
    //ssh user@host 
    //$ ssh -p 2222 user@host

     SSH的默认端口是22。使用p参数,可以修改这个端口。

    退出:Control+d

    常见的SSH命令

    二、nginx 

    安装nginx

    yum -y install nginx
    systemctl start nginx.service  //启动服务

    nginx查看配置文件是否正确 查看nginx.conf路径

       首先执行命令找到nginx路径
                 ps aux | grep nginx
        如nginx路径为
          /usr/local/nginx/sbin/nginx

        contos 下面查看 nginx配置是否OK

          /usr/local/nginx/sbin/nginx -t

    nginx是否运行正常

      netstat -anput | grep nginx

     

    Nginx 相关介绍(Nginx是什么?能干嘛?)

    https://blog.csdn.net/zyhlearnjava/article/details/71908529

    三 iptables 防火墙

     关闭 firewalld
           关闭 firewalld 服务:systemctl stop firewalld
        禁用 firewalld 服务:systemctl disable firewalld
      开启 iptables
       安装 iptables:yum -y install iptables-services
       启用 iptables:systemctl enable iptables
       开启 iptables:systemctl start iptables

    #vi /etc/sysconfig/iptables  

    Centos7默认的防火墙是firewalld防火墙,不是使用iptables,因此需要先关闭firewalld服务,或者干脆使用默认的firewalld防火墙

     https://blog.csdn.net/chocolee911/article/details/80688200

    http://www.zsythink.net/archives/1199

    四 Hexo

    对于 Hexo 来说,每次使用hexo g生成好的静态站点内容,都生成在hexo/public目录下。

    为了部署网站,我们需要将hexo/public目录的内容拷贝到 Nginx 的html目录下。

    ECS 上 Nginx 的html目录是/usr/share/nginx/html。

    hexo/public cp到 /usr/share/nginx/htm/public,并修改 Nginx 的location配置: 

     location / {
            root   html/public;
            index  index.html;
        }

    修改好之后,重启nginx服务;

    nginx -s reload

    五, shadowsocks:科学上网。

    阿里云ECS 搭建Shadowsocks

    科学上网介绍

     https://crifan.github.io/scientific_network_summary/website/scientific_network_intro/

    六  VPN

    1.安装 ppp pptpd iptables

    ppp 数据链路层协议

    pptpd VPN服务类型之一

    iptables 防火墙,用来消息转发         (CentOS 7不用装)

     yum install ppp pptpd iptables     

    https://blog.csdn.net/rock_joker/article/details/72722137

     https://blog.csdn.net/Dreamweav2004/article/details/82458398

    https://yq.aliyun.com/ziliao/27444

    七   netstat

    端口是否正常打开

    使用netstat命令查看端口状况:

    netstat -an |grep 端口号
  • 相关阅读:
    2017年度最具商业价值人工智能公司TOP50 榜单发布
    滑动swipe的妙用
    UE3优化
    UE4 框架
    制作HUD
    Component概念
    手游记事
    C++与UnrealScript脚本交互
    unreal Script(US)一些注意事项
    UDK游戏打包详解
  • 原文地址:https://www.cnblogs.com/developer-qin/p/10110578.html
Copyright © 2011-2022 走看看