ラベル ubuntu の投稿を表示しています。 すべての投稿を表示
ラベル ubuntu の投稿を表示しています。 すべての投稿を表示

2009年5月31日日曜日

Ubuntu 9.04 に VMware Server 2.0.1をインストールする。

メインのPCをUbuntuにしたので、仕事用にWindowsが必要なので、VMware server 2.0.1をインストールしてみた。
結果からいうと、結構面倒だった。VMware Serverって2.0はウェブ上のインストール記録を見ればOKだったが。。。
  1. 前準備
  2. ヴイエムウェア株式会社のホームページにある、「Download VMware Server - Registration」にてシリアル番号を入手します。
    資産のダウンロードを行います。ダウンロードするのは、「VMware Server for Linux」の「Binary (.tar.gz)」です。
  3. 開発ツールの入手
    sudo aptitude install build-essential linux-kernel-devel linux-headers-generic xinetd

  4. VMware Serverのインストール
    cd vmware-server-distrib
    sudo ./vmware-install.pl
    とりあえず、デフォルトでインストールした。
  5. 実行結果
    The configuration of VMware Server 2.0.1 build-156745 for Linux for this
    running kernel completed successfully.
    と表示されたのでOK?
  6. ログインして見る。
    ブラウザ上で、「http://localhost:8222」のアドレスを表示してログインした。
    ユーザ名:現在使用しているユーザ名
    パスワード:そのパスワード

    ん!「You do not have permissions to login to the server.」というメッセージが。。。
  7. VMware/Server - Community Ubuntu Documentationに回答があった。
    一旦、アンインストールを行う。
    cd vmware-server-distrib/bin
    sudo ./vmware-uninstall.pl
    sudo apt-get install linux-headers-`uname -r`

  8. http://ubuntuforums.org/attachment.php?attachmentid=94477&d=1227872015からパッチを取得する。※ファイルのダウンロードには、「ubuntuforums.org」への登録が必要です。
  9. vmware-config.pl.patch.txt をホームディレクトリに保存する。
    cd vmware-server-distrib
    sudo patch ./bin/vmware-config.pl ~/vmware-config.pl.patch.txt
  10. インストールの再実行
    sudo ./vmware-install.pl
  11. 今度はどうだ。

    大丈夫

2009年5月13日水曜日

ubuntu 9.04 に Berkeley DB XML をインストールする

Berkeley DB XML は組み込み型のXMLデータベースです。XQuery で検索が出きるとのことなので使ってみる。今日の目標はインストールまで。

ドキュメント関係はここからダウンロードする。日本語のドキュメント無いかな?
あった。Berkeley DB XML関係 に日本語訳があった。

インストール
ダウンロードサイトから最新版をダウンロードする。ダウンロードしたファイルは dbxml-2.4.16.tar.gz

$ tar zxvf dbxml-2.4.16.tar.gz
$ cd dbxml-2.4.16/
$ ./buildall.sh
Start DB build: 2009年 5月 13日 水曜日 22:37:56 JST
Configuring Berkeley DB
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking if building in the top-level or dist directories... no
checking if --disable-cryptography option specified... no
checking if --disable-hash option specified... no
checking if --disable-mutexsupport option specified... no
checking if --disable-queue option specified... no
checking if --disable-replication option specified... no
checking if --disable-statistics option specified... no
checking if --disable-verify option specified... no
checking if --enable-compat185 option specified... no
checking if --enable-cxx option specified... yes
checking if --enable-debug option specified... no
checking if --enable-debug_rop option specified... no
checking if --enable-debug_wop option specified... no
checking if --enable-diagnostic option specified... no
checking if --enable-dump185 option specified... no
checking if --enable-java option specified... no
checking if --enable-mingw option specified... no
checking if --enable-fine_grained_lock_manager option specified... no
checking if --enable-o_direct option specified... no
checking if --enable-posixmutexes option specified... no
checking if --enable-pthread_api option specified... no
checking if --enable-rpc option specified... no
checking if --enable-smallbuild option specified... no
checking if --enable-tcl option specified... no
checking if --enable-test option specified... no
checking if --enable-uimutexes option specified... no
checking if --enable-umrw option specified... no
checking if --with-mutex=MUTEX option specified... no
checking if --with-tcl=DIR option specified... no
checking if --with-uniquename=NAME option specified... no
checking for chmod... chmod
checking for cp... cp
checking for ln... ln
checking for mkdir... mkdir
checking for rm... rm
checking for sh... /bin/sh
checking for a BSD-compatible install... /usr/bin/install -c
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.


GNU C++のコンパイラと g++ が無いと怒られる。
$ sudo apt-get install gcc g++


インストール先を /opt/oracle/dbxml-2.4.16 にして、Javaを使用可能にし、インストールを実行する。
$ sudo ./buildall.sh --prefix=/opt/oracle/dbxml-2.4.16 --enable-java --enable-debug


インストールが無事済んだようなので、コマンドラインのdbxmlを使えるようにする。
$ vi ~/.bashrc

以下のPATHを追加し、保存。
DBXML_HOME=/opt/oracle/dbxml-2.4.16
LD_LIBRARY_PATH=$DBXML_HOME/lib
LD_RUN_PATH=$DBXML_HOME/lib
PATH="$PATH":$DBXML_HOME/bin

設定を有効にする。
$ source ~/.bashrc

DBXMLコマンドを実行してみる。
$ dbxml
dbxml>

を!動いた。
では、「qune: Berkeley DB XML で NXD みたいなことをしてみる」に掲載されていたサンプルを実行してみる。
dbxml> createContainer sample.xmldb
Creating node storage container

dbxml> addDocument doc1 '<?xml version="1.0"?><foo>bar</foo>'
Document added, name = doc1

dbxml> getMetaData doc1
Metadata for document: doc1
http://www.sleepycat.com/2002/dbxml:name

dbxml> addDocument doc2 '<?xml version="1.0"?><foo>Hello,World!</foo>'
Document added, name = doc2

dbxml> query 'collection("sample.xmldb")/foo'
2 objects returned for eager expression 'collection("sample.xmldb")/foo'

dbxml> print
<foo>bar</foo>
<foo>Hello,World!</foo>

今日はここまでかな〜。

2009年5月12日火曜日

NetBeans 6.5 で MySQL サーバに接続出来ない

NetBeansのインストールも終わったので、MySQL サーバへの接続を試してみます。
下図の「MySQL サーバ localhost:3306[root](接続なし)」を右クリックし、「開始」をクリックします。


MySQLサーバへの接続が出来ない旨のエラーが表示されます。



MySQL プロパティを編集」をクリックし、「管理者のパスワード」に変更したパスワードを入力します。


ん!?パスワードが入力されない??ひょっとして表示されていないだけ???
一応、「了解」ボタンをクリックし、再度サービスの開始を試みます。
ダメでした...

いろいろやって見た結果、「管理者のユーザ名」にrootが入力済みですが、その後に続けてパスワードを入力して、範囲選択して切り取ります。
次いで「管理者のパスワード」にそのまま張り付けます。
これで上手くいきました。

Ubuntu 9.04 にNetBeans 6.5 をインストールする

JDKのインストールが終わったので、開発環境のNetBeansをインストールします。
NetBeans IDE ダウンロード サイトから必要なファイルをダウンロードします。ここではJava,PHPの開発をしたいので、netbeans-6.5.1-ml-linux.sh を選択します。

  • netbeans-6.5.1-ml-linux.sh に実効権限を与えてインストールを実行します。
    $ chmod +x netbeans-6.5.1-ml-linux.sh
    $ sudo bash netbeans-6.5.1-ml-linux.sh

  • インストール先のディレクトリを /opt/sun/netbeans-6.5.1 に変更します。

  • GlassFishのインストール先のディレクトリを /opt/sun/glassfish-v2.1 に変更します。

  • GlassFish v3 Preludeのインストール先を変更します。


  • 設定が全て終了したので、インストールを開始します。

Ubuntu 9.04 にJDKをインストールする。

Ubuntu 8.04 に JDK をインストールする を参考にしてJDKをインストールします。
$ sudo apt-get install sun-java6-jdk

インストール後の確認をします。
$ java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)

日本語がきちんと表示されるか確認するためにJDKのデモをインストールします。
$ sudo apt-get install sun-java6-demo

インストール後に以下のアプリを起動させます。
$ java -jar /usr/lib/jvm/java-6-sun/demo/jfc/SwingSet2/SwingSet2.jar


日本語も問題ないようだ。

2009年5月11日月曜日

MySQLの設定

MySQLサーバのインストールは終わりましたが、最低限必要な設定を行っておきます。
(後は必要な時に考えます。)
  1. rootパスワードの設定
  2. デフォルトの文字コードの指定
    /etc/mysql/my.cnf に以下の設定を追加します。

    [client]
    default-character-set=utf8

    [mysqld]
    skip-character-set-client-handshake
    default-character-set=utf8

    [mysqldump]
    default-character-set=utf8


MySQLサーバを再起動します。

$ sudo /etc/init.d/mysql restart

設定した文字コード指定が有効になったか確認します。

mysql> status
...
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
...
とりあえず、終了。

Ubuntu 9.04 にLAMP(Apache2 + MySQL5 + PHP)を導入する。

昨日はubuntuのインストールで力尽きましたが、今日はWebサーバ環境を構築しようと思います。「[Think IT] 第4回:Ubuntuを使ったWebサーバ構築 (1/3)」に簡単に出来そうな方法が掲載されていましたので、試してみることにします。

コンソールで以下のコマンドを入力します。
$ sudo tasksel

taskselコマンドは使用目的に応じて必要なパッケージをまとめてインストールすることが出来るコマンドになるとのこと。以下のような一覧が表示されるので、「LAMP server」にチェックをスペースキーで選択し、「了解」を押します。


[ ] Basic Ubuntu server
[ ] DNS server
[ ] Edubuntu server
[ ] LAMP server
[ ] Mail server
[ ] OpenSSH server
[ ] PostgreSQL database
[*] Print server
[ ] Samba file server
[ ] Tomcat Java server
[ ] Virtual Machine host
[ ] 2D/3D creation and editing suite
[ ] Audio creation and editing suite
[ ] Edubuntu KDE desktop
[ ] Edubuntu desktop
[ ] Kubuntu desktop
[ ] LADSPA and DSSI audio plugins
[ ] Mythbuntu additional roles
[ ] Mythbuntu frontend
[ ] Mythbuntu master backend
[ ] Mythbuntu slave backend
[ ] Ubuntu MID edition
[ ] Ubuntu Netbook Remix
[*] Ubuntu desktop
[ ] Video creation and editing suite
[ ] Xubuntu desktop
[ ] Video creation and editing suite
[ ] Xubuntu desktop
[ ] Kubuntu live CD
[ ] Kubuntu live DVD
[ ] Mythbuntu live CD
[ ] Ubuntu MID live environment
[ ] Ubuntu live CD
[ ] Ubuntu live DVD
[ ] Xubuntu live CD
[ ] Manual package selection
とりあえず、これでインストールは完了です。便利になりましたね。
どのタスクを選ぶと何がインストールされるかが、今一分からないですが、以下のコマンドを実行すると簡単な説明が表示されます。

$ gedit /usr/share/tasksel/ubuntu-tasks.desc

taskselのタスク一覧を見るには以下のコマンドで閲覧できます。
$ sudo tasksel --list-tasks

u server Basic Ubuntu server
u dns-server DNS server
u edubuntu-server Edubuntu server
i lamp-server LAMP server
u mail-server Mail server
u openssh-server OpenSSH server
u postgresql-server PostgreSQL database
i print-server Print server
u samba-server Samba file server
u tomcat-server Tomcat Java server
u virt-host Virtual Machine host
u ubuntustudio-graphics 2D/3D creation and editing suite
u ubuntustudio-audio Audio creation and editing suite
u edubuntu-desktop-kde Edubuntu KDE desktop
u edubuntu-desktop-gnome Edubuntu desktop
u kubuntu-desktop Kubuntu desktop
u ubuntustudio-audio-plugins LADSPA and DSSI audio plugins
u mythbuntu-desktop Mythbuntu additional roles
u mythbuntu-frontend Mythbuntu frontend
u mythbuntu-backend-master Mythbuntu master backend
u mythbuntu-backend-slave Mythbuntu slave backend
u mobile-mid Ubuntu MID edition
u mobile-netbook-remix Ubuntu Netbook Remix
i ubuntu-desktop Ubuntu desktop
u ubuntustudio-video Video creation and editing suite
u xubuntu-desktop Xubuntu desktop
u kubuntu-live Kubuntu live CD
u kubuntu-dvd-live Kubuntu live DVD
u mythbuntu-live Mythbuntu live CD
u mobile-live Ubuntu MID live environment
u ubuntu-live Ubuntu live CD
u ubuntu-dvd-live Ubuntu live DVD
u xubuntu-live Xubuntu live CD
u manual Manual package selection


それぞれのタスクでどんなパッケージがインストールされるかはコマンドで分かります。試しにLAMP serverでインストールされるパッケージは以下になります。

$ sudo tasksel --task-packages lamp-server
mysql-server-core-5.0
libwrap0
apache2
mysql-client-5.0
tcpd
libapache2-mod-php5
apache2.2-common
apache2-utils
php5-common
libaprutil1
php5-mysql
libmysqlclient15off
libdbi-perl
libplrpc-perl
mysql-server
mysql-server-5.0
libdbd-mysql-perl
libhtml-template-perl
libnet-daemon-perl
libapr1
ssl-cert
libpq5
apache2-mpm-prefork
mysql-common

DELL INSPIRONにubuntuを入れてみる

DELLのINSPIRON 1525に初期インストールされているWindows Vistaが非常に遅いので、Linuxを導入してみた。
ubuntuはまだ使ったことがないので、今回インストールしてみた。
ubuntuのサイトから「ubuntu-ja-9.04-desktop-i386.iso」をダウンロードしてCDに焼いてまずはCDから起動させて動きを見てみる。

無線LANが認識してくれるか心配だったが、問題ないようだ。
とりあえず。今日はここまで。