zoukankan      html  css  js  c++  java
  • centos7基本设置和优化

    网络

    开启网卡

    sed -i '/ONBOOT/s/no/yes/' /etc/sysconfig/network-scripts/ifcfg-ens33
    

    重启网卡

    systemctl restart network
    

    更换国内源

    备份官方源

    cd /etc/yum.repos.d
    mkdir repo_bak
    mv *.repo  repo_bak
    

    下载阿里云源

    curl -O http://mirrors.aliyun.com/repo/Centos-7.repo
    curl -O http://mirrors.aliyun.com/repo/epel-7.repo
    curl -O http://mirrors.aliyun.com/repo/epel-testing.repo
    

    清理和建立缓存

    yum clean all && yum makecache
    

    防火墙和selinux选项

    关闭防火墙

    systemctl stop firewalld.service
    systemctl disable firewalld.service
    

    关闭selinux

    sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
    

    oh my zsh

    安装依赖软件

    yum install -y zsh git
    

    基本安装

    sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    

    主题和插件选择

    vim ~/.zshrc
    

    中文man手册

    yum install -y man-pages-zh-CN
    

    时间同步

    yum  install -y ntpdate 
    echo ntpdate -u ntp.api.bz >>/etc/rc.local
    

    会话超时

    sed -i '/#ClientAlive/s/#//' /etc/ssh/sshd_config
    systemctl restart sshd
    

    ClientAliveInterval会话超时时间,即为一次
    ClientAliveCountMax允许超时次数

    xshell 拖动传输文件

    yum -y install lrzsz```
  • 相关阅读:
    leetcode 343. Integer Break(dp或数学推导)
    leetcode 237. Delete Node in a Linked List
    msdtc不可用
    常用反编译软件
    重建索引
    JAVA知识库
    DATAGRID显示序号
    VFLEXGRID8控件注册
    黑马2017年java就业班全套视频教程
    mybatis从入门到精通
  • 原文地址:https://www.cnblogs.com/enuff/p/11135268.html
Copyright © 2011-2022 走看看