2009年2月28日 星期六

Install VMware Tools on Linux

# yum install gcc kernel-headers kernel-devel

How to fix the problem when "What is the location of the directory of C header files that match your running kernel" error occurred?

The location of the directory of C header files is: /usr/src/kernels/`uname -r`/include/

If the error message was like
The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match your running kernel...

The vmware-config-tools.pl is looking for define UTS_RELEASE within either version.sh or utsrelease.h under ./linux/ Unfortunately it wasn't there yet.
# cd /usr/src/kernels/`uname -r`/include
# cp -p generated/utsrelease.h linux/utsrelease.h

In the environment of VMWare Workstation 6.5.4 with Linux kernel 2.6.33.*, there is somehow difficult... If the "Virtual Network Device" was compiled failed in "Vmware Kernel Module Updater", the steps below were worked for me.
cd /usr/src/kernels/`uname -r`/include/linux/
# ln -sf ../generated/autoconf.h .
# ln -sf ../generated/utsrelease.h .
# tar xf /usr/lib/vmware/modules/source/vmnet.tar
# cd vmnet-only
In vnetUserListener,c, add the line:
#include
after
#include "vnetInt.h"
# cd ..
# tar cf vmnet.tar vmnet-only
# mv vmnet.tar /usr/lib/vmware/modules/source/
# tar xf /usr/lib/vmware/modules/source/vmci.tar
# cd vmci-only/include
In pgtbl.h, add the line:
#include
after
#include "compat_page.h"
# cd ../..
# tar cf vmci.tar vmci-only
# mv vmci.tar /usr/lib/vmware/modules/source/

reference:
VMWare Workstation 6.5.4 with Linux kernel 2.6.33.4
VMware Tools on 64-bit Ubuntu 9.10
圖文並茂,VMware 6.5.1for linux下載安裝、註冊機、VM tools及虛擬系統應用安裝教程

[轉錄]Enable Multiple Concurrent Remote Desktop Connections in Windows XP

1.Download the patched termsrv.dll:
Windows XP RTM, SP1 and SP2: termsrv.dll (version 5.1.2600.2055)
Windows XP SP2: termsrv.dll (version 5.1.2600.2180)
Windows XP SP3: termsrv.dll (version 5.1.2600.5512)

2.In safe mode, replace the patched termsrv.dll in the %windir%\System32, %windir%\ServicePackFiles\i386 and %windir%\System32\dllcach folder

3.Modify/Add the registry as follows:
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Terminal Server\Licensing Core]
"EnableConcurrentSessions"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"EnableConcurrentSessions"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AllowMultipleTSSessions"=dword:00000001

4.Modify the Group Policy Editor by gpedit.msc:
Computer Configuration -> Administrative Templates -> Windows Components -> Terminal Services -> Limit Number of Connections = 5
Computer Configuration -> Administrative Templates -> Windows Components -> Terminal Services -> Allow users to connect remotely to this computer = enabled
Fast User Switching in Control Panel -> User Accounts -> Change the way users log on or off = enabled

5.Restart and enjoy it

see here

Linux Trouble Shooting

忘記密碼:
1.重新開機後, 按ESC進入開機管理程式(GRUB)
2.輸入e進入編輯模式
3.選擇 kernel /boot/vmlinuz 這行
4.輸入e進入編輯模式
5.輸入runlevel (若要修改密碼, 輸入1或輸入single), 按下enter退出編輯模式
6.輸入b並重開機則進入single user mode without password

MBR壞掉:
1.使用rescue光碟開機: linux rescue
2.grub-install /DEVICE ( 例如: /dev/hda )
3.若 /sbin/grub: not found.
4.進入grub模式: grub
5.grub> root (hd0, 0) # (hd0, 0) 第二個0是linux boot partition mark
6.grub> setup (hd0)
7.grub> quit

/etc/fstab壞掉
1.使用single user mode登入系統
2.mount -n -o remount,rw /
3.重新修改/etc/fstab

2008年11月16日 星期日

Partition Manager for Vista

最近硬碟諸事不順,
首先是用了三年的Toshiba R100硬碟突然壞掉,
後來新購買的X61又遇到Vista磁區無法重新切割的問題,

在用了GPartedPartitionMagic失敗後,
發現有套免費的軟體EASEUS Partition Manager在Vista上運作的非常順利,
終於解決在Vista上進行Partition Manager的問題了...

2008年11月13日 星期四

Enable POP in Gmail

In Gmail settings:
1. Click Settings at the top of any Gmail page.
2. Click Forwarding and POP/IMAP.
3. Select Enable POP for all mail or Enable POP for mail that arrives from now on.

In Outlook Express settings:
1. In Incoming mail(POP3): pop.gmail.com
2. In Outgoing mail(SMTP): smtp.gmail.com
3. In Advanced tab,
3.1 Check both "This server requires a secure connection(SSL)" checkbox of SMTP and POP3
3.2 Modify the port number of SMTP to 465, and POP3 to 995

see here and here

Apache + SSL

Apache + SSL真不是新東西了, 之前也做過好多次了...
但這次稍微踢到鐵板, 因此紀錄一下吧

鐵板版本為httpd-2.0.53/54 + openssl-0.9.8:
wget http://www.openssl.org/source/openssl-0.9.8i.tar.gz
./config
make && make install

wget ftp://ftp.yzu.edu.tw/mirror/pub1/Sun/sunfreeware.com/ \\ SOURCES/httpd-2.0.53.tar.gz
./configure --enable-so --enable-ssl --with-ssl=/usr/local/ssl
make && make install

啟動SSL出現錯誤訊息...
/usr/local/apache/bin/apachectl startssl
ssl_engine_pphrase.c: In function `ssl_pphrase_Handle_CB':

原來是openssl版本判斷的問題,
修改抓回來的source,
檔案httpd-2.0.53/modules/ssl/ssl_toolkit_compat.h
#ifdef OPENSSL_VERSION_NUMBER

+#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL)
+#ifndef PEM_F_DEF_CALLBACK
+#define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK
+#endif
+#endif
+
/*
* rsa sslc uses incomplete types for most structures
* so we macroize for OpenSSL those which cannot be dereferenced

重新config就完成啦! 說明請參考此處...

2008年7月10日 星期四

熱血青年

今天跟mcleemakoto聚餐, 感覺熱血沸騰,
有為者亦若是阿, 待我自由身, 必當有一番作為,
感謝這些同學們...