zoukankan      html  css  js  c++  java
  • CentOS7的一些初始化

    默认最小化安装

    [root@GVMCET001 ~]# nmtui   设置网络,主机名等

    [root@GVMCET001 ~]# yum update   更新系统

    SSH

    [root@GVMCET001 ~]# ss -ntl   查看SSH端口状态

    [root@GVMCET001 ~]# systemctl status sshd  查看SSH服务状态 

    [root@GVMCET001 ~]# vi /etc/ssh/sshd_config  配置SSH服务

    防火墙

    [root@GHKVPS001 ~]# systemctl start firewalld

    [root@GHKVPS001 ~]# systemctl enable firewalld

    [root@GHKVPS001 ~]# systemctl status firewalld

    [root@GHKVPS001 ~]# firewall-cmd --list-all

    [root@GHKVPS001 ~]#  firewall-cmd --add-service=http --permanent    #添加http服务,永久生效

    [root@GHKVPS001 ~]# firewall-cmd --add-service=https --permanent     #添加https服务,永久生效

    [root@GHKVPS001 ~]# firewall-cmd --reload

    新建用户并禁用root登录 更改登录端口

    [root@GHKVPS001 ~]# useradd lyndon

    [root@GHKVPS001 ~]# passwd lyndon

    [root@GHKVPS001 ~]# vi /etc/ssh/sshd_config

    #Port 22         //删除

    Port 33389      //添加

    PermitRootLogin no

    [root@GHKVPS001 ~]# systemctl restart sshd.service

    [root@GHKVPS001 ~]# firewall-cmd --permanent --add-port=33389/tcp

    [root@GHKVPS001 ~]# firewall-cmd --permanent --remove-service=ssh

    授权用户root使用密码xxx从指定ip为103.224.83.42的主机连接到mysql服务器

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'103.224.83.42' IDENTIFIED BY 'XXX' WITH GRANT OPTION;

    flush privileges;

  • 相关阅读:
    SRS之SrsRtmpConn::service_cycle详解
    SRS之SrsRtmpServer::connect_app详解
    SRS之RTMP连接处理线程conn:接收客户端推流
    SRS之RTMP handshake
    SRS之RTMP的TCP线程(即监听线程)
    CSPS模拟 77
    CSPS模拟 76
    CSPS模拟 75
    CSPS模拟 74
    CSPS模拟 73
  • 原文地址:https://www.cnblogs.com/gocd/p/7079928.html
Copyright © 2011-2022 走看看