Monday, September 29, 2008

國際舞台簡報七大必勝心法

*國際舞台簡報七大必勝心法

未來,所有人都有機會到國際舞台上做簡報。以下是「Demo」秀總結多年來的制勝簡報心法。

心法一:人只會記得三件新的事情。 這是經過統計的,一次簡報要試圖傳達超過三件以上事情的結果,最後是,觀眾一件都不記得。

心法二:永遠別插入與主題無關的事情。就連你公司的成立背景也不需要,他若對你有興趣,自然會來問。

心法三:主題是公司產品,不是CEO(執行長)。CEO很有權威沒錯,但不會做簡報,就別上台。

心法四:別隨便表達幽默感。除非你的笑話真的非常好笑,否則在文化隔閡下,笑話常常會不靈光。

心法五:大量練習。台上六分鐘,台下至少練習六十天。

心法六:準備出錯時的方案。人跟電腦都會出錯,一定要有Plan B(B計畫)。

心法七:祈禱。

Sunday, September 28, 2008

Install VMWare in Ubuntu 8.04

Introduction


This update has been updated to VMWare server version 1.0.6 and 2.0 RC1. Installation of VMWAre Server 2.0 RC1 is very similar to 1.0.6 (scroll down a little).

Anyone wishing to use the "old" method using the any-any-update see This thread.
Thanks ~ gtdaqua
There have been a number of threads on the forums and hopefully this (brief) how to will help make the process as easy as possible.

If you need a more detailed description please see this thread :
HowTo: Windows (XP) on Ubuntu with VMWare Server
~ Thanks Peturrr
OttifantSir has made a copy of this how-to available for download as a pdf Here.

~ Thanks
OttifantSir

VMWare Server 1.0.6

  1. If you have any problems installing 1.0.6, see the link at the bottom of this post under "trouble shooting" (or read through this thread for similar problems).
  2. Prep ~ Install the needed tools.
    Code:
    sudo apt-get install build-essential linux-headers-`uname -r` xinetd
    *64 bit users only*
    In addition install ia32-libs (ia32-libs is in universe so you may need to enable the repository) :
    Code:
    sudo apt-get install ia32-libs
  3. Download vmware server (be sure to obtain a serial number) Place in an instalation directory ( I use ~/src/VMWare).

    Code:
    mkdir -p ~/src/VMWare #Download VMWare files here
  4. Extract and uinstall VMWare Server.
    Code:
    cd ~/src/VMWare
    tar xzf VMware-server-1.0.6-91891.tar.gz

    cd ~/src/VMWare/vmware-server-distrib
    sudo ./vmware-install.pl
    Select defaults.

    Enter your serial # during the installation.
  5. Post-install configuration. Last, before running vmware :
    Code:
    sudo cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1
    sudo cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0
  6. In addition, for *64 bit users only*.
    Code:
    sudo ln -s /usr/lib32 /usr/l32
    sudo sed -i -e 's:usr/lib/:usr/l32/:g' /usr/lib32/gtk-2.0/2.10.0/loader-files.d/libgtk2.0-0.loaders
    sudo sed -i -e 's:usr/lib/:usr/l32/:g' /usr/lib32/libgdk_pixbuf-2.0.so.0.1200.9
    ~ Thanks fjgaude and Kokopelli for the 64 bit information.

That is all there is to it. VMWare should now be up and running.


VMWare Server 2.0 RC1

Warning : I find VMWare Server 2.0 RC1 to be buggy, more then I would expect for a RC.

Advantages of Server 2.0
  • Web interface ~ this is a double edged sword. I would assume it may conflict with apache or lighttpd. It adds the convenience of remote admin over a web interface, but there is then a security risk.
  • The web interface is a change, but I think I like it.
  • It is easier to install.


Limitations:
  • The web interface is new, and takes some adjustment.
  • Connecting to the web interface and allowing an exception for ssl and a plugin for firefox was a little strange.
  • I could not give my virtual machines more then 2 CPU.
  • Although I installed the 64 bit edition on a 64 bit system / cpu, and despite VMWare claiming support for 64 bit virtual machines, I could only emulate 32 bit guests.
  • You can NOT run VMWare and KVM (and likely Xen) at the same time. VMWare will install, but virtual machines will not start. I had to disable KVM in my BIOS to enable VMWare.
  • Security. VMWare server 2.0 installs a web server and uses ports 80 and 443 by default. I would advise you change these ports, especially if you are already running a web server. I would firewall the non-ssl connection (port 80 by default) to ALL remote connections. I would limit the connections to the ssl port (443 by default) as much as possible, or even tunnel over ssh.
  1. Download VMWare Server 2.0 from here :
    http://www.vmware.com/beta/server/index.html
    Download BothVMware-server-2.0.0-101586.x86_64.tar.gz and VMware-vix-e.x.p-101586.x86_64.tar.gz (if you desire vix).

    Again, I saved it in ~/src/VMWare

    Be sure to write down the serial number
  2. Install build-essential
    Code:
    sudo apt-get install build-essential
  3. Extract and install VMWare Server.
    Code:
    cd ~/src/VMWare
    tar xzf VMware-server-2.0.0-101586.x86_64.tar.gz

    cd ~/src/VMWare/vmware-server-distrib
    sudo ./vmware-install.pl
    Select defaults.

    Enter your serial # during the installation.
  4. Set a root password.

    VMWare Server 2.0 uses a WEB INTERFACE. By default, the web interface is configured to allow root login, thus we need a root password. We will undo this later.

    Code:
    sudo passwd
    Enter your desired root password twice (second time to confirm). You will not see anything in the terminal as you type.
  5. Configure VMWare to allow users to log in.

    Start vmware (as a user, not root):
    Code:
    vmware
    VMWare runs in FireFox at https://localhost/ui

    The first time you load the page, firefox will give you a warning. Go ahead and add an exception.

    You will get a log in screen, log in as root.

    Go to the "Permissions tab" -> click "New Permission"

    From the pull down menus, add your user as an "Administrator"

    Log out and back in as your user (rather then root).

    Assuming that is working, lock the root account

    Code:
    sudo passwd root -l
  6. To get the web interface working (console tab), first create a Virtual machine. Once you start your first VM you need to allow firefox to install an addon. To do this, start your new VM, then click on the "Console" tab. You will see a black window with a text message "The VMWare Remote Console Plug-in is not installed ..."

    Click on the yellow "Install plugin". You will get a "warning" from firefox "Firefox prevented this site (127.0.0.1) from asking you to install software on your computer". Click the "Allow" button on the upper Left and install the plugin.

    You will the need to re-start firefox, again log in and start your virtual machine. This time you will get notice that the VMWare Remote Console Plug-in has been installed. Again click the Console tab. You will now see a black screen with the VMWare logo. Click anywhere in this screen to start the VMWare graphical screen (in a separate window).

    From the VMWare console you have some limited options for admin of the VM (stop / reboot and access to removable devices).

    You can close Firefox and your Virtual Machine will continue to run. You can close the VMWare window or even log off and the virtual machine will continue to run

    Unfortunately, there is not a menu option to re-start the console, you have to re-start firefox, log in, and again start the console.



Additional Options


VMWare server mui
- VMware ESX-style web-access for configuration of your server
  • Download VMware-mui-1.0.6-91891.tar.gz
  • Prep :
    Code:
    apt-get install libxi6 xfsprogs
  • Install :
    Code:
    tar -xvzf VMware-mui-1.0.6-91891.tar.gz
    cd cd vmware-mui-distrib
    sudo ln -s -f /bin/bash /bin/sh # This may not be required
    sudo ./vmware-install.pl
  • Access https://localhost:8333/


VMWare tools
- Quite easy : https://help.ubuntu.com/community/VMware/Tools


Directory (Folder) Sharing
This works by mounting a directory on the host onto the guest.
You need a patch, see this link :

VMware Tools for VMware Workstation 6.0.4 build 93057 on Ubuntu 8.04 guest
~ Thanks
Keithel

File Sharing
- Samba is by far the easiest way to file share. It works out of the box with minimal end user configuration. See this page : https://help.ubuntu.com/community/SettingUpSamba

This link is specific to samba on VMWare
Sharing files between a Windows guest and Ubuntu host using VMware and Samba

~ Thanks gerula

Do not let the size of that page distract you, follow the sections on graphical configuration. Samba also allows sharing of printers. The only caveat with Ubuntu 8.04 is that after installing the samba server you need to log out and back in before your shares can be configured.

Alternates to Samba - sshfs, NFS, ftp, http, or other network protocols.


Enable USB devices
- USB devices work out of the box with minimal (gui) configuration.
- Enable USB device sharing : Using any editor (gksu gedit /etc/fstab), add this line to /etc/fstab (works with VirtualBox as well)

Code:
# USB for vmware/vbox
none /proc/bus/usb usbfs devgid=46,devmode=664 0 0
Reboot and re-start VMWare Server.

- With your guest turned off : In the server window click "Edit virtual machine settings" -> Click "Add" in the lower left -> Select usb controller -> click finish.

Start your guest ...

- With your guest turned on : In the VMWare menu , at the top select "VM" -> Removable devices -> USB devices -> Select the USB device to share with your guest.


Kernel Upgrades
- After kernel upgrades you will need to re-run vmware-config-pl. Open a terminal and :

Code:
sudo vmware-config.pl
Hope that helps.

Trouble Shooting
- Problem installing ?
See this thread : http://ubuntuforums.org/showthread.php?t=337040
~ Thanks
Illuvator


Remove (uninstall) VMWare

If you want to remove vmware, run :
Code:
sudo vmware-uninstall.pl

How To Install VMware Tools on Ubuntu 8.04 Guests

Installing VMware Tools on virtualized guests gives you a much more enjoyable experience within your virtual environment. Screen resolution, mouse behaviour, etc will be improved for your virtual sessions after installing these additional tools. Installing these tools within Ubuntu 8.04 virtualized guests is fairly simple, just follow along below.

Installing VMware Tools

The first requirement, of course, is that you have Ubuntu 8.04 installed within VMware Server and that Ubuntu 8.04 is running.

Once you’ve got your Ubuntu 8.04 guest logged in, navigate to the “VM” menu option (File, Edit, View… VM) and select “Install VMware Tools”. This will notify you once again that your guest must be logged in. If that is the case, click “Install”.

note: The next step in the process may be simpler if you make sure any other CD images are unmounted before continuing.

This part of the process mounts a virtual CD image with the VMware Tools contained on it. To find these tools for installation navigate to Places > Computer > CD Drive. You should find these two files listed there:

VMwareTools-*.rpm
VMwareTools-.tar.gz

For Ubuntu guest installations we’ll want to use the .tar.gz file. Now we have access to the needed file, the next part of the process is opening the archive and installing the tools.

Below I’ve put together a copy-paste list of commands you should be able to use to unpack and setup VMware Tools on your Ubuntu 8.04 guest. All of these commands happen within the Ubuntu 8.04 Guest machine:

sudo aptitude install build-essential linux-headers-generic
cp /media/cdrom/VMwareTools-*.tar.gz /tmp/
cd /tmp/
tar xf VMwareTools-*.tar.gz
cd vmware-tools-distrib/
sudo ./vmware-install.pl

You should be able to safely select the defaults for most of the questions. You might want to pay attention at the step where it asks for your preferred available resolution and set that properly. For the new VMware Tools to be available once this process is done you’ll need to reboot your Ubuntu 8.04 guest.

Saturday, September 27, 2008

修復Windows XP和2003在每次開機後都被提示要啟動的錯誤

家庭版、專業版和Windows Server 2003中,全部的標準版,企業版,Web 版,使用者可能遇到一個奇怪的錯誤, 每當使用者開啟電腦的時候,Windows系統將要求使用者啟用 或者 Windows Server 2003, 以前即使系統已經成功啟用。更糟糕的是, 如果為了再次啟用Windows而使用者回答『是』的話,系統就會顯示說Windows或者Server 已經被啟用,然後登出使用者的訊息。

這 個問題發生原因,因為有個程式或者它的相關檔案(例如reset5.exe、reset5.dll、reset5.dat、reset5.dt *、reset5.bat、resetserver、resetpath、srvany.exe)去干擾 Windows啟用在這台電腦。 (備註︰Reset5是終端機服務重置工具) .

以下的內容是微軟 KB312295 的說明,可依照指示進行修復的工作: .

步驟 1:以安全模式開啟電腦

1. 開啟電腦。
2. 電腦執行了開機自我檢查 (POST) 後,重複按 F8,打開『Windows 進階選項』功能表。
3. 在『Windows 進階選項』功能表上,用箭頭鍵選擇『安全模式』,然後按 Enter。
4. 用箭頭鍵選擇要啟動的 Windows 作業系統,然後按 Enter。
5. 在電腦以安全模式執行時,用具備Administrator權限的帳號登入。然後,在指示 Windows 正以安全模式執行的訊息方塊中按『是』。

步驟 2:啟動註冊表編輯器

依次按『開始』和『執行』,輸入 regedit,然後按『確定』。

步驟 3:刪除 RESETS 註冊表子項

1. 在註冊表編輯器中,展開『我的電腦』,然後展開『HKEY_LOCAL_MACHINE』。
2. 展開『SOFTWARE』,然後展開『』。
3. 展開『Windows NT』,然後展開『CurrentVersion』。
4. 展開『Winlogon』,然後展開『Notify』。
5. 在『Notify』下,右鍵按『RESETS』,然後按『刪除』。
6. 按『是』,確認刪除 RESETS 子項。

注意:不要退出註冊表編輯器。在『步驟 4:修改註冊表以停用 Windows』中必須使用註冊表編輯器。

步驟 4:修改註冊表以停用 Windows

1. 在註冊表編輯器中,展開『我的電腦』,然後展開『HKEY_LOCAL_MACHINE』。
2. 展開『SOFTWARE』,然後展開『』。
3. 展開『Windows NT』,然後展開『CurrentVersion』。
4. 在『CurrentVersion』下,按『WPAEvents』。
5. 在註冊表編輯器的右邊(主題區域)中,右鍵按『OOBETimer』,然後按『修改』。
6. 按並將指標置於『數值資料』框中。然後,修改『數值資料』框中顯示的任何字元。
7. 按『確定』。

注意:此步驟將停用 Windows

8. 退出註冊表編輯器。

步驟 5:重命名受損的 Windows 啟動檔案

1. 依次按『開始』和『執行』,輸入 cmd,然後按『確定』。
2. 在命令提示處,輸入以下命令並按 Enter:
ren %windir%\system32\WPA.dbl wpa.old
此命令將 WPA.dbl 檔重命名為 WPA.old。

步驟 6:確定 CD DVD 光碟機路徑

1. 插入 Windows CD。
2. 按『開始』,然後按『我的電腦』。
3. 請注意出現在『有可移動存儲的設備』下的 CD 光碟機路徑或 DVD 光碟機路徑。在下一步中必須使用此光碟機路徑。

步驟 7:取代受損的 Windows 啟動檔案

1. 依次按『開始』和『執行』,輸入 cmd,然後按『確定』。
2. 在命令提示處,輸入以下命令並按 Enter:
expand drive:\i386\wpa.db_ %windir%\system32\wpa.dbl
在此命令中,需用包含 Windows CD 的光碟機的光碟機路徑取代 drive

例如,如果 Windows CD 位於光碟機 D 中,那麼該命令將如下所示:
expand d:\i386\wpa.db_ %windir%\system32\wpa.dbl
此命令從 Windows CD 中提取 Wpa.dbl 檔的副本。然後,將其置於 Windows 安裝的 System32 資料夾中。

3. 檢查命令提示處出現的輸出結果。如果命令成功執行,則會顯示類似於以下內容的資訊:
(R) File Expansion Utility Version 5.1.2600.0 Copyright (C) Corp 1990-1999. All rights reserved. Expanding d:\i386\wpa.db_ to c:\windows\system32\wpa.dbl. d:\i386\wpa.db_: 2222 bytes expanded to 2126 bytes, -5% increase.
4. 輸入 exit,然後按 Enter 退出命令提示。

步驟 8:刪除與程式相關的檔案

1. 按『開始』,然後按『搜尋』。
2. 在『您要搜尋什麼』下,按『所有檔案和資料夾』。
3. 在『全部或部分檔案名稱』框中,輸入以下內容,然後按『搜尋』:
reset5.exe; reset5.dll; reset5.dat; reset5.dt*; srvany.exe
此操作將對以下所有檔案進行搜尋:
Reset5.exe
Reset5.dll
Reset5.dat
Reset5.dt*
Srvany.exe

請注意:如果您使用其他搜尋工具,如 Windows Desktop Search,則可以使用此工具來搜尋其中的各個檔案。

4. 在『搜尋結果』對話方塊的結果視窗中,右鍵按每個檔案,然後按『刪除』。
5. 按『是』,確認刪除檔。
6. 在完成對這些檔的刪除後,退出『搜尋結果』對話方塊。
7. 重新啟動電腦,並讓 Windows 以正常模式重新啟動。

步驟 9:重新啟動 Windows

1. 按『開始』,依次指向『所有程式』、『附屬應用程式』和『系統工具』,然後按『啟動 Windows』。
2. 如果『Windows 產品啟動精靈』提示啟動 Windows,則按精靈中的說明啟動 Windows
3. 重新啟動電腦,然後重複『步驟 9:重新啟動 Windows』的步驟 1,再次啟動『Windows 產品啟動精靈』。執行此步驟,以確認精靈不會再提示啟動 Windows
4. 如果『Windows 產品啟動精靈』顯示『Windows 已啟動』訊息,則按『確定』退出精靈。

Monday, September 22, 2008

Apache + Subversion + Trac 安裝配置設定三合一 (Ubuntu)

安裝 install apache
=======================

$ sudo apt-get install apache2

安裝 install subversion
=======================

$ sudo apt-get install subversion

$ sudo apt-get install libapache2-svn

設定 Confiigure subversion
--------------------------

Enter menu system/management/user_and_group

change to group tab, add atwo new group named "www-data"(apache) and "subversion"
then add user [your account] and "www-data" to "subversion"'s group members.

or use command instead::

$ sudo adduser www-data subversion
$ sudo adduser [your account] subversion

Then we could create svn repository::

$ sudo svnadmin create /home/svn (or $ sudo svnadmin /usr/local/svn)

Then Change the folder owner

$ sudo chown -R www-data:www-data /home/svn
$ sudo chmod -R g+ws /home/svn

Setup apache host site
$ sudo gedit /etc/apache2/mods-enabled/dav_svn.conf

uncomment following lines:
[Location /svn]
DAV svn
SVNPath /home/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/subversion/passwd
[/Location]

or add following just above the /location:

[LimitExcept GET PROPFIND OPTIONS REPORT]
Require valid-user
[/LimitExcept]
為 subversion 存取加上密碼:

sudo htpasswd -c /etc/subversion/passwd user_name


重開 apache:

sudo /etc/init.d/apache2 restart

驗證能取得 svn 檔案:

$ svn co http://hostname/svn/myproject myproject --username user_name


安裝 Install Trac
================

$ sudo apt-get install trac

$ sudo mkdir /home/trac
$ sudo chown www-data:www-data /home/trac

To add a virtual host to host trac:

$ sudo gedit /etc/apache2/sites-available/trac


[VirtualHost *]
ServerAdmin webmaster@localhost
ServerName trac.example.com
DocumentRoot /usr/share/trac/cgi-bin/
[Directory /usr/share/trac/cgi-bin/]
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
allow from all
[/Directory]
Alias /trac "/usr/share/trac/htdocs"

[Location /]
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /home/trac
#PythonOption TracEnv /home/trac/singletrac
PythonOption TracUriRoot /
[/Location]

DirectoryIndex trac.cgi
ErrorLog /var/log/apache2/error.trac.log
CustomLog /var/log/apache2/access.trac.log combined

[/VirtualHost]

Uncomment the AddHandler line in /etc/apache2/apache2.conf so that the Trac CGI program will be executed:

# To use CGI scripts outside /cgi-bin/:
#
AddHandler cgi-script .cgi

Disable the default virtualhost, enable the Trac virtualhost, and restart Apache2:

sudo a2dissite default
sudo a2ensite trac
sudo /etc/init.d/apache2 reload


Make New Trac Project expose to web
===================================

sudo trac-admin /home/trac/YourProjectNameHere initenv

Then the interactive interface was prompt:
[specify the repository to /home/svn/YourProjectNameHere]

sudo chown -R www-data /home/trac/YourProjectNameHere


Refer to
http://trac.edgewall.org/wiki/TracOnUbuntu
http://trac.edgewall.org/wiki/TracModPython
http://www.blendedtechnologies.com/setting-up-subversion-on-ubuntu/11
http://philipatswarchy.wordpress.com/2006/11/27/apachesslsubversionpam/

Saturday, September 20, 2008

用VMWare開雙視窗玩3D遊戲

這個設定只適用在 VMWare Workstation 版本

1.切換到存放XP虛擬電腦檔案的資料夾,然後找到「Windows XP Professional.vmx」個檔案,這時用記事本或其他純文字編輯程式來開啟它。

2.開啟後捲動頁面到最下方,輸入「mks.enable3d = TRUE」、「svga.vramSize = 67108864」、「vmmouse.present = FALSE」三行,輸入完畢就可以存檔關閉。

3.回到VMWare,按下功能表上的【Edit】→【Preferences】叫出設定對話盒,再點選〔Input〕分頁標籤,取消勾選「Ungrab when cursor leaves window」,然後按下〔OK〕關閉對話盒。

4.接下來啟動虛擬XP,啟動完畢後按下鍵盤上「Ctrl」+「Alt」鍵回到VMWare主畫面,然後按下功能表上的【VM】→【Install VMware Tools】再按下〔Install〕安裝VMWare工具組,安裝完畢後讓虛擬XP重新開機。

5.最後用虛擬XP連線到「 http://tinyurl.com/5xosf 」下載DirectX回來安裝,然後按下「開始」→「執行」並輸入「DXDiag」,切換到〔顯示〕標籤分頁,看見「Direct3D加速」部份顯示「已 啟用」,就表示虛擬3D顯示卡已經設定成功了。

Sunday, September 14, 2008

在 linux (ubuntu) 裝 oracle xe

First modify /etc/apt/sources.list file:
$ sudo vi /etc/apt/sources.list
Append following line:
deb http://oss.oracle.com/debian unstable main non-free
Save and close the file. Next import GPG key:
$ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
Update package database:
$ sudo apt-get update
Finally install Oracle:
$ sudo apt-get install oracle-xe

You must configure Oracle TCP/IP port and other parameters. Simply type the following command:
$ sudo /etc/init.d/oracle-xe configure

To access the Database Home Page go to http://127.0.0.1:8080/apex. Open a web browser and type url (you need to use username 「system」 and password setup earlier)