zoukankan      html  css  js  c++  java
  • 模板机安装初始

    模板机安装

    安装初始

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

    最小化安装,不要忘记安装开发工具

    更改内核,让网卡名字成为了eth开头的:net.ifnames=0 biosdevname=0

    分区时采用三分区:boot、swap、根,虚拟机就不要用lvm了

    在安装的过程当中设置网络地址,点击自动连接

    网络相关

    ifconfig eth0 192.168.80.7/24   #centos6
    route add default gw 192.168.80.254
    echo "nameserver 223.6.6.6" >> /etc/resolv.conf
    或者
    ip addr add 192.168.80.8/24 dev eth0  #centos7
    ip addr del 192.168.80.8/24 dev eth0
    ip route add default via 192.168.80.1  #add可替换成del
    

    永久更改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
    USERCTL=no
    

    必备工具

    yum -y install  tree  wget  vim  lrzsz  lsof  sysstat curl  man dos2unix  telnet  nmap htop
    yum -y groupinstall "Development tools"
    

    必做事务

    阿里云和epel

    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    yum clean all
    yum makecache
    

    关闭selinux

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

    关闭防火墙

    systemctl stop firewalld
    systemctl diable firewalld
    
  • 相关阅读:
    Selenium+PhantomJS实现简易有道翻译爬虫
    Scrapy框架实战-妹子图爬虫
    拉勾网职位信息爬取
    Docker Compose容器编排
    Ansible进阶--playbook的使用
    etcd集群部署
    使用Dockerfile构建镜像
    Docker网络管理
    Docker数据管理
    Dubbo高性能网关--Flurry介绍
  • 原文地址:https://www.cnblogs.com/yizhangheka/p/12054096.html
Copyright © 2011-2022 走看看