blog:linux_system_manage:fedora

Fedora安装与使用

Install Fedora Workstation 22

iso: Fedora-Live-Workstation-x86_64-22-3.iso 引导方式: grub2

在/etc/grub.d/ 目录下新建文件32_Fedora

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Start Fedora Live' --class fedora --class gnu-linux --class gnu --class os {
    insmod efi_gop
    insmod efi_uga
    insmod video_bochs
    insmod video_cirrus
    insmod all_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd2,gpt4'
    loopback loop /Fedora-Live-Workstation-x86_64-22-3.iso
    linuxefi (loop)/isolinux/vmlinuz0 iso-scan/filename=/Fedora-Live-Workstation-x86_64-22-3.iso root=live:LABEL=Fedora-Live-WS-x86_64-22-3 ro rd.live.image quiet  rhgb 
    initrdefi (loop)/isolinux/initrd0.img
}

查看发行版本信息

LSB(Linux Standard Base) and Distribution information

$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:	Fedora
Description:	Fedora release 22 (Twenty Two)
Release:	22
Codename:	TwentyTwo

安装常用软件

安装rpmfusion源:

Fedora官方仓库不会提供一些包含有非自由组件的基本软件,比如像多媒体编码。rpmfusion可以提供这些软件。

for fedora22: sudo dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-22.noarch.rpm sudo dnf install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-22.noarch.rpm

for fedora23: sudo dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-23.noarch.rpm sudo dnf install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-23.noarch.rpm

从rpmfusion中可以安装VLC和编解码相关的库 1. 安装VLC播放器 sudo dnf install vlc.x86_64 2. 安装多媒体编码:

  sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1

安装FZUG源:

fdzh是fedora中文社区,这个源里面包含搜狗输入法,酷我音乐,豆瓣FM,,为知笔记,有道词典,…

dnf config-manager --add-repo=http://repo.fdzh.org/FZUG/FZUG.repo

安装搜狗输入法: * dnf install sogoupinyin.x86_64 * 切换输入法从ibus到fcitx: imsettings-switch FCITX 注意: 千万不能卸载ibus, 否则会导致进入不了桌面

安装开发套件: dnf groups install “Development Tools” 安装g++: sudo dnf install gcc-c++

安装vim: dnf install vim-X11.x86_64

gnome-tweak-tool (Gnome优化工具):

通过application view或者dash打开应用程序时,默认不会创建新的instance 可以通过gnome-tweak-tool设置Launch new instance

安装adobe flash player: download rpm package: “adobe-release-x8664-1.0-1.noarch.rpm” from https://get.adobe.com/flashplayer/?loc=cn sudo dnf install adobe-release-x8664-1.0-1.noarch.rpm rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux sudo dnf install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl 在firefox里面可以查看到flugin的安装情况,在地址栏中输入about:plugins

dnf

dnf是新一代的RPM软件包管理器(The Next Generation Package Management Utility for RPM Based Distributions)

dnf repolist

        查看系统中可用的软件库              

dnf repolist all

        查看系统中可用的和不可用的软件库    
        

dnf list

        查看系统中所有来着软件库的可用软件包和已经安装的软件包

dnf list installed

        查看所有已安装的软件包

dnf list autoremove

          List packages which will be removed by dnf autoremove command
          

dnf search xxx

        在软件库中搜索软件包

dnf provides /bin/bash

        查看系统中的bash命令由哪个软件包提供

dnf info xxx

        查看软件包的详细信息
        

dnf install xxx

        安装软件

dnf update systemd

        升级指定软件包, 例如升级systemd

dnf update 或 dnf upgrage

          升级系统中所有的软件

dnf remove vim 或 dnf erase vim

        删除系统中指定的软件包

dnf autoremove

        删除系统中孤立的,不会被其他软件依赖的软件包
        不知道是autoremove有bug还是怎样,今天用了autoremove后很多软件都被卸掉了, 慎用!!!
        

dnf grouplist

          查看所有的软件包组

dnf groupinstall

          安装软件包组,例如: dnf install "C Development Tools and Libraries"

dnf groupupdate

          升级软件包组

dnf groupremove

          移除软件包组

fedora的软件源通常放在/etc/yum.repos.d

手动添加国内软件源:

国内的知名linux开源镜像站有 网易开源镜像(http://mirrors.163.com/) 中科大开源镜像(http://mirrors.ustc.edu.cn/) 首都在线(http://mirrors.yun-idc.com/

进入/etc/yum.repos.d wget http://mirrors.163.com/.help/fedora-163.repo wget http://mirrors.163.com/.help/fedora-updates-163.repo wget http://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/fedora?codeblock=0 wget http://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/fedora?codeblock=1

分别将上述软件源替换为fedora.repo 和fedora-updates.repo

重新生成缓存 sudo dnf clean all sudo dnf makecache

DNF默认已经自带了fastestmirror功能,这个功能原先对于YUM来讲是一个单独的插件存在的, 它可以使DNF或YUM自动检测判断软件包下载点的速度,选择最快的镜像下载点。 现在DNF已经内置了fastestmirror功能,根据DNF文档,该功能默认是关闭的,要打开该功能, 需要修改/etc/dnf/dnf.conf配置文件,在[main]部分里面加入一行fastestmirror=true

升级到Fedora23

edora 22 → Fedora 23

$ sudo dnf upgrade
$ sudo dnf install dnf-plugin-system-upgrade
$ sudo dnf system-upgrade download --releasever=23 --best
$ sudo dnf system-upgrade reboot

如果安装dnf-plugin-system-upgrade后,提示加载system-upgrade插件失败,可以使用下面的方法进行升级:

1.更新系统:sudo dnf update
2.添加Fedora23 GPG密钥: sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-$(uname -i)
3.升级Fedora服务器:sudo dnf upgrade
4.清理缓存:sudo dnf clean all
5.升级:dnf --releasever=23 --setopt=deltarpm=true distro-sync --nogpgcheck。
  • blog/linux_system_manage/fedora.txt
  • 最后更改: 2025/02/02 23:10
  • 127.0.0.1