FC5インストール後の設定あれこれ

yumの設定

yumはFCの自動アップデートエンジンです。しかし、デフォルトの設定のままでは、本家のサーバを参照してしまいます。そのため日本からアクセスすると、どうしてもストレスを感じてしまうことがあります。そこで、日本のミラーサーバが参照されるように設定を変更すると幸せになれます・・・よね?

ここでは、yumの設定管理を/etc/yum.repos.dというディレクトリの中にあるファイルを操作することで行おうと思います。
最初に/etc/yum.repos.dの下に三つの新規ファイルを作成します。

次にfedora-core.repo, fedora-extras.repo, fedora-updates.repoという三つの既存ファイルを以下の内容で置き換えます。

ここまでの設定をしたあとで、

# 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を実行してあげれば望む動作が得られるようになります。

以下は個人的なTIPSですが、参考になれば・・・。

  • せっかくX11R7でVMWareSVGAドライバをサポートしてくれているので、これをそのまま使います。
    1. vmware-config-tools.plを実行する前に、オリジナルの/etc/X11/xorg.confを保存しておきます。(もちろん自動的にバックアップしてくれますが、念のため)
    2. vmware-config-tools.plを実行します。
    3. 保存しておいたxorg.confを元に戻します。
    4. xorg.confのmouseセクションに、driver "mouse"となっている箇所があります。これを driver "vmmouse"に変更します。
  • 不要なサービスを停止します。これはデスクトップ→管理→サービスとメニューを選択することで、GUIから行うことができます。以下は、私が停止しているサービスのリストです。iptablesを停止していますが、これはNAT ONLYでの利用を行っているからで、ホストOSからは不正なアクセスは行われないだろうという仮定のもとで行っています。