Ubuntu 11.04 (Natty Narwhal)の初期設定メモ。
- このメモの目的と内容
- デスクトップPCを開発機兼内向けサーバ機として使うための自分用メモ
- インストールにはubuntu-11.04-desktop-i386.iso.torrentを使用
- アップグレードではなくクリーンインストール
- /homeのみフォーマットせずに再利用
- デスクトップ環境をインストール後、サーバ用カーネルを追加でインストールした
最新バージョンでの初期設定内容はUbuntuにて掲載しています。
インストール手順
省略。
サービスの設定
サービスの停止
以下のサービスを停止する。
- atd(コマンドの遅延実行)
- cups(プリンタ)
- saned(スキャナ)
- bluetooth(bluetooth)
- speech-dispatcher(発話シンセサイザ)
sudo apt-get install sysv-rc-conf
sudo sysv-rc-conf --level 2345 atd off
sudo sysv-rc-conf --level 2345 cups off
sudo sysv-rc-conf --level 2345 saned off
sudo sysv-rc-conf --level 2345 bluetooth off
sudo sysv-rc-conf --level 2345 speech-dispatcher off
sudo sysv-rc-conf --list
NetworkManagerの削除
NetworkManagerによる管理を無効にするため、停止したのち削除する。
$ sudo service network-manager stop network-manager stop/waiting $ sudo update-rc.d -f network-manager remove Removing any system startup links for /etc/init.d/network-manager ... $ sudo apt-get remove network-manager
自動起動するプログラムの設定
[電源ボタン]→[システムの設定]→[自動起動するアプリ]
- 下記のものを停止する
- Bluetooth マネージャー
- Evolution Alarm Notifier
- Ubuntu One
- ネットワーク・マネージャ
- パーソナルファイル共有
- ユーザ・フォルダの更新
- リモート・デスクトップ
- 印刷キューのアプレット
- 視覚支援
- 下記のものは残す
- GNOME Login Sound
- GSettings データ変換
- PulseAudio Sound System
- SSH 鍵エージェント
- Secret Storage Service
- アップデート通知
- シークレットストレージサービス
- ディスク通知
- 証明書および鍵を格納するストレージ
- 新しいハードウェアのドライバを確認する
- 電源の管理
設定ファイル等の編集
/home配下の設定ファイルは、Ubuntu 10.04 Desktop 初期設定メモ §.設定ファイル等の編集で設定した内容を引き続き使用した。
ネットワークの設定
仮想マシンのネットワークで使用するブリッジの設定など。
IPv6の無効化
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
変更を反映させて、無効になったか確認。
$ cat /proc/net/if_inet6 : : $ sudo sysctl -p $ cat /proc/net/if_inet6
sysctl -pの後、何も表示されなければ無効になっている。
ネットワークインターフェース、ブリッジの設定
bridge-utils, uml-utilitiesをインストール。
sudo apt-get install bridge-utils uml-utilities
/etc/network/interfacesを以下の内容に変更。
auto lo
iface lo inet loopback
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.0.10
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 127.0.0.1 (必要に応じて他のDNSサーバを記入)
dns-search example.com
pre-up /sbin/ifconfig eth0 0.0.0.0 promisc up
pre-up /usr/sbin/brctl addbr br0
pre-up /usr/sbin/tunctl -u (ユーザ名) -t tap0
pre-up /sbin/ifconfig tap0 0.0.0.0 promisc up
post-up /usr/sbin/brctl addif br0 eth0
post-up /usr/sbin/brctl addif br0 tap0
pre-down /sbin/ifconfig tap0 down
pre-down /sbin/ifconfig eth0 down
post-down /sbin/ifconfig br0 down
post-down /usr/sbin/brctl delbr br0
ネットワークサービスを再起動
設定を反映させるためにネットワークサービスを再起動。
sudo /etc/init.d/networking restart
ifconfig -aでbr0とtap0が追加されていることを確認しておく。
$ ifconfig -a br0 Link encap:イーサネット ハードウェアアドレス xx:xx:xx:xx:xx:xx inetアドレス:192.168.0.10 ブロードキャスト:192.168.0.255 マスク:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1 : : tap0 Link encap:イーサネット ハードウェアアドレス xx:xx:xx:xx:xx:xx UP BROADCAST PROMISC MULTICAST MTU:1500 メトリック:1 : :
root宛てメールの送信先の変更
/etc/aliasに追記。
# Added by installer for initial user
root: root@example.com
aliasを更新。
sudo newaliases
ソフトウェアの追加と削除
リポジトリの設定
medibuntuリポジトリを追加。
sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
Synapticパッケージマネージャの設定
[電源ボタン]→[システムの設定]→[Synaptic パッケージ・マネージャ]
- [設定]メニュー→[設定]
- [全般]タブ
- メインウィンドウ内でパッケージ情報を表示する
- 変更を正常に適用できた場合に終了の確認をする
- [全般]タブ
- [設定]メニュー→[リポジトリ]
- [Ubuntuのソフトウェア]タブ
- main, universe, restricted, multiverseにチェックを入れる
- 「CD-ROM/DVDからのインストール」チェックを外す
- [他のソフトウェア]タブ
- (Medibuntuが追加されていることを確認)
- [アップデート]タブ
- アップデートの確認 2日ごと
- インストールできるアップデートを通知するのみ
- [統計情報]タブ
- 統計情報を提供する
- [Ubuntuのソフトウェア]タブ
ソフトウェアの削除・インストール
不要なソフトウェアの削除
sudo apt-get remove --purge \
aspell aspell-en \
at-spi \
avahi-daemon avahi-autoipd \
'bluez(-.*)?' \
bc \
bogofilter bogofilter-bdb bogofilter-common \
cdparanoia \
couchdb-bin \
cups cups-bsd cups-client cups-common cups-driver-gutenprint libcupscgi1 libcupsdriver1 libcupsmime1 libcupsppdc1 \
dictionaries-common \
espeak espeak-data \
evolution evolution-common evolution-couchdb evolution-data-server evolution-exchange evolution-indicator evolution-plugins evolution-webcal libebackend1.2-0 \
example-content \
f-spot \
foomatic-db foomatic-db-engine foomatic-filters foo2zjs \
ghostscript \
gbrainy \
gnome-bluetooth pulseaudio-module-bluetooth \
gnome-games-common gnome-mag gnome-orca libgnome-pilot2 libgnome-bluetooth.* \
gnome-accessibility-themes \
gnome-user-guide-en gnome-user-guide-ja \
hpijs hplip hplip hplip-data pxljr \
libgutenprint2 \
min12xxw \
modemmanager \
myspell-en-us \
ntfs-3g libntfs-3g.* libntfs.* \
nano \
rdesktop vinagre \
rhythmbox \
sane-utils \
splix \
system-config-printer-common system-config-printer-gnome \
tomboy \
toshset \
usb-creator-common usb-creator-gtk \
wamerican
削除するソフトウェアの概要は次のとおり。
パッケージ名 | 概要 |
---|---|
aspell | GNU aspell スペルチェッカ |
aspell-en | GNU Aspell 用英語辞書 |
at-spi | 援助用テクノロジサービス提供インターフェイス |
avahi-daemon | Avahi mDNS/DNS-SD daemon |
avahi-autoipd | Avahi IPv4LL ネットワークアドレス設定デーモン |
'bluez(-.*)?' | Bluetooth tools and daemons |
bc | 任意精度の計算言語 |
bogofilter | 高速ベイジアン spam フィルタ (ダミーパッケージ) |
bogofilter-bdb | a fast Bayesian spam filter (Berkeley DB) |
bogofilter-common | a fast Bayesian spam filter (common files) |
cdparanoia | CD サンプリング用のオーディオ抽出ツール |
couchdb-bin | RESTful document oriented database, programs |
cups | Common UNIX Printing System(tm) - サーバ |
cups-bsd | Common UNIX Printing System(tm) - BSD commands |
cups-client | Common UNIX Printing System(tm) - client programs (SysV) |
cups-common | Common UNIX Printing System(tm) - common files |
cups-driver-gutenprint | printer drivers for CUPS |
libcupscgi1 | Common UNIX Printing System(tm) - CGI library |
libcupsdriver1 | Common UNIX Printing System(tm) - Driver library |
libcupsmime1 | Common UNIX Printing System(tm) - MIME library |
libcupsppdc1 | Common UNIX Printing System(tm) - PPD manipulation library |
dictionaries-common | Common utilities for spelling dictionary tools |
espeak | マルチリンガルソフトウェア発話シンセサイザ |
espeak-data | speech data files |
evolution | groupware suite with mail client and organizer |
evolution-common | Evolution 用アーキテクチャ非依存ファイル |
evolution-couchdb | Evolution support for CouchDB databases |
evolution-data-server | evolution データベースバックエンドサーバ |
evolution-exchange | Evolution グループウェアスイート用 Exchange プラグイン |
evolution-indicator | GNOME panel indicator applet for Evolution |
evolution-plugins | standard plugins for Evolution |
evolution-webcal | GNOME および Evolution 用 URL ハンドラ |
libebackend1.2-0 | Utility library for evolution data servers |
example-content | Ubuntu example content |
f-spot | 個人向け写真管理アプリケーション |
foomatic-db | OpenPrinting プリンタサポート - データベース |
foomatic-db-engine | OpenPrinting プリンタサポート - プログラム |
foomatic-filters | OpenPrinting プリンタサポート - フィルタ |
foo2zjs | ZjStream ベースのプリンタ用の印刷サポート |
ghostscript | interpreter for the PostScript language and for PDF |
gbrainy | brain teaser game and trainer to have fun and to keep your brain trained |
gnome-bluetooth | GNOME Bluetooth tools |
pulseaudio-module-bluetooth | Bluetooth module for PulseAudio sound server |
gnome-games-common | Common files for GNOME Games |
gnome-mag | GNOME デスクトップ用スクリーン拡大鏡 |
gnome-orca | スクリプト化可能なスクリーンリーダ |
libgnome-pilot2 | Support libraries for gnome-pilot |
libgnome-bluetooth.* | GNOME Bluetooth tools - support library development files |
gnome-accessibility-themes | accessibility themes for the GNOME desktop |
hpijs | HP Linux Printing and Imaging - gs IJS ドライバ (hpijs) |
hplip | HP Linux Printing and Imaging System (HPLIP) |
hplip | HP Linux Printing and Imaging System (HPLIP) |
hplip-data | HP Linux Printing and Imaging - データファイル |
pxljr | Driver for HP's Color LaserJet 35xx/36xx color laser printers |
libgutenprint2 | runtime for the Gutenprint printer driver library |
min12xxw | Printer driver for KonicaMinolta PagePro 1[234]xxW |
modemmanager | D-Bus service for managing modems |
myspell-en-us | myspell 用米国英語辞書 |
ntfs-3g | FUSE 用の NTFS ドライバ |
libntfs-3g.* | ntfs-3g filesystem in userspace (FUSE) library headers |
libntfs.* | ntfs-3g filesystem in userspace (FUSE) library headers |
nano | Pico にヒントを得て作られた、コンパクトで使いやすいテキストエディタ |
rdesktop | Windows NT/2000 ターミナルサーバ用 RDP クライアント |
vinagre | remote desktop client for the GNOME Desktop |
rhythmbox | GNOME 用音楽プレイヤーおよびオーガナイザー |
sane-utils | スキャナ用 API ライブラリ - ユーティリティ |
splix | Driver for Samsung's SPL2 (bw) and SPLc (color) laser printers |
system-config-printer-common | Printer configuration GUI |
system-config-printer-gnome | Printer configuration GUI |
tomboy | Wiki スタイルのリンクを使ったデスクトップメモ取りプログラム |
toshset | Access much of the Toshiba laptop hardware interface |
usb-creator-common | create a startup disk using a CD or disc image (common files) |
usb-creator-gtk | create a startup disk using a CD or disc image (for GNOME) |
wamerican | /usr/share/dict 用米国英語単語リスト |
パッケージ名 | 概要 |
使用するソフトウェアのインストール
sudo apt-get install \
autoconf automake autotools-dev build-essential gettext libtool bison \
dovecot-common dovecot-imapd \
cadaver \
colordiff \
chromium-browser \
epiphany-browser \
flashplugin-installer \
gedit-plugins \
git-core \
gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly \
gimp \
hddtemp \
ibus-anthy \
icedax \
lighttpd lighttpd-mod-magnet lighttpd-mod-webdav \
logwatch \
lha \
lm-sensors \
munin munin-node \
nasm \
nautilus-open-terminal \
nethogs \
nfs-kernel-server \
nkf \
ntp \
php5-cgi \
ruby \
samba smbfs \
swig \
subversion subversion-tools \
system-config-lvm \
tree \
thunderbird thunderbird-globalmenu thunderbird-gnome-support thunderbird-locale-ja \
ttf-vlgothic ttf-monapo ttf-ipafont ttf-sazanami-gothic \
virt-manager qemu-kvm \
w3c-dtd-xhtml \
xinetd \
yasm
インストールするソフトウェアの概要は次のとおり。
パッケージ名 | 概要 |
---|---|
autoconf | automatic configure script builder |
automake | A tool for generating GNU Standards-compliant Makefiles |
autotools-dev | Update infrastructure for config.{guess,sub} files |
build-essential | build-essential なパッケージの一覧情報 |
gettext | GNU Internationalization utilities |
libtool | Generic library support script |
bison | YACC 互換なパーサジェネレータ |
dovecot-common | secure mail server that supports mbox and maildir mailboxes |
dovecot-imapd | mbox および maildir メールボックスをサポートするセキュアな IMAP サーバ |
cadaver | コマンドライン WebDAV クライアント |
colordiff | 'diff' の出力をカラー化するツール |
chromium-browser | Chromium ブラウザ |
epiphany-browser | 直観的な GNOME ウェブブラウザ |
flashplugin-installer | Adobe Flash Player plugin installer |
gedit-plugins | set of plugins for gedit |
git-core | fast, scalable, distributed revision control system (obsolete) |
gstreamer0.10-ffmpeg | GStreamer 用 FFmpeg プラグイン |
gstreamer0.10-plugins-bad | GStreamer プラグインの「不良な」セット |
gstreamer0.10-plugins-ugly | GStreamer プラグインの「厄介な」セット |
gimp | The GNU Image Manipulation Program |
hddtemp | hard drive temperature monitoring utility |
ibus-anthy | anthy engine for IBus |
icedax | オーディオ CD から WAV を生成する |
lighttpd | 最小限のメモリしか使用しない高速で軽量なウェブサーバ |
lighttpd-mod-magnet | Control the request handling module for lighttpd |
lighttpd-mod-webdav | WebDAV module for lighttpd |
logwatch | 出力が優れ、Perl で書かれたログアナライザ |
lha | lzh archiver |
lm-sensors | utilities to read temperature/voltage/fan sensors |
munin | ネットワーク中をグラフ化するフレームワーク (グラフ生成/データ収集器) |
munin-node | network-wide graphing framework (node) |
nasm | General-purpose x86 assembler |
nautilus-open-terminal | nautilus plugin for opening terminals in arbitrary local paths |
nethogs | Net top tool grouping bandwidth per process |
nfs-kernel-server | NFS カーネルサーバ用サポート |
nkf | ネットワーク漢字コード変換フィルタ |
ntp | Network Time Protocol デーモンおよびユーティリティプログラム |
php5-cgi | server-side, HTML-embedded scripting language (CGI binary) |
ruby | An interpreter of object-oriented scripting language Ruby |
samba | UNIX 用 SMB/CIFS ファイル、プリンタ、認証サーバ |
smbfs | Common Internet File System ユーティリティ - 互換パッケージ |
swig | Generate scripting interfaces to C/C++ code |
subversion | 先進的なバージョン管理システム |
subversion-tools | Assorted tools related to Subversion |
system-config-lvm | A utility for graphically configuring Logical Volumes |
tree | ディレクトリツリーをカラー表示する |
thunderbird | mail/news client with RSS and integrated spam filter support |
thunderbird-globalmenu | Unity appmenu integration for Thunderbird |
thunderbird-gnome-support | Support for Gnome in Mozilla Thunderbird |
thunderbird-locale-ja | Thunderbird Japanese language/region package |
ttf-vlgothic | Vine Linux による日本語 TrueType フォント |
ttf-monapo | 日本語 TrueType フォント - Monapo |
ttf-ipafont | Japanese TrueType font, IPAfont (meta package) |
ttf-sazanami-gothic | Sazanami ゴシック日本語 TrueType フォント |
virt-manager | 仮想マシン管理用デスクトップアプリケーション |
qemu-kvm | Full virtualization on i386 and amd64 hardware |
w3c-dtd-xhtml | W3C eXtensible HyperText Markup Language (XHTML) DTD |
xinetd | replacement for inetd with many enhancements |
yasm | modular assembler with multiple syntaxes support |
パッケージ名 | 概要 |
サーバカーネル・ヘッダのインストール
sudo apt-get install linux-server linux-headers-server
ドライバ類のインストール
[電源ボタン]→[システムの設定]→[追加のドライバ]
- 有効にできるドライバを有効にする
その他のソフトウェアの削除
[電源ボタン]→[システムの設定]→[パッケージの整理]
- 削除できる不要なソフトウェアを削除する
パッケージ情報の更新とアップデート
sudo apt-get update && sudo apt-get dist-upgrade
GRUBの設定
/etc/default/grubを編集
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
- GRUB_HIDDEN_TIMEOUTをコメントアウト
- メニュー画面を表示する
- GRUB_TIMEOUT=5
- タイムアウト時間を5秒にする
- GRUB_CMDLINE_LINUX_DEFAULTを"quiet splash"から""に変更
- ブート画面をテキスト表示にする
編集が終わったら、update-grub2で設定を反映させる。
$ sudo update-grub2 Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.38-8-generic-pae Found initrd image: /boot/initrd.img-2.6.38-8-generic-pae Found linux image: /boot/vmlinuz-2.6.38-8-generic Found initrd image: /boot/initrd.img-2.6.38-8-generic Found memtest86+ image: /memtest86+.bin done
再起動
ここまででいったん再起動。 再起動後にps, pstree, topで必要なさそうなプロセスが動いてないかチェックする。
デスクトップ環境の設定とカスタマイズ
Ubuntu 10.04 Desktop 初期設定メモ §.デスクトップ環境の設定とカスタマイズでの設定とほぼ同じのため省略。
開発環境の設定
Ubuntu 10.04 Desktop 初期設定メモ §.開発環境の設定での設定とほぼ同じのため省略。