CentOS インストール後にしたこと

AMD製のCPUではCentOS7.2が動かないということなのでCentOS7.1をインストールしました。
(現在は解決してるぽい? https://bugs.centos.org/view.php?id=9860

 

・ソフトウェアの更新

残りの細かいパッケージをアップデートしたら[システムツール]から[Software]や[Software Updata]が消えた。

  1. アプリケーションインストーラーのインストール
    #yum install gnome-software.x86_64
  2. アプリケーションインストーラーを使ってgnome パッケージアップデータをインストール
    [アプリケーションインストーラー]→[システム]→[その他]→[gnome パッケージ],[gnome パッケージアップデータ]

でだいたい戻る。

 

・ミラーサーバーの設定。

ftp-adminの憂鬱: yumで速いミラーサーバーを指定する方法

#rpm -qa | grep fastestmirror

yum-plugin-fastestmirror-1.1.31-34.el7.noarch

/etc/yum/pluginconf.d/fastestmirror.confに以下の preferオプションでサーバーを一つ指定。

prefer=ftp.jaist.ac.jp

/var/cache/yum以下にあるtimedhosts.txtをいったん削除。

・グラフィックボードのドライバーをインストールする。

刺さっているグラボの確認。

$ lspci | grep VGA
07:00.0 VGA compatible controller: NVIDIA Corporation G73 [GeForce 7300 GT] (rev a1)

# lsmod | grep nouveau

で、現在使用されている nouveauモジュールが幾つか表示される。

Nouveau(ヌーボー)はNVIDIAビデオカード用にオープンソースで開発されている無料のドライバーですが、競合するので止めます。

NVIDIA Accelerated Linux Graphics Driver README and Installation Guide

Chapter 4. Installing the NVIDIA Driver

Before you Begin

If you're installing on a system that is set up to use the Nouveau driver, then you should first disable it before attempting to install the NVIDIA driver. See Q & A 8.1, “Interaction with the Nouveau Driver” for details. 

8.1. Interaction with the Nouveau Driver

What is Nouveau, and why do I need to disable it?

Smiling Life : CentOS7におけるNVIDIAドライバのインストール方法

を参照しました。

 

nouveauをロードしない起動イメージファイルを作成。
デフォルトのイメージファイルをバックアップとして残しておく。
# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

次のコマンドでnouveauドライバをロードしない起動イメージファイルを作成。
#dracut --omit-drivers nouveau /boot/initramfs-$(uname -r).img $(uname -r)

# vi /etc/modprobe.d/blacklist.conf に
blacklist nouveau
の1行を加える。

デフォルトランレベルを3に変更する。

CentOS7の場合。
# systemctl get-default
graphical.target

# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.

# systemctl get-default
multi-user.target

CentOS6の場合。
# vi /etc/inittab
id:3:initdefault:

NVIDIAのページから該当のLinux用ドライバをダウンロードして、後で見つけやすい場所に保存する。カタカナの「ダウンロード」フォルダとかだと後ほどrunlevel:3でインストールするときに面倒なので一つ上の /home/ あたりに置いておく。

その後再起動。

rootでログイン。runファイルの実行。

# sh NVIDIA-Linux-x86_64-304.131.run

設問を進めてインストール

インストールが完了したら

CentOS7の場合
# systemctl get-default
multi-user.target

># systemctl set-default graphical.target

># systemctl get-default
graphical.target

># reboot

CentOS6の場合

# vi /etc/inittab

ランレベルを5に戻して再起動。

(注:当初上記のようにrunファイルを使ったドライバインストールを行いましたが、それだとカーネルアップデート毎に再度ドライバを入れなおさないとダメなので、Yumでのインストール(後述)に変更しました)

CentOS をアップデートしたら途中で止まった - demandosigno

 

Yumでのドライバインストールを目指す。

ELRepo : kmod-nvidia-304xx

ELRepo(The Community Enterprise Linux Repository)リポジトリーの導入。
# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm を取得中
準備しています... ################################# [100%]
更新中 / インストール中...
1:elrepo-release-7.0-2.el7.elrepo ################################# [100%]

# yum repolist enabled
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.jaist.ac.jp
* elrepo: ftp.ne.jp
* extras: ftp.jaist.ac.jp
* updates: ftp.jaist.ac.jp

リポジトリー ID リポジトリー名 状態
base/7/x86_64 CentOS-7 - Base 9,007
elrepo ELRepo.org Community Enterprise Linux Repository - el7 172
extras/7/x86_64 CentOS-7 - Extras 393
updates/7/x86_64 CentOS-7 - Updates 2,560
repolist: 12,132

★すでに # sh NVIDIA-Linux-x86_64-304.131.run でインストール済みの人は、先に
sh ./NVIDIA-Linux-x86_64-304.64.run --uninstall
でバイナリ版をアンインストールしてください。

# yum install kmod-nvidia あたりでTABキーを押すと候補が出るのでよく確認しましょう。
kmod-nvidia-304xx.x86_64 kmod-nvidia-340xx.x86_64 kmod-nvidia.x86_64

# yum install kmod-nvidia-304xx.x86_64
読み込んだプラグイン:fastestmirror, langpacks...

# rpm -qa | grep nvidia
kmod-nvidia-304xx-304.131-1.el7.elrepo.x86_64
nvidia-x11-drv-304xx-304.131-1.el7.elrepo.x86_64

ランレベルを5に戻して再起動。

無事インストールされ、1920*1200 二枚のFullHDにできた。

gnomeのパネルが右側のモニターに出ていたので左側のモニターに移す。

パネルを右クリック→プロパティ→[向き]の中から左側モニターの[上](下のパネルは[下])を選択する。

Google Chrome のインストール

GoogleYumリポジトリをCentOS7に追加。
#vi /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

#yum update

Chromeパッケージの確認。

#yum search google chrome

読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.jaist.ac.jp
* elrepo: ftp.ne.jp
* extras: ftp.jaist.ac.jp
* updates: ftp.jaist.ac.jp
=========== N/S matched: google, chrome ==================
google-chrome-beta.x86_64 : Google Chrome (beta)
google-chrome-stable.x86_64 : Google Chrome
google-chrome-unstable.x86_64 : Google Chrome (unstable)

Full name and summary matches only, use "search all" for everything.

#yum info google-chrome-unstable
バージョン : 56.0.2902.0

#yum info google-chrome-beta
バージョン : 55.0.2883.28

#yum info google-chrome-stable
バージョン : 54.0.2840.71

stableで十分だと思います。

#yum install google-chrome-stable

依存関係から他にもいろいろインストールされます。

# rpm -qa | grep chrome
google-chrome-stable-54.0.2840.71-1.x86_64

 

Flash pluginをFirefoxにインストール

https://get.adobe.com/flashplayer/ から Linux YUM版をダウンロード。
そのままパッケージインストーラーで開けたのでOKを押す。
「このファイルをインストールしたいですか。」でインストール

ブラウザ再起動、がFlashページが見られないまま。さっき入ったのは Adobe Repository Configuration らしい。で、「ソフトウェアの追加/削除」から、"adobe"で検索して flash-plugin-11.2 があったのでインストール。ブラウザ再起動。入った。

demandosigno.hatenablog.jp

/* -----codeの行番号----- */