FC5インストール後の設定あれこれ
yumの設定
yumはFCの自動アップデートエンジンです。しかし、デフォルトの設定のままでは、本家のサーバを参照してしまいます。そのため日本からアクセスすると、どうしてもストレスを感じてしまうことがあります。そこで、日本のミラーサーバが参照されるように設定を変更すると幸せになれます・・・よね?
ここでは、yumの設定管理を/etc/yum.repos.dというディレクトリの中にあるファイルを操作することで行おうと思います。
最初に/etc/yum.repos.dの下に三つの新規ファイルを作成します。
- fedora-core.base
http://ftp.kddilabs.jp/Linux/packages/fedora/core/5/$ARCH/os/
http://ftp.riken.go.jp/Linux/fedora/core/5/$ARCH/os/
http://ftp.iij.ad.jp/pub/linux/fedora/core/5/$ARCH/os/ - fedora-extras.base
http://ftp.kddilabs.jp/Linux/packages/fedora/extras/5/$ARCH/
http://ftp.riken.go.jp/Linux/fedora/extras/5/$ARCH/
http://ftp.iij.ad.jp/pub/linux/fedora/extras/5/$ARCH/ - fedora-updates.base
http://ftp.kddilabs.jp/Linux/packages/fedora/core/updates/5/$ARCH/
http://ftp.riken.go.jp/Linux/fedora/core/updates/5/$ARCH/
http://ftp.iij.ad.jp/pub/linux/fedora/core/updates/5/$ARCH/
次にfedora-core.repo, fedora-extras.repo, fedora-updates.repoという三つの既存ファイルを以下の内容で置き換えます。
- fedora-core.repo
[core]
name=Fedora Core $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
mirrorlist=file:///etc/yum.repos.d/fedora-core.base
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY[core-debuginfo]
name=Fedora Core $releasever - $basearch - Debug
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/debug/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY[core-source]
name=Fedora Core $releasever - Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/source/SRPMS/
mirrorlist=file:///etc/yum.repos.d/fedora-core-src.base
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY - fedora-extras.repo
[extras]
name=Fedora Extras $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-$releasever
mirrorlist=file:///etc/yum.repos.d/fedora-extras.base
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1[extras-debuginfo]
name=Fedora Extras $releasever - $basearch - Debug
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/debug/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1[extras-source]
name=Fedora Extras $releasever - Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/SRPMS/
mirrorlist=file:///etc/yum.repos.d/fedora-extras-src.base
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1 - fedora-updates.repo
[updates]
name=Fedora Core $releasever - $basearch - Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
#mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
mirrorlist=file:///etc/yum.repos.d/fedora-updates.base
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora[updates-debuginfo]
name=Fedora Core $releasever - $basearch - Updates - Debug
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/debug/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora[updates-source]
name=Fedora Core $releasever - Updates Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/SRPMS/
mirrorlist=file:///etc/yum.repos.d/fedora-updates-src.base
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
ここまでの設定をしたあとで、
# yum updateなどのコマンドを実行すると、日本のミラーサーバを対象にしてyumが動作するようになります。
VMWare-Toolsを使う
まず最初にVMWareのメニューからVMWare Toolsのインストールを実行してください。
rpmパッケージをインストールするのが楽でよいです。
ところで、FC5ではFC4から比べて次の二点の問題があるので、普通にVMWareToolsをインストールしただけでは、望むだけの機能は使えません。
- asm/page.hの構造体変更
- X11R7の採用
そこで、これを解決するためのpatchを作りました。
589a590,593
> # The location of the modules dir has changed in X.org 7
> my $cXModulesDir7 = '/usr/lib/xorg/modules';
> my $cX64ModulesDir7 = '/usr/lib64/xorg/modules';
>
1968a1973
> . shell_string('-I' . $answer . '/asm-i386/mach-default')
3875a3881,3884
> sub xserver7 {
> return '/usr/bin/X';
> }
>
4030a4040,4041
> } elsif ($x_version == 7) {
> $x_server_file = xserver7();
4076a4088,4167
> sub xorg_7 {
> my $xconfig_path = '/etc/X11';
> my $xconfig_file_name = 'xorg.conf';
> my $xversion = 7;
> my $xversionAll = '';
> my $xserver_link = '';
> my $major;
> my $minor;
> my $sub;
>
> $xversionAll = direct_command(shell_string(xserver7()) . ' -version 2>&1') =~
> /X Protocol Version 11.* Release (\d+\.\d+)/ ? $1 : '0.0.0';
>
> if (defined $ENV{'XORGCONFIG'} && file_name_exist('/etc/X11/' .
> $ENV{'XORGCONFIG'})) {
> $xconfig_path = '/etc/X11';
> $xconfig_file_name = $ENV{'XORGCONFIG'};
> } elsif (defined $ENV{'XORGCONFIG'} &&
> file_name_exist('/usr/X11R6/etc/X11/' . $ENV{'XORGCONFIG'})) {
> $xconfig_path = '/usr/X11R6/etc/X11';
> $xconfig_file_name = $ENV{'XORGCONFIG'};
> } elsif (file_name_exist('/etc/X11/xorg.conf-4')) {
> $xconfig_path = '/etc/X11';
> $xconfig_file_name = 'xorg.conf-4';
> } elsif (file_name_exist('/etc/X11/xorg.conf')) {
> $xconfig_path = '/etc/X11';
> $xconfig_file_name = 'xorg.conf';
> } elsif (file_name_exist('/etc/xorg.conf')) {
> $xconfig_path = '/etc';
> $xconfig_file_name = 'xorg.conf';
> } elsif (file_name_exist('/usr/X11R6/etc/X11/xorg.conf-4')) {
> $xconfig_path = '/usr/X11R6/etc/X11';
> $xconfig_file_name = 'xorg.conf-4';
> } elsif (file_name_exist('/usr/X11R6/etc/X11/xorg.conf')) {
> $xconfig_path = '/usr/X11R6/etc/X11';
> $xconfig_file_name = 'xorg.conf';
> } elsif (file_name_exist('/usr/X11R6/lib/X11/xorg.conf-4')) {
> $xconfig_path = '/usr/X11R6/lib/X11';
> $xconfig_file_name = 'xorg.conf-4';
> } elsif (file_name_exist('/usr/X11R6/lib/X11/xorg.conf')) {
> $xconfig_path = '/usr/X11R6/lib/X11';
> $xconfig_file_name = 'xorg.conf';
> }
>
> print wrap("\n\n" . 'Detected X.org version ' . $xversionAll . '.'
> . "\n\n", 0);
>
> ($major, $minor, $sub) = split_X_version($xversionAll);
>
> # If there is an existing driver, replace it by ours.
> if ($major == 7) {
>
> backup_file_to_restore($gXVideoDriverFile, 'OLD_X4_DRV');
> if (file_name_exist($gXVideoDriverFile)) {
> unlink $gXVideoDriverFile;
> }
>
> # Install the drivers.
> my %p;
> undef %p;
> if ($minor == 0) {
> # This is the best driver we can install for X.org 7.0.0
> install_file(db_get_answer('LIBDIR') . '/configurator/XOrg/6.8.x' .
> ($gIs64BitX ? '_64' : '') . '/vmware_drv.o',
> $gXVideoDriverFile, \%p, 1);
> install_file(db_get_answer('LIBDIR') . '/configurator/XOrg/6.8.x' .
> ($gIs64BitX ? '_64' : '') . '/vmmouse_drv.o',
> $gXMouseDriverFile, \%p, 1);
> } else {
> print wrap("\n\n" . 'No mouse driver for X.org version: ' . $xversionAll . '.'
> . "\n\n", 0);
> }
> fix_X_link('7');
> } else {
> error ('Problem extracting verion of X.org' . "\n\n");
> }
> return ($xversion, xconfig_file_abs_path($xconfig_path, $xconfig_file_name),
> $xversionAll);
> }
>
4936c5027,5043< if (file_name_exist(xserver6())) {
-
- -
> if (file_name_exist(xserver7())) {
> if (is64BitElf(xserver7())) {
> $gIs64BitX = 1;
> # 64-bit FreeBSD puts it's 64-bit X modules in lib not lib64
> if (vmware_product() ne 'tools-for-freebsd') {
> $gXMouseDriverFile = "$cX64ModulesDir7/input/vmmouse_drv.o";
> $gXVideoDriverFile = "$cX64ModulesDir7/drivers/vmware_drv.o";
> } else {
> $gXMouseDriverFile = "$cXModulesDir7/input/vmmouse_drv.o";
> $gXVideoDriverFile = "$cXModulesDir7/drivers/vmware_drv.o";
> }
> } else {
> $gXMouseDriverFile = "$cXModulesDir7/input/vmmouse_drv.o";
> $gXVideoDriverFile = "$cXModulesDir7/drivers/vmware_drv.o";
> }
> ($xversion, $xconfig_file, $xversionAll) = xorg_7();
> } elsif (file_name_exist(xserver6())) {これを、vmware-config-tools.patchなどの名前で保存して、/usr/bin/vmware-config-tools.plにあててください。
# cd /usr/bin
# patch vmware-config-tools.pl < vmware-config-tools.patch
あとは、いつも通りvmware-config-tools.plを実行してあげれば望む動作が得られるようになります。