当前安装版本: Fedora-13-x86_64-DVD.iso
简介:尽管Fedora的更新和升级比较频繁,不像Debian那样好久都是同一个版本,但是至少目前的Fedora-13对ATI显卡(我的是ati Radeon HD 4650)的支持比较好,而此前我为了在Debian Lenny和Debian Squeeze下安装好ati显卡,费尽了周折,但是最终还是不得不放弃。这也是为什么4年后又转向fedora的原因。
########### 硬盘安装方法 #############
以下假设是在某个Linux发行版上执行,如果在windows OS下,那么只需把相应操作进行适当修改即可。
1. 到网上下载Fedora-13-x86_64-DVD.iso。我是到上交ftp下载的(也可到mirrors.163.com或者mirrors.sohu.com下载),并放在/media/repository/fedora/
lftp ftp://ftp.sjtu.edu.cn/fedora/linux/releases/13/Fedora/x86_64/iso
mget -c Fedora-13-x86_64-CHECKSUM Fedora-13-x86_64-DVD.iso
注意:下载完成后使用
sha256sum -c Fedora-13-x86_64-CHECKSUM
验证文件的完整性。
2. 安装前的准备工作。
cd /media/repository/fedora
sudo mount -o loop Fedora-13-x86_64-DVD.iso /media/iso && cd /media/iso
sudo cp -Rf images /media/repository/fedora
cd isolinux
sudo cp vmlinuz initrd.img /media/repository/fedora/
cd /media/repository/fedora
sudo umount /media/iso
然后用
df -hT
以及
sudo fdisk -l
查看硬盘分区,并记录下相关内容,尤其是各个分区的文件格式,挂载点等。
比如我的iso文件放在/media/repository/fedora下,该分区对应于/dev/sda9
3. 重启,进入grub
> root (hd0,8) #因为安装源和启动文件都放在/media/repository, 是/dev/sda9。
> kernel /fedora/vmlinuz
> initrd /fedora/initrd.img
> boot
随即便进入图形化安装界面了。
注意:如果使用的是grub2引导,那么应该这样写:
> set root=(hd0,msdos9)
> linux /fedora/vmlinuz
> initrd /fedora/initrd.img
> boot
####### 配置更新源 ########################
1. 使用官方提供的更新源(可以自己到去了解详细内容):
su -c 'rpm -Uvh '
2. 手工添加的国内源:
##### 163+sohu ############
[fedora-163]
name=Fedora.163
failovermethod=priority
baseurl=
mirrorlist=
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-debuginfo-163]
name=Fedora.163.debug
failovermethod=priority
baseurl=
mirrorlist=
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-source-163]
name=Fedora.163.src
failovermethod=priority
baseurl=
mirrorlist=
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[updates-163]
name=Fedora.163.updates
failovermethod=priority
baseurl=
mirrorlist=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[updates-debuginfo-163]
name=Fedora.163.updebug
failovermethod=priority
baseurl=debug/
mirrorlist=
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[updates-source-163]
name=Fedora.163.update-src
failovermethod=priority
baseurl=
mirrorlist=
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-sohu]
name=Fedora.sohu
failovermethod=priority
baseurl=
mirrorlist=
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-debuginfo-sohu]
name=Fedora.sohu.debug
failovermethod=priority
baseurl=
mirrorlist=
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-source-sohu]
name=Fedora.sohu.src
failovermethod=priority
baseurl=
mirrorlist=
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[updates-sohu]
name=Fedora.sohu.updates
failovermethod=priority
baseurl=
mirrorlist=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[updates-debuginfo-sohu]
name=Fedora.sohu.updatesdebug
failovermethod=priority
baseurl=debug/
mirrorlist=
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[updates-source-sohu]
name=Fedora.sohu.updates.src
failovermethod=priority
baseurl=
mirrorlist=
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
######## 以下是国内高校的: beike+sjtu.repo########
#北科大 /etc/yum.repo.d/beike.repo
[Fedora-beike]
name=Fedora 13 – x86_64
baseurl=ftp://202.204.60.11/pub/fedora/linux/releases/13/Fedora/x86_64/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora
[Everything-beike]
name=Everything 13 – x86_64
baseurl=ftp://202.204.60.11/pub/fedora/linux/releases/13/Everything/x86_64/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora
[updates-beike]
name=Fedora updates-x86_64
baseurl=ftp://202.204.60.11/pub/fedora/linux/updates/13/x86_64/
enabled=1
gpgcheck=0
#上海交大 sjtu
[Fedora-ftp.sjtu.edu.cn]
name=Fedora 13 – x86_64
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora
[Everything-ftp.sjtu.edu.cn]
name=Everything 13 – x86_64
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora
[updates-ftp.sjtu.edu.cn]
name=Fedora updates-x86_64
baseurl=
enabled=1
gpgcheck=0
##===================================================
3. 导入 Fedora GPG 秘匙
Fedora 有两个基本的软件仓库,名为 “fedora” 和 “updates” 。要使用它们并且在安装那些未签名的软件包时避免发生错误,你必须导入它们的 GPG 密匙,打开终端并且输入如下命令:
su -c "rpm --import /etc/pki/rpm-gpg/*"
注: 你可能会遇到一些错误信息,比如 “import failed” (导入错误),但这并不影响。
4. 刷新
sudo yum makecache
本地源的写法(可以参考mirrors.163.com和mirrors.sohu.com等提供的源文件写法):
[local-dvd]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=file:///media/iso
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
######## yum 相关命令 #############
Below there are the most common commands you will use for yum, Fedora's Package Management System. You can find a more detailed description of those along with some more commands if you type:
yum --help
man yum
* Install an application
su -c 'yum install application_name'
* Remove an application
su -c 'yum remove application_name'
* Install an rpm from your hard disk using yum to resolve dependencies
su -c 'yum localinstall application_name'
* Search for an application
su -c 'yum search application_name'
* Find info about an application
su -c 'yum info application_name'
* Update the whole system
su -c 'yum update'
* Enable a repository
su -c 'yum --enablerepo=repo_name'
* Disable a repository
su -c 'yum --disablerepo=repo_name'
###### 启动ibus输入法 ###########
System->Preferences->Input Method
勾选Enable input method feature, 选择Use IBus(recommended),
然后点击 Input Method Preferences进行相关设置。
########## locate 命令无法使用的解决方法 #############
locate *.wav
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
solution:
sudo updatedb
######### 修改terminal的外观 #################
请直接修改/etc/bashrc文件的PS1项即可,即:
把
# Turn on checkwinsize
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h\W]\\$ "
改成
# Turn on checkwinsize
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] &&
#PS1="[\u@\h\W]\\$ "
PS1="[\t@\W]\\$ "
重新打开终端即可
###利用beep实现报时功能 ###########
1. 首先安装beep
sudo yum install beep -y
2. 然后修改文件
sudo gedit /etc/modprobe.d/beep.conf
把最后一行行首的#去掉, 成为:
alias platform:pcspkr pcspkr
然后重新加载pcspkr模块:
sudo modprobe pcspkr
3.
sudo crontab -e
输入:
#分别在11:30,17:30,22:00报时
30 11 * * * beep -f900 -l300 -r4 -d700 -D700 -n -f1800 -l500
30 17 * * * beep -f900 -l300 -r4 -d700 -D700 -n -f1800 -l500
00 22 * * * beep -f900 -l300 -r4 -d700 -D700 -n -f1800 -l500
你可以使用crontab -l来查看
注意,如果是在普通用户权限下运行,会提示:
$ beep
Could not open /dev/console for writing.
open: Permission denied
所以现在需要用root权限
另外,可能编辑器使用的是vim,那么要在非insert状态下,用Shit+:+q+w退出。
####### 安装texworks (LaTeX编辑工具)##########
sudo yum install texworks -y
注意:fedora13不像ubuntu或者debian或者suse,它只安装texworks,不会默认安装texlive相关组件。
### 设置qt4字体 ########
诸如Texworks这样的使用了Qt4的应用程序(在Texworks的About TeXworks中有Qt4 application framework by Qt Software, a division of Nokia Corporation.)的字体如果设置不好(或者不进行设置),那么打开该程序后就往往会发现菜单界面的字体变得模糊不清,不光滑。所以有必要对 qt4的字体进行设置。
首先如果使用的是debian下的.fonts.conf配置文件,那么要移去~/.fonts.conf文件,否则可能导致以下的设置无效,但是fedora下的那个可以使用。
然后运行命令
sudo qtconfig-qt4
来启动Qt Configuration,之后点击Fonts,选择(比如)
WenQuanYi Micro Hei
然后保存,退出。
再次打开Texworks后既可看到效果了。
####安装文泉驿字体 ############
sudo yum install wqy-zenhei-fonts-common.noarch wqy-bitmap-fonts.noarch wqy-microhei-fonts.noarch wqy-unibit-fonts.noarch wqy-zenhei-fonts.noarch -y
sudo yum install google-droid-* dejavu-* liberation-*
#### firefox add-ons ######
adblock plus
add to search bar
copy links
downthemall
flashblock
stop autoplay
#### 允许root用户登录 #########
先用普通用户登陆,打开系统工具-终端
切换到root用户
输入命令:
gedit /etc/pam.d/gdm
在文本编辑器中注释掉"auth required pam_succeed_if.so user != root quiet"
保存后继续输入命令:
gedit /etc/pam.d/gdm-password
同样地注释掉"auth required pam_succeed_if.so user != root quiet"这一行。
保存后退出
现在就能使用root登录了
注意:如果不是由于特别原因,不要启用root登录(改回默认即可)。
##### 禁止在登录窗口显示user_list ########
目前fedoa13的登录窗口有点问题,如果
manually edit the /etc/gconf/gconf.xml.defaults/%gconf-tree.xml file and set the disable_user_list entry to true.
那么导致登录窗口成为一条竖线一闪一闪的,无法登录。
我的解决方法是,直接运行命令行运用-r参数建立系统帐号,这样就可以避开了。
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type Boolean --set /apps/gdm/simple-greeter/disable_user_list True
######### 安装菜单编辑器alacarte ##############
fedora不自带菜单编辑器(edit menu),所以只能手动安装了。安装alacarte即可。
sudo yum install alacarte -y
安装好后在 “system”->“preferences”中就能看到“Main Menu”的选项,或者重新启动x服务器后对着菜单点击右键,就可以看到Edit Menus了。
另外,为了安全,可以通过Edit Menus把System->Preferences-> About me一项删除
####### 安装gconf工具 ##############
sudo yum install gconf-editor
Applications->System Tools->Configuration Editor
######## 修改Main menus中的System中的Log Out以及Panels中的相关选项 ...###########
sudo gedit /etc/gconf/gconf.xml.defaults/%gconf-tree.xml
也可以直接用上面提到的gconf-editor来通过Find进行查找修改。
把如下3项按所给值进行设置
disable_log_out true
disable_user_switching true
user_switch_enable false
然后删除gdm-user-switch-applet
sudo yum remove gdm-user-switch-applet
######## 不让lock screen显示更多 #########
sudo cp /usr/share/gnome-screensaver/lock-dialog-default.ui /usr/share/gnome-screensaver/lock-dialog-default.ui-back
sudo gedit /usr/share/gnome-screensaver/lock-dialog-default.ui
修改
(1)把auth-realname-label处修改为:
True
(2)把auth-username-label修改为:
True
To log back into this OS again, enter your password please!
(3) 把note-tab-label更改为:
True
<b>Leave a message for the owner:</b>
然后就可以了!
#########多媒体配置 ##########
sudo yum install gcc gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly audacious audacious-plugins libdvdread libdvdnav lsdvd ffmpeg ffmpeg-libs gstreamer-ffmpeg libmatroska xvidcor totem-xine xine-lib xine-lib-extras-freeworld mplayer smplayer qmmp qmmp-devel qmmp-plugins-freeworld
su -
rpm -Uvh
yum install libdvdcss
####### Open Terminal here ###########
It's very useful to have an 'Open Terminal here' command to easily open a folder in terminal while you are browsing it in Nautilus. To do so type:
su -c 'yum install nautilus-open-terminal'
log out and then log in, right click in a Nautilus window and you'll see the command 'Open In Terminal'.
####### 添加Ctrl+Alt+Backspace作为Log out快捷键 ########
System->Preferences->Keyboard->Layouts->Options->Key sequence to kill the X server, Check it.
######### 中英文字体配置方案 ############
如果使用安装好后的(英文)系统默认设置,那么中文显得比较模糊刺眼,所以需要进行配置:
1. 安装必要的字体:
sudo yum install cjkuni-ukai-fonts.noarch cjkuni-uming-fonts.noarch
2.
文泉驿联网配置工具
目前我使用的配置文件:~/.fonts.conf的内容
sans-serif
DejaVu Sans
DejaVu Sans
Droid Sans
Liberation Sans
WenQuanYi Bitmap Song
WenQuanYi Zen Hei
serif
WenQuanYi Zen Hei Sharp
DejaVu Serif
Droid Serif
WenQuanYi Bitmap Song
AR PL UMing CN
Bitstream Charter
Liberation Serif
AR PL SungtiL GB
AR PL UMing TW
monospace
WenQuanYi Zen Hei Sharp
DejaVu Sans Mono
Droid Sans Mono
WenQuanYi Micro Hei Mono
WenQuanYi Zen Hei Mono
Liberation Sans Mono
AR PL UMing TW
3. Gnome桌面就使用系统默认的设置。
4. firefox配置如下:
Edit->Preferences->Content->Fonts & Colors->Advanced->Fonts for: Simplified Chinese,
Proportional: Sans Serif Size:16
Serif: serif
Sans-serif: sans-serif
Monospace: monospace Size:16
Minimum font size: 10
然后去掉Allow pages to choose their own fonts, instead of my selections above。
5. 终端等,均可以使用默认的设置,如果不行,那么再选择适合的字体即可。
################### maple 13 installation ############
需要安装如下的包才能保证maple13正常激活:
sudo yum install redhat-lsb.x86_64 glibc.i686 -y
yum install yum-fastestmirror
yum install unrar p7zip
###### Goldendict 安装 #########
sudo yum install goldendict -y
词典和真人发音设置:
打开goldendict,然后进行如下操作:
Edit->Dictionaries->Sources->Files,然后根据具体情形选择Add或者Remove,然后在Path里面填写上你的词典存放位置(我是放在/media/repository/stardict-dictionaries/dic,这些词典本来是为stardict准备的,但是目前的stardict3.0.1有问题,无法设置真人发音,所以就放弃安装stardict了,但是其词典还可以供goldendict使用)。然后选择Recursive,OK。
接下来Edit->Dictionaries->Sources->Sound Dirs,添加上真人发音库的地址。OK。
最后:Edit->Preferences->Audio->Playback,默认是mplayer,应该可以了,如果不行,那么换成aplay试试看。我使用默认的设置就可以发音了。
####### 安装Adobe 相关 ###########
The Adobe repository provides flash and acrobat reader packages for the x86 Fedora. To install it type:
sudo rpm -ivh
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
sudo yum install AdobeReader_chs flash-plugin
######## Java 相关 ############
To install the Linux RPM x64 file
Follow these instructions:
1. At the terminal: Type:
su
2. Enter the root password.
3. Change to the directory in which you want to install. Type:
cd
For example, to install the software in the /usr/java/ directory, Type:
cd /usr/java
Note about root access: To install the JRE in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the JRE in your home directory or a subdirectory for which you have write permissions.
4. Change the permission of the file you downloaded to be executable. Type:
chmod a+x jre-1_5_0_02-linux-amd64-rpm.bin
5. Verify that you have permission to execute the file. Type:
ls -l
Change permission on the installation file
6. To start the installation process, type:
./jre-1_5_0_02-linux-amd64-rpm.bin
Note: If the file is in the current directory, prepend it with "./"
This displays a binary license agreement. Read through the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
type YES to agree to the license agreement
7. The installation file creates jre-1_5_0_02-linux-amd64.rpm file in the current directory.
8. Run the RPM command at the terminal to install the packages. Type:
rpm -iv jre-1_5_0_02-linux-amd64.rpm
RPM unpacking completes
9. The JRE is installed in jre1.5.0_(version number) sub-directory under the current directory. In this case, the JRE is installed in the /usr/java directory. Verify that the jre1.5.0_02 sub-directory is listed under the current directory. Type:
ls
Verify the installation
10. Delete the bin and rpm file if you want to save disk space.
11. Exit the root shell.
##### Matlab 2010 ########
/bin/glnxa64/../../bin/glnxa64/libtbb.so.2: cannot restore segment prot after reloc: Permission denied
Source Context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
023
Target Context system_u:object_r:file_t:s0
Target Objects /home/programfiles/matlab/bin/glnxa64/libtbbmalloc
.so.2 [ file ]
Source MATLAB
Source Path /home/programfiles/matlab/bin/glnxa64/MATLAB
解决方法:
定位到安装目录,执行如下命令:
find . -name '*.so' -print -exec chcon -t textrel_shlib_t {} \;
find . -name '*.so.*' -print -exec chcon -t textrel_shlib_t {} \;
Note that this is slightly different than previous posts: I had to run chcon not only on .so files, but also on .so.* files.
##### 温度检测 #########
sudo yum install lm-sensors sensors-applet gnome-applet-sensors
sudo sensors-detect