初期設定
各サーバで共通の設定を行います。
ネットワークの管理

ubuntuのデスクトップメニューの[システム]→[システム管理]→[ネットワークの管理]を選択して、「ネットワークの設定」ダイアログを表示します。
ネットワークの設定

なぜか「無線接続」と表示されるんですが、もう一つ表示されている「モデム接続」じゃないだろうから、「無線接続」を選択して[プロパティ]をクリックします。
接続の設定

さて、IPアドレスですが、今回は8IP固定のサービスを利用したので、サブネットマスクは255.255.255.248としました。
そのほかのアドレスは、サーバによって異なるので、ここでは適当なアドレスを例にしておきます。
| 設定の種類 | 固定IPアドレス |
|---|---|
| IPアドレス | 50.50.50.66 |
| サブネットマスク | 255.255.255.248 |
| ゲートウェイ | 50.50.50.65 |
パッケージ管理の設定
コンソールでは、青字部分が入力するところです。
% sudo vi /etc/apt/sources.list
により、設定ファイル /etc/apt/sources.list を編集。# dev ...
# dev-src ...
で始まる行のコメントアウトをはずして保存します。
% sudo apt-get update
% sudo apt-get upgrade
% sudo apt-get upgrade
SSHのインストール
基本的に、サーバはログインして管理するつもりなので、SSHをインストールしておきます。
% sudo apt-get install ssh
さて、これでパソコンからログインしてサーバの管理が出来るようになりました。これ以降は、リモートからログインして操作します。webminのインストール
SSHは使えますが、サーバの設定にはwebminが何かと便利。
ところが、なぜかwebminはapt-getでインストールできるモジュールが無いようです。仕方ないので、tarボールをここからダウンロードしてきてインストールします。
この時点では、webmin-1.310.tar.gzが最新でした。
$HOMEにinstallというディレクトリを作り(好きなところでいいですよ)、ダウンロードしてきたwebmin-1.310.tar.gzを置きます。
yoritomo@minamoto_server:~/install$ sudo tar xzvf webmin-1.310.tar.gz
yoritomo@minamoto_server:~/install$ cd webmin-1.310
yoritomo@minamoto_server:~/install/webmin-1.310$ sudo sh setup.sh
***********************************************************************
* Welcome to the Webmin setup script, version 1.310 *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /home/teckumo/install/webmin-1.310 ...
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Config file directory [/etc/webmin]:[Return]
Log file directory [/var/webmin]:[Return]
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl):[Return]
Testing Perl ...
Perl seems to be installed ok
***********************************************************************
Operating system name: Ubuntu Linux
Operating system version: 6.10
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.
Web server port (default 10000):[Return]
Login name (default admin):[Return]
Login password:*****
Password again:*****
The Perl SSLeay library is not installed. SSL not available.
Start Webmin at boot time (y/n): y
***********************************************************************
Creating web server config files..
..done
Creating access control file..
..done
Inserting path to perl into scripts..
..done
Creating start and stop scripts..
..done
Copying config files..
acl adsl-client apache at backup-config bandwidth bind8 bsdexports burner cfengine change-user cluster-copy cluster-cron cluster-passwd cluster-shell cluster-software cluster-useradmin cluster-usermin cluster-webmin cpan cron custom dfsadmin dhcpd dnsadmin dovecot exports fdisk fetchmail file firewall format frox fsdump grub heartbeat hpuxexports htaccess-htpasswd idmapd inetd init inittab ipfilter ipfw ipsec jabber krb5 ldap-client ldap-useradmin lilo logrotate lpadmin lvm mailboxes mailcap majordomo man mon mount mysql net nis openslp pam pap passwd postfix postgresql ppp-client pptp-client pptp-server proc procmail proftpd pserver qmailadmin quota raid rbac samba sarg sendmail sentry servers sgiexports shell shorewall smart-status smf software spam squid sshd status stunnel syslog-ng syslog telnet time tunnel updown useradmin usermin vgetty webalizer webmin webminlog wuftpd xinetd zones
..done
Configuring Webmin to start at boot time..
Created init script /etc/init.d/webmin
..done
Creating uninstall script /etc/webmin/uninstall.sh ..
..done
Changing ownership and permissions ..
..done
Running postinstall scripts ..
..done
Attempting to start Webmin mini web server..
Starting Webmin server in /home/teckumo/install/webmin-1.310
..done
***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to
http://minamoto_server:10000/
and login with the name and password you entered previously.
yoritomo@minamoto_server:~/install/webmin-1.310$
続いて、SSLを使用するためにSSLeayをインストールします。
yoritomo@minamoto_server:~/install$ cd webmin-1.310
yoritomo@minamoto_server:~/install/webmin-1.310$ sudo sh setup.sh
***********************************************************************
* Welcome to the Webmin setup script, version 1.310 *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /home/teckumo/install/webmin-1.310 ...
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Config file directory [/etc/webmin]:[Return]
Log file directory [/var/webmin]:[Return]
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl):[Return]
Testing Perl ...
Perl seems to be installed ok
***********************************************************************
Operating system name: Ubuntu Linux
Operating system version: 6.10
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.
Web server port (default 10000):[Return]
Login name (default admin):[Return]
Login password:*****
Password again:*****
The Perl SSLeay library is not installed. SSL not available.
Start Webmin at boot time (y/n): y
***********************************************************************
Creating web server config files..
..done
Creating access control file..
..done
Inserting path to perl into scripts..
..done
Creating start and stop scripts..
..done
Copying config files..
acl adsl-client apache at backup-config bandwidth bind8 bsdexports burner cfengine change-user cluster-copy cluster-cron cluster-passwd cluster-shell cluster-software cluster-useradmin cluster-usermin cluster-webmin cpan cron custom dfsadmin dhcpd dnsadmin dovecot exports fdisk fetchmail file firewall format frox fsdump grub heartbeat hpuxexports htaccess-htpasswd idmapd inetd init inittab ipfilter ipfw ipsec jabber krb5 ldap-client ldap-useradmin lilo logrotate lpadmin lvm mailboxes mailcap majordomo man mon mount mysql net nis openslp pam pap passwd postfix postgresql ppp-client pptp-client pptp-server proc procmail proftpd pserver qmailadmin quota raid rbac samba sarg sendmail sentry servers sgiexports shell shorewall smart-status smf software spam squid sshd status stunnel syslog-ng syslog telnet time tunnel updown useradmin usermin vgetty webalizer webmin webminlog wuftpd xinetd zones
..done
Configuring Webmin to start at boot time..
Created init script /etc/init.d/webmin
..done
Creating uninstall script /etc/webmin/uninstall.sh ..
..done
Changing ownership and permissions ..
..done
Running postinstall scripts ..
..done
Attempting to start Webmin mini web server..
Starting Webmin server in /home/teckumo/install/webmin-1.310
..done
***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to
http://minamoto_server:10000/
and login with the name and password you entered previously.
yoritomo@minamoto_server:~/install/webmin-1.310$
yoritomo@minamoto_server:~$ sudo apt-get install libnet-ssleay-perl
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
Reading state information... 完了
以下のパッケージが新たにインストールされます:
libnet-ssleay-perl
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 7 個。
186kB のアーカイブを取得する必要があります。
展開後に追加で 975kB のディスク容量が消費されます。
取得:1 http://jp.archive.ubuntu.com edgy/main libnet-ssleay-perl 1.30-1 [186kB]
186kB を 1s で取得しました (164kB/s)
未選択パッケージ libnet-ssleay-perl を選択しています。
(データベースを読み込んでいます ... 現在 90747 個のファイルとディレクトリがインストールされています。)
(.../libnet-ssleay-perl_1.30-1_i386.deb から) libnet-ssleay-perl を展開しています...
libnet-ssleay-perl (1.30-1) を設定しています ...
yoritomo@minamoto_server:~$
Webminのメニューから[Webmin]→[Webmin設定]→[SSL暗号化]を選択します。パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
Reading state information... 完了
以下のパッケージが新たにインストールされます:
libnet-ssleay-perl
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 7 個。
186kB のアーカイブを取得する必要があります。
展開後に追加で 975kB のディスク容量が消費されます。
取得:1 http://jp.archive.ubuntu.com edgy/main libnet-ssleay-perl 1.30-1 [186kB]
186kB を 1s で取得しました (164kB/s)
未選択パッケージ libnet-ssleay-perl を選択しています。
(データベースを読み込んでいます ... 現在 90747 個のファイルとディレクトリがインストールされています。)
(.../libnet-ssleay-perl_1.30-1_i386.deb から) libnet-ssleay-perl を展開しています...
libnet-ssleay-perl (1.30-1) を設定しています ...
yoritomo@minamoto_server:~$
「可能であればSSLを使用可能にしますが?」の[はい]を選択して[保存]をクリックします。
証明書の受け入れ確認が表示されて、やっと完了。
vncの設定
色々試してみましたが、デスクトップを表示させようとするとTightVNCしかうまく行きません。
また、まだ自動起動の設定ができない。セキュリティ上はこのままのほうがいいのかなあ。
TightVNCのインストール
yoritomo@minamoto_server:~$ sudo apt-get install tightvncserver
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
Reading state information... 完了
提案パッケージ:
tightvnc-java
以下のパッケージが新たにインストールされます:
tightvncserver
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
701kB のアーカイブを取得する必要があります。
展開後に追加で 1503kB のディスク容量が消費されます。
取得:1 http://jp.archive.ubuntu.com edgy/universe tightvncserver 1.2.9-19 [701kB]
701kB を 0s で取得しました (921kB/s)
未選択パッケージ tightvncserver を選択しています。
(データベースを読み込んでいます ... 現在 83220 個のファイルとディレクトリがインストールされています。)
(.../tightvncserver_1.2.9-19_i386.deb から) tightvncserver を展開しています...
tightvncserver (1.2.9-19) を設定しています ...
yoritomo@minamoto_server:~$
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
Reading state information... 完了
提案パッケージ:
tightvnc-java
以下のパッケージが新たにインストールされます:
tightvncserver
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
701kB のアーカイブを取得する必要があります。
展開後に追加で 1503kB のディスク容量が消費されます。
取得:1 http://jp.archive.ubuntu.com edgy/universe tightvncserver 1.2.9-19 [701kB]
701kB を 0s で取得しました (921kB/s)
未選択パッケージ tightvncserver を選択しています。
(データベースを読み込んでいます ... 現在 83220 個のファイルとディレクトリがインストールされています。)
(.../tightvncserver_1.2.9-19_i386.deb から) tightvncserver を展開しています...
tightvncserver (1.2.9-19) を設定しています ...
yoritomo@minamoto_server:~$
vncの起動
yoritomo@minamoto_server:~$ vncserver :1
You will require a password to access your desktops.
Password: *****
Verify: *****
xauth: creating new authority file /home/teckumo/.Xauthority
New 'X' desktop is teckumo-draft:1
Creating default startup script /home/teckumo/.vnc/xstartup
Starting applications specified in /home/teckumo/.vnc/xstartup
Log file is /home/teckumo/.vnc/teckumo-draft:1.log
yoritomo@minamoto_server:~$
You will require a password to access your desktops.
Password: *****
Verify: *****
xauth: creating new authority file /home/teckumo/.Xauthority
New 'X' desktop is teckumo-draft:1
Creating default startup script /home/teckumo/.vnc/xstartup
Starting applications specified in /home/teckumo/.vnc/xstartup
Log file is /home/teckumo/.vnc/teckumo-draft:1.log
yoritomo@minamoto_server:~$
vncデスクトップの設定
yoritomo@minamoto_server:~$ vncserver -kill :1
Killing Xtightvnc process ID 3142
yoritomo@minamoto_server:~$ cd .vnc
yoritomo@minamoto_server:~/.vnc$ vi xstartup
赤字部分が変更点です。
Killing Xtightvnc process ID 3142
yoritomo@minamoto_server:~$ cd .vnc
yoritomo@minamoto_server:~/.vnc$ vi xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
exec gnome-session
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
xrdb $HOME/.Xresources
xsetroot -solid grey
exec gnome-session
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &