Vimからnautilusを使う
nautilusっていうのは、WindowsでいうところのLinux版ファイルエクスプローラーで、よく下記のように使います。
$ nautilus ~/デスクトップ
こうするとデスクトップディレクトリのファイルエクスプローラが開けるし、
$ nautilus .
ってやるとカレントディレクトリのファイルエクスプローラが開けます。
まあ、これをVimからやろうというわけです。
Vimでは:!dateみたいな感じでコマンドラインモードに!(エクスクラメーション)をつけるとLinuxのコマンドが使えたりします。
でも普通にやると、
:!nautilus .
ってな感じで「続けるにはEnterを押すかコマンドを入力してください」っていうメッセージが出て、ウザかったりします。
ということで、.vimrcに
function! Nautilus() let current_dir = expand('%:p:h') exec 'silent !nautilus ' . current_dir endfunction command! -nargs=0 Nautilus call Nautilus()
って書いておくと
:Nautilus
って感じで、コマンドラインモードより打つと、上記のようなメッセージも出ずに普通にファイルエクスプローラが開けます。
最近やっとvimスクリプトがちょっと書けるようになった。。。
Sticky Shiftを使う
Vim-users.jpでSticky Shiftというのが紹介されていたので、Linux版窓使いの憂鬱でそれを実現してみました。
Sticky Shiftとは、http://homepage1.nifty.com/blankspace/emacs/sticky.html にあるような感じで、結果としてShiftの代わりに;(セミコロン)を使おうというものらしいです。
まあ確かに、VimmerはCtrlを使う機会は少ないとはいえ、やはりShiftキーを押す機会は結構あるわけで、FP(フィンガーポイント)は結構消耗が激しかったりするわけです。
窓使いの憂鬱設定
詳しくは昔のエントリを見てもらえればいいんですが、窓使いの憂鬱は$HOME/.mayuというファイルに設定を書きます。
以下がSticky Shiftの設定です。
include "109.mayu" keymap Global mod mod0 += !!Semicolon key M0-A = S-A key M0-B = S-B key M0-C = S-C key M0-D = S-D key M0-E = S-E key M0-F = S-F key M0-G = S-G key M0-H = S-H key M0-I = S-I key M0-J = S-J key M0-K = S-K key M0-L = S-L key M0-M = S-M key M0-N = S-N key M0-O = S-O key M0-P = S-P key M0-Q = S-Q key M0-R = S-R key M0-S = S-S key M0-T = S-T key M0-U = S-U key M0-V = S-V key M0-W = S-W key M0-X = S-X key M0-Y = S-Y key M0-Z = S-Z
詳しくは本家の窓使いの憂鬱のマニュアルを見てもらえればわかるかと思いますが、
mod :モディファイヤの指定
mod0 〜 mod9 :窓使いの憂鬱でのみ有効な特殊なモディファイヤ
!! :One Shot モディファイヤ (SandS)
key M0-A = S-A:mod0モディファイヤと同時にaを押すと、Shift+a
という感じです。
窓使いの憂鬱自体はすごく汎用性の高いソフトですので、カスタマイズはし放題ですが、あまり依存しすぎるとよくないのが玉に傷ですね。。。
AmaterasUMLをEclipseに入れる
Seasar2のソースコードを読んでると、もう何が何だかわからんくなってきたので、練習がてらクラス図を書いてみようと思い立ち、Eclipseのプラグインで何かいいのないかなーと探したらAmaterasUMLというのがありました。
AmaterasUML
http://amateras.sourceforge.jp/cgi-bin/fswiki/wiki.cgi?page=AmaterasUML
上記にあるようにzipファイルをダウンロードして、$ECLIPSE_HOME/dropinフォルダに入れるだけ。(Ganymede使ってるので)
なお、動作にはGEFも必要になります。
と書いてありますが、GEFはGanymedeの場合必要ありませんでした。(最初から入ってる??)
ちょっと使った感じではいい感じです。
@ITでも使い方が紹介されているので、ちょこちょこ使ってこうと思います。
Mayaaプロジェクトの作成
Mayaa + SAStrutsのEclipseプロジェクト作成メモ.
Mavenを使用する
SAStrutsのアーキタイプ作成
mvn archetype:generate -DarchetypeRepository=https://www.seasar.org/maven/maven2 \ -DarchetypeGroupId=org.seasar.sastruts \ -DarchetypeArtifactId=sa-struts-archetype -DarchetypeVersion=1.0.4-sp5.0 \ -DgroupId=com.example -DartifactId=mayaa_project -Dversion=0.0.1
pom.xmlにMayaaを追加
<dependency> <groupId>org.seasar.mayaa</groupId> <artifactId>mayaa</artifactId> <version>1.1.26</version> </dependency>
Eclipseプロジェクト作成
mvn eclipse:eclipse -DdownloadSources=true -Dwtpversion=1.5
WTPで使えるサーバーを追加
すでに追加してある場合は追加する必要無し
Window > Preferences > Server > Runtime Environment > Add > Apache > Apache Tomcat v6.0
TomcatプロジェクトとTomcat Libraryの追加
プロジェクトを右クリック > properties > Tomcat > Tomcatプロジェクト プロジェクトを右クリック > properties > Java Build Path > Add Librariy... > Server Runtime > Apache Tomcat v6.0 プロジェクトを右クリック > Tomcatプロジェクト > コンテキスト定義を更新
web.xmlにMayaaのサーブレット追加
<servlet> <servlet-name>MayaaServlet</servlet-name> <servlet-class>org.seasar.mayaa.impl.MayaaServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>MayaaServlet</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping>
Server作成
Serversビューを表示後、Serverを作成
Window > Show View > Other... > Server > Servers Serversで右クリック > New > Server > Server Nameを変更 > Available projectからAdd > Finish
vimの補完をzshみたいにする
vimの補完とは行ってもctagsとかの補完じゃなくて、:e とかでファイルを開くときのコマンドラインモードのファイル補完です。
まあ、現状のままでも便利だとは思うんですが、ファイル名を一覧表示してれないので見にくかったりします。(set wildmenu の状態)
あのグルグル回るやつは、探しているファイルがなかなか出てこなかったりするとイライラするので。笑
そこで、ココによると、
set wildmode=list:longest
これで補完候補が一覧表示されて、いい感じになります。
でもファイル名がユニークになるまで文字列を打ちつづけなければ、最終的なファイル名までの補完が効きません。
ということで、それすら面倒くさいので、:h wildmodeを見ると
Examples: :set wildmode=full Complete first full match, next match, etc. (the default) :set wildmode=longest,full Complete longest common string, then each full match :set wildmode=list:full List all matches and complete each full match :set wildmode=list,full List all matches without completing, then each full match :set wildmode=longest,list Complete longest common string, then list alternatives.
ってな感じで例が載ってます。
色々試した結果、下記が一番求めていた結果でした。
set wildmode=list,full
- 補完候補を一覧で出力
- :e
で一表示 - :e
で完全補完モードに入る
「:」と「,」の実際の意味するところの違いがよくわからなかったのですが、
set wildmode=list:full
- 補完候補を一覧で出力
- :e
で完全補完モードに入る
ということで、上記設定例で言うと、:e
個人的には前者の方がありがたいので、前者を使うことにしました。
これは確かに久々ヒットです。
Servletを作る
Eclipseインストールとか
- Tomcat6
- http://tomcat.apache.org/
- $HOME/とかに展開するだけでOK
- Eclipse3.4
- Tomcatプラグイン
Eclipse設定
プロジェクト作成
プログラム
WEB-INF/src/Hello.java
いや、動かしてないですけどね、、、さすがに動くはず。笑
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class Hello extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse responce) throws ServletException, IOException { responce.getWriter().println("hello"); } }
注意事項
invokerサーブレット
<servlet> <servlet-name>invoker</servlet-name> <servlet-class> org.apache.catalina.servlets.InvokerServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> ... <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping> ...
- んでもってTomcat6の場合は、Tomcat起動時に下記エラーが出るので
致命的: 設定記述子 .xml を配備中のエラーです java.lang.SecurityException: クラス org.apache.catalina.servlets.InvokerServlet のサーブレットは特権を与えられているので、このWebアプリケーションによってロードできません at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1145) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:619)
$TOMCAT_HOME/conf/context.xmlを編集して、Contextにprivileged="true"を追加
<Context privileged="true">
日本語を表示させる
conf/server.xmlのConnectorに下記を追加します。
<Connector port="8080" ... UseBodyEncodingForURI="true" URIEncoding="UTF-8" />
http://tomcat.apache.org/tomcat-6.0-doc/config/http.htmlより。英訳は適当ですので、ぜひ原本を見てください。
- URIEncoding
- UseBodyEncodingForURI
Trueを指定すると、GETパラメータ使用時、URIEncodingの代わりにcontentTypeで指定した文字エンコーディングが使用されます。
Tomcat 4.1.xの互換設定で、contentTypeや明示的にRequest.setCharacterEncodingが指定された時にURLのGETパラメータに使用されます。デフォルトはfalse。
URIEncodingを指定しておけば、その指定も文字コード以外はRequest.setCharacterEncodingで指定しても反映されないようなので、やはりUseBodyEncodingForURIも指定する必要があるのかもしれません。
が、詳しくはよくわかりませんでした。
サーブレットAPIのソースを見る
http://tomcat.apache.org/download-60.cgiより、Source Code Distributions > zipファイルのダウンロード。
その後、ダウンロードしたファイルを$TOMCAT_HOME/に移動させ、Eclipseから宣言ジャンプ時に「Atatch Source」を押下し、先ほどのzipファイルを指定する。
Ubuntu8.10にVMware2.0を入れる
インストール
VMWareのサイトよりLinux版tarファイルを取得後、解凍してインストールスクリプトを流します。
すでにVMware1系がインストールされた状態でも問題無し。
$ tar zxvf VMware-server-2.0.0-122956.i386.tar.gz $ cd vmware-server-distrib $ sudo ./vmware-install.pl Creating a new VMware Server installer database using the tar4 format. Installing VMware Server. In which directory do you want to install the binary files? [/usr/bin] What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc] What is the directory that contains the init scripts? [/etc/init.d] In which directory do you want to install the daemon files? [/usr/sbin] In which directory do you want to install the library files? [/usr/lib/vmware] The path "/usr/lib/vmware" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] In which directory do you want to install the manual files? [/usr/share/man] In which directory do you want to install the documentation files? [/usr/share/doc/vmware] The path "/usr/share/doc/vmware" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] The installation of VMware Server 2.0.0 build-122956 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall.pl". Before running VMware Server for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config.pl". Do you want this program to invoke the command for you now? [yes] Making sure services for VMware Server are stopped. Stopping VMware autostart virtual machines: Virtual machines failed <- 問題無し Stopping VMware management services: VMware Virtual Infrastructure Web Access VMware Server Host Agent failed <- 問題無し Stopping VMware services: VMware Authentication Daemon done Virtual machine monitor done You must read and accept the End User License Agreement to continue. Press enter to display it.
ここで契約に同意するかを聞かれるのでyes
Do you accept? (yes/no) yes Thank you. None of the pre-built vmmon modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes] Using compiler "/usr/bin/gcc". Use environment variable CC to override. What is the location of the directory of C header files that match your running kernel? [/lib/modules/2.6.27-7-generic/build/include] Extracting the sources of the vmmon module. Building the vmmon module. Using 2.6.x kernel build system. make: ディレクトリ `/tmp/vmware-config0/vmmon-only' に入ります make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: ディレクトリ `/usr/src/linux-headers-2.6.27-7-generic' に入ります CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o CC [M] /tmp/vmware-config0/vmmon-only/linux/driverLog.o CC [M] /tmp/vmware-config0/vmmon-only/linux/hostif.o CC [M] /tmp/vmware-config0/vmmon-only/common/comport.o CC [M] /tmp/vmware-config0/vmmon-only/common/cpuid.o CC [M] /tmp/vmware-config0/vmmon-only/common/hashFunc.o CC [M] /tmp/vmware-config0/vmmon-only/common/memtrack.o CC [M] /tmp/vmware-config0/vmmon-only/common/phystrack.o CC [M] /tmp/vmware-config0/vmmon-only/common/task.o CC [M] /tmp/vmware-config0/vmmon-only/common/vmx86.o CC [M] /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o LD [M] /tmp/vmware-config0/vmmon-only/vmmon.o Building modules, stage 2. MODPOST 1 modules CC /tmp/vmware-config0/vmmon-only/vmmon.mod.o LD [M] /tmp/vmware-config0/vmmon-only/vmmon.ko make[1]: ディレクトリ `/usr/src/linux-headers-2.6.27-7-generic' から出ます cp -f vmmon.ko ./../vmmon.o make: ディレクトリ `/tmp/vmware-config0/vmmon-only' から出ます The vmmon module loads perfectly into the running kernel. None of the pre-built vmci modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmci module for your system (you need to have a C compiler installed on your system)? [yes] Extracting the sources of the vmci module. Building the vmci module. Using 2.6.x kernel build system. make: ディレクトリ `/tmp/vmware-config0/vmci-only' に入ります make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: ディレクトリ `/usr/src/linux-headers-2.6.27-7-generic' に入ります CC [M] /tmp/vmware-config0/vmci-only/linux/driver.o CC [M] /tmp/vmware-config0/vmci-only/linux/driverLog.o CC [M] /tmp/vmware-config0/vmci-only/linux/vmciKernelIf.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciContext.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciDatagram.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciDriver.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciDs.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciEvent.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciGroup.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciHashtable.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciProcess.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciQueuePair.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciResource.o LD [M] /tmp/vmware-config0/vmci-only/vmci.o Building modules, stage 2. MODPOST 1 modules CC /tmp/vmware-config0/vmci-only/vmci.mod.o LD [M] /tmp/vmware-config0/vmci-only/vmci.ko make[1]: ディレクトリ `/usr/src/linux-headers-2.6.27-7-generic' から出ます cp -f vmci.ko ./../vmci.o make: ディレクトリ `/tmp/vmware-config0/vmci-only' から出ます The vmci module loads perfectly into the running kernel. None of the pre-built vsock modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vsock module for your system (you need to have a C compiler installed on your system)? [yes] Extracting the sources of the vsock module. Building the vsock module. Using 2.6.x kernel build system. make: ディレクトリ `/tmp/vmware-config0/vsock-only' に入ります make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: ディレクトリ `/usr/src/linux-headers-2.6.27-7-generic' に入ります CC [M] /tmp/vmware-config0/vsock-only/linux/af_vsock.o CC [M] /tmp/vmware-config0/vsock-only/linux/driverLog.o CC [M] /tmp/vmware-config0/vsock-only/linux/util.o /tmp/vmware-config0/vsock-only/linux/util.c: In function ‘VSockVmciLogPkt’: /tmp/vmware-config0/vsock-only/linux/util.c:157: 警告: フォーマットは非文字列リテラルで、且つフォーマット引数を持ちません CC [M] /tmp/vmware-config0/vsock-only/linux/vsockAddr.o LD [M] /tmp/vmware-config0/vsock-only/vsock.o Building modules, stage 2. MODPOST 1 modules WARNING: "VMCIDatagram_CreateHnd" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined! WARNING: "VMCIDatagram_DestroyHnd" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined! WARNING: "VMCI_GetContextID" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined! WARNING: "VMCIDatagram_Send" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined! CC /tmp/vmware-config0/vsock-only/vsock.mod.o LD [M] /tmp/vmware-config0/vsock-only/vsock.ko make[1]: ディレクトリ `/usr/src/linux-headers-2.6.27-7-generic' から出ます cp -f vsock.ko ./../vsock.o make: ディレクトリ `/tmp/vmware-config0/vsock-only' から出ます Unable to make a vsock module that can be loaded in the running kernel: insmod: error inserting '/tmp/vmware-config0/vsock.o': -1 Unknown symbol in module There is probably a slight difference in the kernel configuration between the set of C header files you specified and your running kernel. You may want to rebuild a kernel based on that directory, or specify another directory. The VM communication interface socket family is used in conjunction with the VM communication interface to provide a new communication path among guests and host. The rest of this software provided by VMware Server is designed to work independently of this feature. If you wish to have the VSOCK feature you can install the driver by running vmware-config.pl again after making sure that gcc, binutils, make and the kernel sources for your running kernel are installed on your machine. These packages are available on your distribution's installation CD. [ Press the Enter key to continue.] Do you want networking for your virtual machines? (yes/no/help) [yes] Configuring a bridged network for vmnet0. Please specify a name for this network. [Bridged] Your computer has multiple ethernet network interfaces available: eth0, pan0. Which one do you want to bridge to vmnet0? [eth0] The following bridged networks have been defined: . vmnet0 is bridged to eth0 Do you wish to configure another bridged network? (yes/no) [no] Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes] Configuring a NAT network for vmnet8. Please specify a name for this network. [NAT] Do you want this program to probe for an unused private subnet? (yes/no/help) [yes] Probing for an unused private subnet (this can take some time)... The subnet 172.16.227.0/255.255.255.0 appears to be unused. The following NAT networks have been defined: . vmnet8 is a NAT network on private subnet 172.16.227.0. Do you wish to configure another NAT network? (yes/no) [no] Do you want to be able to use host-only networking in your virtual machines? [yes] Configuring a host-only network for vmnet1. Please specify a name for this network. [HostOnly] Do you want this program to probe for an unused private subnet? (yes/no/help) [yes] Probing for an unused private subnet (this can take some time)... The subnet 192.168.160.0/255.255.255.0 appears to be unused. The following host-only networks have been defined: . vmnet1 is a host-only network on private subnet 192.168.160.0. Do you wish to configure another host-only network? (yes/no) [no] None of the pre-built vmnet modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmnet module for your system (you need to have a C compiler installed on your system)? [yes] Extracting the sources of the vmnet module. Building the vmnet module. Using 2.6.x kernel build system. make: ディレクトリ `/tmp/vmware-config1/vmnet-only' に入ります make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: ディレクトリ `/usr/src/linux-headers-2.6.27-7-generic' に入ります CC [M] /tmp/vmware-config1/vmnet-only/driver.o CC [M] /tmp/vmware-config1/vmnet-only/hub.o CC [M] /tmp/vmware-config1/vmnet-only/userif.o CC [M] /tmp/vmware-config1/vmnet-only/netif.o CC [M] /tmp/vmware-config1/vmnet-only/bridge.o CC [M] /tmp/vmware-config1/vmnet-only/filter.o CC [M] /tmp/vmware-config1/vmnet-only/procfs.o CC [M] /tmp/vmware-config1/vmnet-only/smac_compat.o CC [M] /tmp/vmware-config1/vmnet-only/smac.o CC [M] /tmp/vmware-config1/vmnet-only/vnetEvent.o CC [M] /tmp/vmware-config1/vmnet-only/vnetUserListener.o LD [M] /tmp/vmware-config1/vmnet-only/vmnet.o Building modules, stage 2. MODPOST 1 modules CC /tmp/vmware-config1/vmnet-only/vmnet.mod.o LD [M] /tmp/vmware-config1/vmnet-only/vmnet.ko make[1]: ディレクトリ `/usr/src/linux-headers-2.6.27-7-generic' から出ます cp -f vmnet.ko ./../vmnet.o make: ディレクトリ `/tmp/vmware-config1/vmnet-only' から出ます The vmnet module loads perfectly into the running kernel. Please specify a port for remote connections to use [902] Please specify a port for standard http connections to use [8222] Please specify a port for secure http (https) connections to use [8333] The current administrative user for VMware Server is ''. Would you like to specify a different administrator? [no] yes
この次の質問で、VMwareの管理権限ユーザを指定する質問があるので、指定すること
Please specify the user whom you wish to be the VMware Server administrator hogehoge Using hogehoge as the VMware Server administrator. In which directory do you want to keep your virtual machine files? [/var/lib/vmware/Virtual Machines] The path "/var/lib/vmware/Virtual Machines" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] Please enter your 20-character serial number. Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel: XXXXX-XXXXX-XXXXX-XXXXX <- VMWareのシリアルキーを入力 Creating a new VMware VIX API installer database using the tar4 format. Installing VMware VIX API. In which directory do you want to install the VMware VIX API binary files? [/usr/bin] In which directory do you want to install the VMware VIX API library files? [/usr/lib/vmware-vix/lib] The path "/usr/lib/vmware-vix/lib" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] In which directory do you want to install the VMware VIX API document pages? [/usr/share/doc/vmware-vix] The path "/usr/share/doc/vmware-vix" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] The installation of VMware VIX API 1.6.0 build-122956 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-vix.pl". Enjoy, --the VMware team Starting VMware services: Virtual machine monitor done Virtual machine communication interface done Virtual ethernet done Bridged networking on /dev/vmnet0 done Host-only networking on /dev/vmnet1 (background) done DHCP server on /dev/vmnet1 done Host-only networking on /dev/vmnet8 (background) done DHCP server on /dev/vmnet8 done NAT service on /dev/vmnet8 done VMware Server Authentication Daemon (background) done Shared Memory Available done Starting VMware management services: VMware Server Host Agent (background) done VMware Virtual Infrastructure Web Access Starting VMware autostart virtual machines: Virtual machines done The configuration of VMware Server 2.0.0 build-122956 for Linux for this running kernel completed successfully.
VMware管理画面
https://localhost:8333/ から指定した管理者権限ユーザでログイン
信用できない証明書ですとか言われるので、例外に追加する。
ゲストOSインストール
今回はWindows Vistaをインストール
Name And Location
ゲストOSの名前を入力、今回は「Windows Vista」とかにしときました。
Guest Operating System
Windows Vista 32bitを選択
Properties
- File Options
- Allocate all disk space now
予め指定したHDスペースを割り当てます。
これにチェックを入れないと、HD領域を使用する度にディスクスペースを割り当てる作業が発生するため、ディスクアクセスが遅くなります。
- Disk Mode
- Independent
VMware Consolidated Backup(VCB)のバックアップ対象としない場合はチェック。このモードにした場合VCBのバックアップ対象とすることができず、スナップショット機能も無効になりますが、ディスクのアクセススピードが速くなります。
-
- Persistent
変更が合った場合その場でデータを書き込みます
Properties
- Network Connection
- Bridged ゲストOSにIPを別に割り当てる
- Host only ホストOSとのみ通信を許可する
- NAT NAT接続
普通はBridgedを選択するべきところですが、今回は外に出る機会もないのでHost Only。
ちなみに、Host Onlyはネット使えないので注意。
Floppy Dirve
フロッピーは使わないので、Don't Add a Floppy Drive。
Floppy Diskにしろ、USBにしろWindowsで使う予定のないデバイスはOFFにしておくことがVMwareの高速化につながるようです。
Ready to Complete
Finishを押すと、Hard DiskのPropertiesですぐにHD領域を割り当てるオプションをつけたので、HDが割り当てられます。
これが結構時間かかります。
CDよりインストール
左ナビにWindows Vistaってのができてると思うので、CDドライブにインストールCDを入れて、三角の再生ボタンみたいなのを押す。
すると、
というエラーが出ますので、プラグインをインストールします。
その後、Windowsをインストール
VMware Tools
このままだとカーソルの動きとかがめっちゃもっさいと思うので、VMware Toolsをインストールします。
Windows Vistaを選択すると、右のナビのStatus > VMware Tools というのがあるので、WindowsゲストOSを起動した状態で、Installを押します。
その後、ゲストOSのWindows Vistaでマイコンピュータ > CDドライブ にVMware ToolsというCDが入った状態になるので、CDドライブをダブルクリックしてVMware Toolsをインストール
VMware2.0
VMware1系より評判の悪いVMware2系でしたが、今のところ何不自由ないですね。
VMwareが遅いといわれる所以は、やっぱりディスクのI/Oに依るところが大きいらしく、今回の設定だとデフォルトよりは幾分速くなっているのではないかと思いますが、色々試していこうかと思ったり、思わなかったり。