zoukankan      html  css  js  c++  java
  • CentOS7 配置环境

    1.安装CentOS 配置环境

    (1)虚拟机中安装CentOS,进入系统使用yum命令不止正常执行……

      

       原因:

       需要设置网卡激活

       解决方法:

        vi /etc/sysconfig/network-scripts/ifcfg-ens33

       修改:ONBOOT=yes

     

      重启计算机: reboot

    (2)安装openssh-server,全部手敲命令行太累,偷个懒 ,装完openssh 可用ssh命令在windows上连接centOS

        yum -install -y openssh-server

       安装完了需要修改配置文件:

       vi /etc/ssh/sshd_config

    修改内容:

    Port 22
    ListenAddress 0.0.0.0
    ListenAddress ::
    PermitRootLogin yes
    PasswordAuthentication yes

     

    (3)设置防火墙权限

      关闭firewall 安装iptables 修改配置文件

    #关闭firewall
    systemctl stop firewalld #关闭firewall
    systemctl disable firewalld#禁用firewall
    systemctl enable firewalld #启用firewall
    systemctl status firewalld #查看firewall 状态

    yum install iptables

    systemctl stop iptables # 关闭iptables
    systemctl start iptables # 启动iptables
    systemctl restart iptables # 重启 iptables
    systemctl enable iptables# 启用
    systemctl disable iptables#禁用
    systemctl status iptables#查看状态

    sudo systemctl stop firewalld.service
    sudo systemctl disable firewalld.service
    sudo yum install iptables-services
    sudo systemctl enable iptables
    sudo systemctl enable ip6tables
    sudo systemctl start iptables
    sudo systemctl start ip6tables

    vi /etc/sysconfig/iptables

     这时候只是把系统环境配置好了,能进行远程访问了,使用苦逼的命令行太难受了。。。。。

  • 相关阅读:
    DAO层的作用
    JSP+DAO中servlet的作用
    Linux常用命令
    数据结构与算法之动态规划
    JVM之垃圾回收机制
    单例模式详解
    线程池基础知识
    解决Spring MVC Controller中输出中文出现的乱码问题
    LinkedList与ArrayList的get(int index)方法区别
    黄清山 | 2021软件代码开发技术作业五 | 代码开发、测试及发布
  • 原文地址:https://www.cnblogs.com/mingyan/p/10268287.html
Copyright © 2011-2022 走看看