美文网首页
CentOS7最小化安装的配置

CentOS7最小化安装的配置

作者: xiangxik | 来源:发表于2017-12-15 23:49 被阅读0次

    网卡

    1. 查看网卡信息
    # ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
        link/ether 00:15:5d:02:17:08 brd ff:ff:ff:ff:ff:ff
        inet 192.168.2.24/24 brd 192.168.2.255 scope global eth0
           valid_lft forever preferred_lft forever
        inet6 fe80::2ef0:7026:4c6d:a05e/64 scope link 
           valid_lft forever preferred_lft forever
    
    1. 修改网卡配置
    # vi /etc/sysconfig/network-scripts/ifcfg-eth0
    TYPE="Ethernet"
    PROXY_METHOD="none"
    BROWSER_ONLY="no"
    BOOTPROTO="static"
    DEFROUTE="yes"
    IPV4_FAILURE_FATAL="no"
    IPV6INIT="yes"
    IPV6_AUTOCONF="yes"
    IPV6_DEFROUTE="yes"
    IPV6_FAILURE_FATAL="no"
    IPV6_ADDR_GEN_MODE="stable-privacy"
    NAME="eth0"
    UUID="c6a89e79-daa5-42e4-b013-2731994eb7e3"
    DEVICE="eth0"
    ONBOOT="yes"
    IPADDR="192.168.2.24"
    PREFIX="24"
    GATEWAY="192.168.2.1"
    DNS1="202.96.128.86"
    IPV6_PRIVACY="no"
    
    1. 重启网卡
    # systemctl restart network
    

    SSH

    1. 修改sshd配置文件
    # vi /etc/ssh/sshd_config
    
    1. CentOS7默认已启用SSH

    文件上传和下载

    1. xshell
    # yum -y install lrzsz
    
    1. ftp
    # yum -y install vsftpd
    # vi /etc/vsftpd/vsftpd.conf
    anonymous_enable=NO
    local_enable=YES
    write_enable=YES
    local_umask=022
    chroot_local_user=YES
    chroot_list_enable=YES
    chroot_list_file=/etc/vsftpd/chroot_list
    userlist_enable=NO
    userlist_deny=NO
    

    chroot_list 添加 root
    去掉/etc/vsftpd/ftpusers中的root

    Java安装

    1. 下载java,并上传到/home目录下
    2. 解压并移到/usr/local/java
    # tar -zxvf jdk-9.0.1_linux-x64_bin.tar.gz
    # mv jdk-9.0.1 /usr/local/java
    
    1. 配置环境变量
    # vi /etc/profile
    export JAVA_HOME=/usr/local/java
    export JRE_HOME=/usr/local/java/jre
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    export PATH=$JAVA_HOME/bin:$PATH
    # source /etc/profile
    

    相关文章

      网友评论

          本文标题:CentOS7最小化安装的配置

          本文链接:https://www.haomeiwen.com/subject/zgxdwxtx.html