CentOS-7.0的核心安裝與配置續

來源:互聯網
上載者:User

標籤:centos-7.0 base包安裝

我們CentOS-7.0的核心安裝後,很開心,但還沒等興奮勁過去就發現問題了,yum怎麼用不了?ifconfig怎麼也用不了?pvcreate呢?......之後大家可能就開始罵我坑爹了,怎麼這麼多的基礎命令用不了,這個人寫的核心安裝怎麼這麼坑。

我錯了,不要急,下面的這篇文字就是幫你們解決這個問題的。

我們安裝時的檔案是依照/root/anaconda-ks.cfg這個回答檔案(回答檔案不懂的話自行百度)安裝的,cat查看它

[[email protected] ~]# cat/root/anaconda-ks.cfg#version=RHEL7# System authorization informationauth --enableshadow --passalgo=sha512 # Use CDROM installation mediacdrom# Run the Setup Agent on first bootfirstboot --enableignoredisk --only-use=sda# Keyboard layoutskeyboard --vckeymap=us --xlayouts=‘us‘# System languagelang en_US.UTF-8 # Network informationnetwork --bootproto=dhcp --device=eno16777736 --onboot=off --ipv6=autonetwork --hostname=localhost.localdomain# Root passwordrootpw --iscrypted$6$ujXxVQ3lCFRecY/T$RyN0pe6ylmwQYiM3AFm0PAyP2E7yZ8MVZIAAGnVoRGJRcawrQYynAzQWd/dNvELy4LUUGb8kKEJ3GnKWSEs7..# System timezonetimezone America/New_York --isUtc# System bootloader configurationbootloader --location=mbr --boot-drive=sda# Partition clearing informationclearpart --none --initlabel# Disk partitioning informationpart / --fstype="xfs"--ondisk=sda --size=17407part swap --fstype="swap"--ondisk=sda --size=1024part /data --fstype="xfs" --ondisk=sda--size=2048 %packages@core  #系統的核 %end

我們發現系統預設的迷你安裝有core沒有base。而我們需要的那些基礎的命令是打包在base內的,既然問題發現了,下面我們開始安裝base。

在bash介面輸入下面命令

[[email protected] yum.repos.d]# vi CentOS-dvd.repo[centos-dvd]name=CentOSbaseurl=file:///mnt/disk/enabled=1gpgcheck=0:x[[email protected] yum.repos.d]# lsCentOS-Base.repo.bak       CentOS-dvd.repo          CentOS-Vault.repo.bakCentOS-Debuginfo.repo.bak  CentOS-Sources.repo.bak#為了方便我們yum.repos.d下以repo的檔案都改為bak的尾碼,之後新添加CentOS-dvd.repo檔案並設定相關路徑其他四個檔案的具體內容可自行百度

修改完畢輸入下面指令

#yum groupinstall base#下面會出現172個需要安裝的包,y即可

顯示Complete!

yum,ifconfig,pvcreate等命令都可正常使用。

本文出自 “張帆-IT的奇幻漂流” 部落格,請務必保留此出處http://chawan.blog.51cto.com/9179874/1543645

CentOS-7.0的核心安裝與配置續

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.