zoukankan      html  css  js  c++  java
  • 安装和克隆

    张贺,多年互联网工作经验,担任过网络工程师、系统集成工程师、LINUX系统运维工程师,负责过大规模集群架构自动化运维管理工作,擅长Web集群架构与自动化运维,曾负责国内某电商运维工作。
    笔者微信:zhanghe15069028807

    安装和克隆

    安装

    具体的安装过程略过,要注意几个点即可:

    • 在安装的过程当中设置网络地址,点击自动连接
    • 分区时采用三分区:boot、swap、根
    • 最小化安装时,不要忘记安装开发工具

    优化

    1) 临时更改IP三招

    [root@A ~]# ifconfig eth0 192.168.80.7/24   #centos6 
    [root@A ~]# route add default gw 192.168.80.254 
    [root@A ~]# echo "nameserver 223.6.6.6" >> /etc/resolv.conf   
    [root@www ~]# ip addr add 192.168.80.8/24 dev eth0  #centos7
    [root@www ~]# ip addr del 192.168.80.8/24 dev eth0
    [root@www ~]# ip route add default via 192.168.80.1  #add可替换成del  
    

    2) 永久更改IP(完整重启网络服务)

    [root@A ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0  #通用 
    DEVICE=eth0 
    IPADDR=192.168.80.6 
    PREFIX=24 
    GATEWAY=192.168.80.254 
    DNS1=223.6.6.6 DNS2=8.8.8.8 
    ONBOOT=yes 
    BOOTPROTO=static 
    

    3) 更改主机名

    [root@A ~]# hostname A.com        #临时有效 
    [zhanghe@A ~]$ vim /etc/hostname  #永久生效 
    centos7:
    hostnamectl set-hostname Linuxprobe      
    

    4) 安装小工具

    //这两个都是命令行TAB补全的,安装完epel之后再安装 
    yum -y install bash-completion bash-completion-extras.noarch  
    yum -y install  tree  wget  vim  lrzsz  yum -y install lsof  sysstat curl  man dos2unix  telnet  nmap 
    

    5) 安装163源和epel源

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
    mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup 
    mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo 
    yum makecache 
    

    6) 关闭selinux

    [root@A ~]# getenforce   #查看selinux的状态 
    [root@A ~]# setenforce 0 
    [root@A ~]# vim /etc/selinux/config SELINUX=disabled 
    [root@A ~]# reboot生效 
    

    7) 关闭防火墙

    systemctl stop firewalld systemctl disable firewalld 
    

    8) 安装开发工具

    [root@B /]# yum grouplist | grep "tools$" Development  tools 
    [root@B /]# yum -y groupinstall "Development Tools" 
    

    9) 查看系统状态

    hostnamectl status
    

    10)更改字符集为英文

     LANG=en_US 
    
  • 相关阅读:
    Kafka 生产者 自定义分区策略
    同步互斥
    poj 1562 Oil Deposits(dfs)
    poj 2386 Lake Counting(dfs)
    poj 1915 KnightMoves(bfs)
    poj 1664 放苹果(dfs)
    poj 1543 Perfect Cubes (暴搜)
    poj 1166 The Clocks (暴搜)
    poj 3126 Prime Path(bfs)
    处理机调度
  • 原文地址:https://www.cnblogs.com/yizhangheka/p/12323240.html
Copyright © 2011-2022 走看看