zoukankan      html  css  js  c++  java
  • centos8 优化

    centos8 基础优化

    • 1.设置系统时间为北京时间
    一、设置时区
    [root@centos8 ~]# timedatectl set-timezone Asia/Shanghai
    [root@centos8 ~]# rpm -ivh http://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
    二、添加 wlnmp yum源
    [root@centos8 ~]# yum install wntp -y     #安装工具
    [root@centos8 ~]# ntpdate ntp1.aliyun.com #使用阿里云时间服务器同步时间
    [root@centos8 ~]# uptime                  #查看时间
    [root@centos8 ~]# uptime
     09:39:21 up 2 days, 14:21,  1 user,  load average: 0.05, 0.01, 0.00
    
    • 2.安装基础软件包
    # 安装wget:
    yum -y install wget zip unzip tar net-tools vim -y
    
    • 3.配置yum源
    # ps:阿里云服务基本可以跳过此步骤
    # 下载阿里yum源repo文件
    [root@centos8 ~]# wget http://mirrors.aliyun.com/repo/Centos-8.repo -P /etc/yum.repos.d/
    # 备份其他.repo
    [root@centos8 ~]# mkdir /etc/yum.repos.d/repo_backup -p
    [root@centos8 ~]# mv /etc/yum.repos.d/CentOS-Linux-* /etc/yum.repos.d/repo_backup/
    # 清空缓存
    [root@centos8 ~]# yum clean all
    # 生成缓存
    [root@centos8 ~]# yum makecache -y
    # 更新软件
    [root@centos8 ~]# yum update -y
    # 查看yum源
    [root@centos8 ~]# yum repolist enabled
    
    • 4.系统优化
    #关闭selinux
    sed -i '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config
    #调整单个进程最大能打开文件的数量
    echo '* - nofile 65535' >> /etc/security/limits.conf
    
    技术是没有终点的,也是学不完的,最重要的是活着、不秃。 学习看书还是看视频,都不重要,重要的是学会,欢迎关注,我们的目标---不秃。 ---更多运维开发交流及软件包免费获取请加V: Linuxlaowang
  • 相关阅读:
    第二章整理
    汇编实验二
    汇编实验一
    第一章整理
    第一部分 | 第1章 —— Hello Cocos2d-x
    返回 *this 的成员函数以及 const重载
    C++中的const
    680. Valid Palindrome II
    字典树
    单调队列
  • 原文地址:https://www.cnblogs.com/wangyongqiang/p/15618509.html
Copyright © 2011-2022 走看看