zoukankan      html  css  js  c++  java
  • Centos使用

    查看Centos版本

    1、查看centos发行版本:cat /etc/redhat-release 

    centos 发行版 7.8.2003

    注: etc  初期etc的英文名字缩写为etcetera ,后来大家更习惯称为 Editable Text Configuration。ETC为系统配置文件目录,该目录包含系统启动脚本、启动配置文件、用户登陆配置文件、网络配置文件、httpd 配置文件、IPSec 配置文件和其他文件等。

    2、查看内核版本:cat /proc/version

    可以看到 使用的是 Linux 3.10.0 内核的64位操作系统。GCC为GUN编译器集合,采用4.8.5版本。

    注:proc 为process的缩写,里面存放与内核相关的文件。 

    3、uname -a

    4、lsb_release -a 

    显示发行版本信息

    LSB是Linux Standard Base的缩写, lsb_release命令 用来显示LSB和特定版本的相关信息。如果使用该命令时不带参数,则默认加上-v参数。

    -v 显示版本信息。
    -i 显示发行版的id。
    -d 显示该发行版的描述信息。
    -r 显示当前系统是发行版的具体版本号。
    -c 发行版代号。
    -a 显示上面的所有信息。
    -h 显示帮助信息。

    若:lsb_release -a 命令未找到

    则安装:yum install -y redhat-lsb

    CentOS7更换镜像源

    先安装wget
    执行命令 yum install -y wget

    centos上,镜像的位置位于:/etc/yum.repos.d/

    阿里开源镜像站  https://developer.aliyun.com/mirror/

    MongoDB远程连接失败

    在centos上安装了mongoDB配置端口28018,

    远程连接时报错:

    首先看下 服务器的防火墙是否开启了

    systemctl status firewalld.service

    CentOS 7.0默认使用的是firewall作为防火墙

    关闭firewall:
    systemctl stop firewalld.service #停止firewall
    systemctl disable firewalld.service #禁止firewall开机启动
    firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

    更多参考:centos 7关闭防火墙

  • 相关阅读:
    dir 函数
    模块的 __name__
    from..import 语句
    pass
    可变参数
    python 中的一点新知识
    Numpy中的一点小知识
    使用ipython %matplotlib inline
    numpy.random.rand
    Python:numpy中shape和reshape的用法
  • 原文地址:https://www.cnblogs.com/peterYong/p/13228774.html
Copyright © 2011-2022 走看看