一、安装

  • 默认安装

二、配置

  1. 配置网卡

    BOOTPROTO=none
    ONBOOT=yes
    IPADDR=xxx.xxx.x.xx
    PREFIX=24
    GATEWAY=xxx.xxx.x.x
    DNS1=xxx.xxx.x.x 注:删掉网卡内的UUID ,通用唯一识别码和HWADDR MAC地址 这两行。 所有网卡都需要删除
  2. 安装wget:yum -y install wget;
  3. 修改为阿里的yum源
    1、cd /etc/yum.repos.d
    2、备份
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

    mv /etc/yum/repos.d/CentOS-Base.repo{,.date -I}
    3、下载版本
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    4、添加epel
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    5、生成缓存
    yum clean all
    yum makecache
  4. 下载常用工具
    yum -y install wget net-tools screen lsof tcpdump nc mtr openssl-devel vim bash-completion lrzsz nmap telnet tree ntpdate bash-completion chrony vsftpd
    提升效率:
    yum -y install ncdu glances mosh rsync
  5. 关闭selinux
    sed -i.bak 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
  6. 关闭防火墙
    systemctl stop firewalld
    systemctl disable firewalld
  7. 修改主机名
    hostnamectl set-hostname 7mini
  8. 修改字符集
    localectl status      #查看当前字符集
    # localectl set-locale LANG=zh_CN.UTF-8 #修改字符集为zh_CN.UTF-8,命令行和配置文件都生效
    # cat /etc/locale.conf #查看配置文件
    LANG=zh_CN.UTF-8
  9. 修改文件数限制
    ulimit -n         #默认大小
    1024
    echo "* soft nofile 65536" >> /etc/security/limits.conf #xi修改最大限制为65535
    echo "* hard nofile 65536" >> /etc/security/limits.conf
    reboot #重启后生效 
  10. 时间同步
    ntpdate ntp1.aliyun.com
    cp /etc/chrony.conf{,.bak} vim /etc/chrony.conf
    server ntp6.aliyun.com iburst systemctl start chronyd
    systemctl enable chronyd #开机启动
    systemctl restart chronyd
    chronyc sources #查看同步源
    [root@7mini-node2 ~]# chronyc sources
    210 Number of sources = 1
    MS Name/IP address Stratum Poll Reach LastRx Last sample
    ===============================================================================
    ^* 203.107.6.88 2 6 17 31 +653us[+1965us] +/- 32ms 2)或者通过计划任务进行同步
    [root@linux-node1 ~]# crontab -e
    no crontab for root - using an empty one
    crontab: installing new crontab
    [root@linux-node1 ~]# crontab -l
    */5 * * * * /usr/sbin/ntpdate time1.aliyun.com > /dev/null
  11. 可参考:https://www.cnblogs.com/jokerbj/p/9133093.html

最新文章

  1. Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引
  2. 常用 Git 命令
  3. SQLServer学习笔记系列11
  4. python之选课系统详解[功能未完善]
  5. hdoj 5124lines
  6. struts2 xml中重定向
  7. C语言-sizeof()与strlen()的区别【转】
  8. solr中通过SFTP访问文件建立索引
  9. (转载)用SQL语句创建Access表
  10. redis 本机链接服务端命令
  11. uploadify3.1 参数 中文详解
  12. 实战ajax
  13. 虚拟机安装中文Fedora14和C/C++IDE开发环境
  14. 利用python 实现微信公众号群发图片与文本消息功能
  15. [转载] 应用于负载均衡的一致性哈希及java实现
  16. 【Tools】linux更改分辨率,解决虚拟机安装后太小的问题
  17. Java中的return关键字
  18. VS2017开发.net core 时默认发布路径文件夹多个BPC
  19. 2018-2019-2 20175126谢文航 实验一《Java开发环境的熟悉》实验报告
  20. Salesforce Sales Cloud 零基础学习(一) Product 和 Price Book

热门文章

  1. 程序员Meme 第02期
  2. Nginx结构原理全解析
  3. 攻击科普:ARP攻击
  4. Python matplotlib绘制圆环图
  5. windows10 安装 Mysql8.0
  6. HMS Core版本发布公告
  7. AT2287 [ARC067B] Walk and Teleport 题解
  8. Jaeger知识点补充
  9. TensorFlow.NET机器学习入门【2】线性回归
  10. Java 常用类库一,main方法传参String[] args;获取输入Scanner ;hasNext();hasNextInt()