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
  • 相关阅读:
    NoSQL数据库:Java开源项目Neo4j简介
    EPOLL和IOCP比较
    CString&CStringA&CStringW之间的相互转换
    CString和CStringA之间的转换
    Windows IOCP模型与Linux EPOLL模块之比较
    OCP-1Z0-053-V13.02-708题
    OCP-1Z0-053-V13.02-709题
    OCP-1Z0-053-V12.02-342题
    OCP-1Z0-053-V12.02-341题
    OCP-1Z0-053-V13.02-706题
  • 原文地址:https://www.cnblogs.com/wangyongqiang/p/15618509.html
Copyright © 2011-2022 走看看