一半君的总结纸

听话只听一半君

Fedora 20如何在系统安装完成之后从DVD安装软件(把DVD当成Repo)

适用于上网速度慢的时候,或是乱搞把系统搞挂了,没有网卡的时候可以用

  1. Mount DVD ISO 或者拿usb安装优盘来或者光盘:
    sudo mkdir /mnt/F20_ISO
    sudo mount /home/me/Downloads/Fedora-20-x86_64-DVD.iso /mnt/F20_ISO/

    如果是已经做了usb安装盘就方便多了,直接插上就行了

  2. Create a new yum repo with the mounted DVD as its source:
    gedit /etc/yum.repos.d/fedora-dvd.repo
  3. Copy-paste the following into the repo file:
    [fedora-dvd]
    name=Fedora DVD $releasever – $basearch
    failovermethod=priority
    baseurl=file:///mnt/F20_ISO/
    enabled=1
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
  4. 原作者给的命令也许F20改了
    似乎是必须

    yum --disablerepo=* --enablerepo=fedora-dvd install xxx
    --disablerepo --enbalerepo
    
    这个似乎是临时效果,必须加到每个yum命令行里,
    或者(永久效果)最好别这样把,因为你肯定是临时特殊情况下需要装个什么才需要从DVD装的
    
    yum-config-manager --disablerepo=*
    yum-config-manager --enablerepo=fedora-dvd
    
    当然如果这样你得记得之后改回来,
    
  5. Check list of all groups available in yum:
    sudo yum grouplist
    
  6. 安装groups
    sudo yum groupinstall “KDE Plasma Workspaces”
  7. 完成后可以用命令行改回所有repo, 也可以去Menu > Software > Software Sources界面里改

抄自:Fedora 19: Installing Software from DVD After System Installation

万一你在用vnc,没法在apper里勾回repo(会看到you have failed to provide correct authentication)那是因为这里
The default policy for the action org.freedesktop.packagekit.package-install is to ask for the root password if the user is in an active local session, and deny otherwise.

ConsoleKit does not know about VNC sessions (see bug 489344), so you get the denial without any password prompt.

As a workaround, you can adjust the policy by adding a *.pkla file into one of the directories /var/lib/polkit-1/localauthority/*/ with the contents like this (untested):

[HoorayICanDoAnythingWithPackagesWithoutPassword]
Identity=unix-user:patrick
Action=org.freedesktop.packagekit.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

可以临时这样一下,要记得删掉

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: