Loading...
Showing posts with label webmin. Show all posts
Showing posts with label webmin. Show all posts

2013-03-24

How to install webmin for Linux Mint 14 "Nadia"

ここでは、My Legacy dynabook Satellite J-50 に導入した Linux Mint 14 "nadia" に、Webmin 1.620 をインストールしてみる。

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.
See the standard modules page for a list of all the functions built into Webmin, or check out the screenshots.

Webmin はGUIでLinuxのシステム管理・各種設定を行うツールだ。Webブラウザでユーザーアカウントの管理やApache、DNS、ファイル共有などのサーバの設定、RAIDといったハードウェア設定などが可能だ。

Webmin は Perl で書かれたCGIプログラム群で構成されており、LinuxだけでなくFreeBSDやMac OS、Solaris、HP-UXなどさまざまなOSで使用できる。
また、Webブラウザがフロントエンドであるため、WindowsやMacOSなどが動作しているほかのPCから操作できる(Webminの設定で、外部からのアクセスを許可する必要がある)。
  ◆ How to install webmin for Linux Mint 14 "nadia"

refer. : http://www.ubuntugeek.com/how-to-install-webmin-on-ubuntu-12-10-quantal-server.html
Now you need to install webmin from APT repository.
APT レポジトリから Webmin をインストールする。
1) Execute some editor and edit the /etc/apt/sources.list file and add the following lines.
適当なエディタを起動して、/etc/apt/sources.list を編集し、以下の二行を追加する。

    deb http://download.webmin.com/download/repository sarge contrib
    deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

2) Save and exit the file.
ファイルを保存し、終了する。

3) Now you need to download GPG key.
以下のコマンドを与えて、GPG鍵をダウンロードする。

$ wget http://www.webmin.com/jcameron-key.asc
$ sudo apt-key add jcameron-key.asc

4) Update source list.
sources.list をアップデートする。 
$ sudo apt-get update

5) Install webmin using the following command
つぎのコマンドによって Webmin をインストールする。

$ sudo apt-get install webmin


--------------------------------------------------------------------------------------
How to Install  webmin for Linux Mint on My dynabook Satellite J50 :
--------------------------------------------------------------------------------------
1) /etc/apt/sources.list を編集
baian@dynabook-Satellite-J50 ~ $ sudo vi /etc/apt/sources.list
[sudo] password for baian:

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
2) GPG鍵をダウンロード
baian@dynabook-Satellite-J50 ~ $ wget http://www.webmin.com/jcameron-key.asc
--2013-03-22 07:54:20--  http://www.webmin.com/jcameron-key.asc

www.webmin.com (www.webmin.com) をDNSに問いあわせています... 216.34.181.97
www.webmin.com (www.webmin.com)|216.34.181.97|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 1320 (1.3K) [text/plain]
`jcameron-key.asc' に保存中

100%[======================================>] 1,320       --.-K/s   時間 0.006s

2013-03-22 07:54:21 (226 KB/s) - `jcameron-key.asc' へ保存完了 [1320/1320]

baian@dynabook-Satellite-J50 ~ $ sudo apt-key add jcameron-key.asc
OK
 3)  sources.list をアップデート

baian@dynabook-Satellite-J50 ~ $ sudo apt-get update
 4) Webmin のインストール

baian@dynabook-Satellite-J50 ~ $ sudo apt-get install webmin

パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています               
状態情報を読み取っています... 完了
以下の特別パッケージがインストールされます:
  apt-show-versions libauthen-pam-perl
以下のパッケージが新たにインストールされます:
  apt-show-versions libauthen-pam-perl webmin
アップグレード: 0 個、新規インストール: 3 個、 削除: 0 個、保留: 9 個。
21.1 MB のアーカイブを取得する必要があります。
この操作後に追加で 134 MB のディスク容量が消費されます。
続行しますか [Y/n]? y
取得:1 http://download.webmin.com/download/repository/ sarge/contrib webmin all 1.620 [21.0 MB]
取得:2 http://archive.ubuntu.com/ubuntu/ quantal/universe libauthen-pam-perl i386 0.16-2build2 [27.9 kB]
取得:3 http://archive.ubuntu.com/ubuntu/ quantal/universe apt-show-versions all 0.19+nmu1 [33.5 kB]
21.1 MB を 1分 52秒 で取得しました (188 kB/s)                                                                                             
以前に未選択のパッケージ libauthen-pam-perl を選択しています。
(データベースを読み込んでいます ... 現在 299590 個のファイルとディレクトリがインストールされています。)
(.../libauthen-pam-perl_0.16-2build2_i386.deb から) libauthen-pam-perl を展開しています...
以前に未選択のパッケージ apt-show-versions を選択しています。
(.../apt-show-versions_0.19+nmu1_all.deb から) apt-show-versions を展開しています...
以前に未選択のパッケージ webmin を選択しています。
(.../archives/webmin_1.620_all.deb から) webmin を展開しています...
man-db のトリガを処理しています ...
ureadahead のトリガを処理しています ...
ureadahead will be reprofiled on next reboot
libauthen-pam-perl (0.16-2build2) を設定しています ...
apt-show-versions (0.19+nmu1) を設定しています ...
** initializing cache. This may take a while **
webmin (1.620) を設定しています ...
Webmin install complete. You can now login to https://dynabook-Satellite-J50:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.
ureadahead のトリガを処理しています ...

baian@dynabook-Satellite-J50 ~ $

****************************************************************************************************
Succeeded to install webmin 1.620 for Linux Mint 14 on My dynabook Satellite J-50.
無事に、Webmin 1.620 がインストールされた。

Webminの画面を表示するには、Webブラウザを起動して、設定を行うPCのポート10000にSSLでアクセスする。たとえば、

     https://localhost:10000           ローカルからアクセスする場合
     https://dynabook-Satellite-J50:10000/          ホスト名を入力してアクセスする場合
     https://192.168.0.1:10000           IPアドレスを入力してアクセスする場合

 すると、ユーザー名とパスワードを入力する画面が表示される。

 ユーザー名(root)とパスワードを入力して[Login]ボタンをクリックすると、Webminの画面が表示される。


 


画面左サイドに並ぶ7つのカテゴリのいずれかをクリックすると、各カテゴリに属する詳細な設定項目が表示される。それぞれのカテゴリで設定できる内容は次のようなものだ。

   
カテゴリ 設定の内容
Webmin     Webmin自身やユーザー用モジュール、作業ログ、Webmin用のユーザーアカウントなど
システム     ユーザーパスワードの変更やユーザーアカウントの作成/削除/編集、システムログの表示、RPMパッケージのインストール/アンインストールなど
サーバ     Apacheやインターネットサービス、Postfix、ProFTPD、Samba、PostgreSQL、qmail、DNS、Squidなど
その他     Perlモジュールの管理やコマンドシェルの実行、ファイルマネージャの実行など

ネットワーク     ファイアウォールなど
ハードウェア     RAIDシステムやネットワークインターフェイス、ディスクのパーティション、GRUB、LILOなど
Cluster     クラスタに関する各種設定など

 ここに挙げたのは、Webminで設定可能な項目の一部分である。設定可能な項目の詳細については、Webmin 本家の standard modules page を参照しつつ、実際にWebminを操作して確認してみよう。

 See the standard modules page for a list of all the functions built into Webmin, or check out the screenshots.

 なお、ディストリビューションに含まれているWebminは、バージョンが古い可能性がある。古いバージョンには、セキュリティホールがあることが多いので、実際に使用する前に、最新版にアップデートしよう。Webminには、自分自身をアップデートする機能があるので、それを利用して最新版に更新すると便利だ。

 Webminのアップデート作業は、[Webmin]カテゴリの[Webminの設定]-[Webminのアップグレード]を選択する。次に、表示されるオプションから[www.webmin.comからの最新バージョン]を選択して、[Webminのアップグレード]ボタンをクリックする。画面の指示に従って作業を進めると、アップデート作業は終了だ。

 なお、アップデートを行うと、言語の設定がデフォルト(英語)に戻ってしまう。日本語にするには、[Webmin]カテゴリの[Webmin設定]-[言語とテーマの変更]を選択して、言語の一覧から[Japanese(JA_JP.UTF8)]を選択する。
見た目の[テーマ]についても、ここで選択・変更が可能である。

Webmin -[言語とテーマの変更]
Webmin - デフォルトテーマを選択
Webmin - 古い webmin テーマを選択



2010-05-13

OpenSolaris Tips: Webmin Install Howto into OpenSolaris dev. b134

Webmin は GUI でシステムのの各種設定を行うツールだ。Webブラウザ上でユーザーアカウントの管理や Apache などのサーバの設定、RAID といったハードウェア設定などを行うことが可能になる。
Webmin は Perl で書かれた CGI プログラム群で構成されており、さまざまな OS で使用できる。

My Notebook に OpenSolaris dev. b134 をインストールして試用中なのだが、ここで Webmin をインストールしてみる。
Webmin はデフォルトではインストールされないが、IPS パッケージ・リポジトリ(ここでは /dev)にあるので、ここからインストールする。

Webmin is a web based system administration tool that provides a set of CGI files, Perl files, and a specialized web server for administer in various system facilities and applications on the machine where the Webmin server is running.
Webmin consists of a main server daemon, CGI and Perl files to perform the operations, and configuration files to manage site-specific information.


Fig-01: webmin 1.340 ScreenShot on Opensolaris dev. b134
Lang=Japanese(JA_JP.UTF-8), Theme=MISC.Linux
画面上部に並ぶ7つのアイコンのいずれかをクリックすると、各カテゴリに属する詳細な設定項目が表示される。それぞれのカテゴリで設定できる内容は次のようなものだ。

カテゴリ
設定の内容
Webmin Webmin自身やユーザー用モジュール、Webminアクションログ、Webmin用のユーザーアカウントなど
システム ユーザーパスワードの変更やユーザーアカウントの作成/削除/編集、システムログの表示、 ソフトウェアパッケージのインストール/アンインストールなど
サーバ Apacheやインターネットサービス、Postfix、ProFTPD、Samba、PostgreSQL、DNS、Squidなど
ネットワーク ファイアウォール、NFS共有、ネットワーク設定、など
ハードウェア ネットワークインターフェイス、ディスクのパーティション、GRUBブートローダ、システム時間 など
Cluster クラスタに関する各種設定など
その他 Perlモジュールの管理やコマンドシェルの実行、ファイルマネージャの実行など

ここに挙げたのは、Webminで設定可能な項目の一部分である。設定可能な項目の詳細については、実際にWebminを操作して確認されたい。
System Environment:

試用中のシステム環境について:
  • Platform:
  • Toshiba Satellite J50 173L/5X: Intel Pentium M740, Intel 915GM, RAM 2048MB(533MHz), HDD 80GiB, LAN Marvell 88E8053 PCI-E Giga-Ethernet.
  • Operating System:
  • $ uname -a
    SunOS satellite 5.11 snv_134 i86pc i386 i86pc Solaris


■ Installation:
ここでは、インストールする際に必要な手順について説明する。
Here are the steps necessary to install it.

Webmin パッケージはデフォルトのリポジトリにあるので、インストールするには端末を起動して以下のコマンドを与える。
Webmin package exists in the default repository, so to install it, open a terminal and run:

$ pfexec pkg install -v system/management/webmin@1.340-0.134

インストール中の履歴は以下のとおり。

Solver: [ Variables: 1047 Clauses: 7174 Iterations: 1 State: Succeeded]
Timings: [phase 1:  2.156, phase 2:  1.013, phase 3:  8.364, phase 4:  0.000, phase 5:  0.000, phase 6:  0.000, phase 7:  0.066, phase 8:  2.097, phase 9:  0.000, phase 10:  1.688, phase 11:  0.088, phase 12:  0.289]

Maintained incorporations: 
pkg://opensolaris.org/consolidation/gfx/gfx-incorporation@0.5.11,5.11-0.134:20100302T010435Z
pkg://opensolaris.org/consolidation/man/man-incorporation@0.5.11,5.11-0.134:20100302T010603Z
pkg://opensolaris.org/consolidation/SunVTS/SunVTS-incorporation@0.5.11,5.11-0.134:20100302T010332Z
pkg://opensolaris.org/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.134:20100302T010731Z
pkg://opensolaris.org/consolidation/solaris_re/solaris_re-incorporation@0.5.11,5.11-0.134:20100302T010711Z
pkg://opensolaris.org/consolidation/gnome_l10n/gnome_l10n-incorporation@0.5.11,5.11-0.134:20100302T010458Z
pkg://opensolaris.org/consolidation/cacao/cacao-incorporation@0.5.11,5.11-0.134:20100302T010354Z
pkg://opensolaris.org/consolidation/jdmk/jdmk-incorporation@0.5.11,5.11-0.134:20100302T010540Z
pkg://opensolaris.org/consolidation/dbtg/dbtg-incorporation@0.5.11,5.11-0.134:20100302T010425Z
pkg://opensolaris.org/consolidation/ips/ips-incorporation@0.5.11,5.11-0.134:20100302T010530Z
pkg://opensolaris.org/consolidation/cde/cde-incorporation@0.5.11,5.11-0.134:20100302T010405Z
pkg://opensolaris.org/consolidation/osnet/osnet-incorporation@0.5.11,5.11-0.134:20100302T010625Z
pkg://opensolaris.org/consolidation/vpanels/vpanels-incorporation@0.5.11,5.11-0.134:20100302T010742Z
pkg://opensolaris.org/consolidation/l10n/l10n-incorporation@0.5.11,5.11-0.134:20100302T010551Z
pkg://opensolaris.org/consolidation/X/X-incorporation@0.5.11,5.11-0.134:20100302T010343Z
pkg://opensolaris.org/consolidation/sic_team/sic_team-incorporation@0.5.11,5.11-0.134:20100302T010650Z
pkg://opensolaris.org/consolidation/sunpro/sunpro-incorporation@0.5.11,5.11-0.134:20100302T010721Z
pkg://opensolaris.org/entire@0.5.11,5.11-0.134:20100302T023003Z
pkg://opensolaris.org/consolidation/cns/cns-incorporation@0.5.11,5.11-0.134:20100302T010415Z
pkg://opensolaris.org/consolidation/nspg/nspg-incorporation@0.5.11,5.11-0.134:20100302T010614Z
pkg://opensolaris.org/consolidation/install/install-incorporation@0.5.11,5.11-0.134:20100302T010520Z
pkg://opensolaris.org/consolidation/hcts/hcts-incorporation@0.5.11,5.11-0.134:20100302T010509Z
pkg://opensolaris.org/consolidation/gnome/gnome-incorporation@0.5.11,5.11-0.134:20100302T010446Z
pkg://opensolaris.org/consolidation/xvm/xvm-incorporation@0.5.11,5.11-0.134:20100302T010752Z
pkg://opensolaris.org/consolidation/sfw/sfw-incorporation@0.5.11,5.11-0.134:20100302T010637Z

Package version changes:
None -> pkg://opensolaris.org/system/management/webmin@1.340,5.11-0.134:20100302T064827Z

Actuators:
restart_fmri: svc:/system/manifest-import:default
reboot-needed: false

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1 15924/15924    16.3/16.3 

PHASE                                        ACTIONS
インストールフェイズ          17573/17573 


■ インストール後のいくつかの設定手順について:

1. Run the setup utility:

端末を開いて、以下のコマンドを与えて "セットアップユーティリティ" を起動する。
ウエブサーバーポートはデフォルト値:10000 として受諾する。
It only requested one input, web server port, and I just accepted the default of 10000:

$ pfexec /usr/sfw/lib/webmin/setup.sh

セットアップユーティリティ起動後のスクリプト:ウエブサーバーポートをデフォルト値 10000 で受諾すると、ログインユーザとパスワードを入力する間もなく進捗してゆく。

***********************************************************************
*            Welcome to the Webmin setup script, version 1.340        *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.

Installing Webmin in /usr/sfw/lib/webmin ... # Webmin のインストールディレクトリ

***********************************************************************
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.

# Webmin の設定ファイルの置かれるディレクトリと ログファイルの置かれるディレクトリ: 

Config file directory [/etc/webmin]: Log file directory [/var/webmin]: 

***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.

Testing Perl ...
Perl seems to be installed ok

***********************************************************************
Operating system name:    Sun Solaris
Operating system version: 11

***********************************************************************
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): # ウェブサーバーのポートはデフォルト値 10000 でOK.

# ログイン名とログインパスワードを入力する間がない。
Login name (default admin): Login password: ************************
Creating web server config files..
..done

Creating access control file..
..done

Creating start and stop scripts..
..done

Copying config files..

..done

Changing ownership and permissions ..
..done

Running postinstall scripts ..
..done

Attempting to start Webmin mini web server..
..done

***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to

  http://localhost:10000/

and login with the user name and password you entered previously.


セットアップスクリプトの最後の文節にはちょっと困惑する。というのは、ユーザ名とパスワードを入力する暇がないのだ。
The last sentence of the setup script is a bit confusing, because it never did give me a chance to enter a name and password.

デフォルトでは、root として webmin にログインすることになる。けれども、OpenSolaris で root は role として定義づけられているので、root でのログインは失敗する。(この件ついては RBAC の理解を参照されたい。)

By default, you would log into webmin as root, however, since root is only defined as a role in OpenSolaris (see Understanding RBAC for more on this), this fails to work.
This is logged as bug 6780916 - No access to Webmin once IPS package installed in OpenSolaris 2008.05 or 2008.11 due to RBAC.

1-1. workaround:

幸いにも、簡便な回避策がある。
/etc/webmin/niniserv.users を編集して、ユーザID を付け加えるとよい。
Fortunately, there's an easy workaround. Edit /etc/webmin/miniserv.users and add your user id.

たとえば、以下のようにして、
For example, my file now looks like:

baian@satellite:~$ pfexec vi /etc/webmin/minuserv.users
______________________
    root:x:0
    baian:x:101
-----------------------

1-2. Change root to your user id.

root を ユーザID に変更する。

すなわち、 /etc/webmin/webmin.acl を編集するとよい。
Then edit /etc/webmin/webmin.acl.

ここには、root ユーザがアクセスする全てのモジュールを含むシングル(ロング)エントリーが存在する。
It has a single (long) entry containing all the modules to which the root user has access.

For example: 例として

baian@satellite:~$ pfexec vi /etc/webmin/webmin.acl


root: acl adsl-client apache at backup-config bandwidth bind8 bsdexports burner
↓ 
* change root to my user id.
↓
baian: 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 dnsadmin dovecot exports fdisk fetchmail file filter firewall format frox fsdump grub heartbeat hpuxexports htaccess-htpasswd idmapd inetd init inittab ipfilter ipfw ipsec jabber krb5 ldap-client lilo lpadmin lvm mailboxes mailcap majordomo man mon mount mysql net nis openslp pam  passwd phpini postfix postgresql ppp-client pptp-client pptp-server procmail proc proftpd pserver qmailadmin quota raid rbac samba sarg sendmail sentry servers sgiexports shell shorewall smart-status smf software spam squid sshd status stunnel syslog syslog-ng telnet time tunnel updown useradmin usermin vgetty webalizer webminlog webmin wuftpd xinetd zones


1-3. Next, restart the service to pick up the changes:
次に、変更を確定させるために SMF で webmin サービスを再起動する。

baian@satellite:~$ pfexec svcadm restart webmin
baian@satellite:~$ svcs -v webmin
STATE          NSTATE        STIME    CTID   FMRI
online         -             16:03:34    117 svc:/application/management/webmin:default

1-4. Firefox Web Browser を起動して、Webmin にアクセス。
アドレスに http://localhost:10000/ を入力して、OpenSolaris にログインするときと同じユーザ名とパスワードで Webmin にログインする。

Then browse to http://localhost:10000 and log in using the same user name and password that you use the log into OpenSolaris.

もちろん、リモートでシステムを管理する必要がある場合など、ホストの IP アドレスやホスト名を使ってもよい。
Of course you could also use the IP address or host name, which you would need anyhow to administer your system remotely.

Fig-02: Webmin login using user name and password
Fig-03: Webmin 1.304 ScreenShot / default Lang and Theme
Fig-04: Webmin 1.304 ScreenShot change Lang and Theme

※ 注記: リモートアクセスの場合には、SSLログインが望ましい。(要・openssl のインストールと Webmin での設定)


baian@satellite:~$ pkg info openssl
          名前: library/security/openssl
          概要: OpenSSL - a Toolkit for Secure Sockets Layer (SSL v2/v3) and Transport Layer (TLS v1) protocols and general purpose cryptographic library
          説明: OpenSSL is a full-featured toolkit implementing the Secure
                  Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
                  v1) protocols as well as a full-strength general purpose
                  cryptography library.
      カテゴリ: System/Security
          状態: インストール済み
        発行元: opensolaris.org
    バージョン: 0.9.8.12
ビルドリリース: 5.11
          分岐: 0.134
パッケージ化の日付: 2010年03月02日 04時12分09秒
        サイズ: 9.75 MB
          FMRI: pkg://opensolaris.org/library/security/openssl@0.9.8.12,5.11-0.134:20100302T041209Z


Fig-05: Webmin 1.304 ScreenShot SSL Settings
Webminの画面を表示するには、Webブラウザを起動して、設定を行うPCのポート10000にSSLでアクセスする。

  https://localhost:10000   ローカルからアクセスする場合
  https://hostname:10000   ホスト名を入力してアクセスする場合
  https://192.168.0.2:10000   IPアドレスを入力してアクセスする場合
References:

  • Webmin 1.510 版がリリースされ、ダウンロード可能です。更新日:2010.3.10)