網頁

2013年8月21日 星期三

VMware Workstation Pro 12.x --- Install VMware Tool on CentOS 6.3 x64 or 6.7 x64 minimal version

In the VMware product as Workstation or vSphere, it will be very important that install VMware Tools on any VM Guest for enhancing/improving some function as graphic display and performance, drag and drop operation, shared folder and so on.
How to install VMware Tools on CentOS?
It will be very simple operation if do the related steps as follows:

After power on the VM Guest, we have to click VM –> Install VMware Tools.. in this VM Guest menu.ScreenHunter_02So does that the VMware Tools will be mounted by CDROM device now.

In the next step, we need to create a mount point by executing the command mkdir /mnt/cdrom next to mount this CDROM by doing the command mount /dev/cdrom /mnt/cdromScreenHunter_03Now the system can read-only the CDROM data. In the moment, we will extract the VMware Tools from CDROM to the folder of local disk by using the command tar zxpf /mnt/cdrom/VMwareTools…ScreenHunter_04So does that the VMware Tool source will be accessed now.

To switch to VMware Tool directory as vmware-tools-distrib and execute the command ./vmware-install.pl for installing VMware Tools. (# 1) In the later procedure, we always press Return/Enter key to choose the default setting or configuration.ScreenHunter_05ScreenHunter_06ScreenHunter_07ScreenHunter_08ScreenHunter_10When the above process is successful and never show the warning/error message, we will reboot the system so that the VMware Tools will embed into the Kernel now. (# 2)

To verify the status of VMware Tools by using status vmware-tools command

Reference :
(# 1)   Before execute vmware-install.pl in the CentOS minimal version, please firstly confirm whether ever install gcc、perl、fuse-libs package in the procedure of OS installation.

(# 2)   If update the Kernel or there is new VMware tool version, we have to install VMware Tools again by the above procedure except for uninstalling old version firstly.

2013年8月18日 星期日

Squid 3.1 --- Install and start with basic configuration

As we know, Squid is a public proxy server in open source environment. If use it, we can easy to cache and filter web content for reusing it for the same request in the future. For realizing its function, I will build a lab for testing it. At first, we have to know how to install this package.

Squid InstallationBy doing yum install squid command, we can quickly and easily install the squid package and its dependencies from the yum repositories.ScreenHunter_17ScreenHunter_18So does that the Squid package will be installed nowScreenHunter_28
Squid ConfigurationAfter installing Squid package, there is recommended minimum configuration that exists in the /etc/squid/squid.conf file and it can work finely without changing anything. Of course,we can correct some parameter in this default setting for conforming with the actual environment.(# 1)
After changing the configuration, we can do the command /usr/sbin/squid –f /etc/squid/squid.conf –k parse to verify whether the configuration syntax is wrong or incorrect. (# 2)ScreenHunter_20When the prerequisite is ready, we will begin to start squid daemon. For starting it in the first time, we need to do the command /usr/sbin/squid –z to create the swap directories.ScreenHunter_21and uncomment the cache_dir directories in the /etc/squid/squid.conf file (# 3)ScreenHunter_23next to start squid daemon by executing the command service squid start. So do that the Cache directories will be created in the /var/spool/squid path.ScreenHunter_24For starting Squid daemon automatically when system boots, we need to type the command chkconfig –levels 235 squid on if we need it.ScreenHunter_22
Squid function verification
After start squid daemon, we can do something to verify whether its function is normal now.
<In Server>
To confirm whether the default listening port 3128 is opened by executing the command netstat –tnl | grep 3128 if we don’t change the http_port in squid configuration.ScreenHunter_30<In Client>
In the moment, we can try to ping & telnet this squid proxy to realize whether network channel is normal between Squid Server and Client machine. ScreenHunter_25If it is normal, we need to change proxy setting in any Browsers as IE or Firefox. That is proxy server sets the squid hostname or IP and port sets squid port number as 3128.ScreenHunter_24So do that we can normally explore Internet now.ScreenHunter_26
Reference
(# 1).  Squid configuration directives
(# 2). Although I ever set hostname in the file /etc/sysconfig/network, it still has warning message “hostname rDNS test failed; Could not determine this machine public hostname” by executing the command /usr/sbin/squid –f /etc/squid/squid.conf –k parse ScreenHunter_01This problem is resolved until I add a record IP mapping FQDN into /etc/hostsScreenHunter_02or add a record visible_hostname 10.10.101.254 into the file /etc/squid/squid.confScreenHunter_03(# 3) When we execute the command /usr/sbin/squid –NCd1, the warning message tell us that cache_mem is larger than total disk cache space now.ScreenHunter_26So we change cache space from 100MB to 1024MB because cache_mem define 256 MB manually.
ScreenHunter_28

2013年8月12日 星期一

澳門團體行(第一天)

    一看文章標題就知道所要介紹的是澳門這個地方,因為這是今年度全家人要去旅遊的景點。會選擇它,主要是原本計劃好要去「星馬五樂園」因霾害而臨時取消,在女兒不去日本(擔心幅射外洩...)、不去大陸(擔心禽流感...),兒子不去韓國(覺得太無聊...)的情況下,及老婆同事建議可到澳門看【水舞間】,就決定到澳門去。這決定剛開始小孩們都覺得意興躝跚,但在邀請親戚加入後就變的不一樣了,因為小孩們有伴,同行的不只僅有大人而已,所以換做小孩們天天就過著像〝數饅頭〞似的期盼出國的日子到來。

    在完成與旅行社出國前相關作業(如:付款、訂票等)後,就是全家等著出國日期的到來。雖然在等待的過程中出現一個變數「蘇力颱風」來攪局,但在老天爺的庇佑下,總算確定出國時颱風還沒到、回程時可能班機稍受影響,如此就決定如期出發;否則錢都付了,自行取消或延期都會有損失,即錢應該拿不回來了 : (

    盼到出國的當天,一大早就起床梳洗換裝,準時搭車到桃園機場第二航廈。雖然當天不是星期假日,但因正值暑假期間,櫃檯報到處也有些人潮。
   在完成相關出國檢驗手續後搭上長榮航空班機,班機也正常起飛並如期順利地來到澳門機場,一行人也就正式踏入澳門。
   出關後,在機場用中文詢問服務人員,也就順利找到酒店與機場往來接駁巴士,一行人從容地搭上巴士,並朝向所住的地方---「威尼斯人度假村酒店」。
  不到10~20分鐘的車程就到達目的地---「威尼斯人度假村酒店」,且車程沿途中就看到耳熟能詳的酒店---金沙、新濠天地、銀河等。果然如同事所言:"澳門腹地是很小,大小就像是台北內湖般". P_20130711_122022下了車進入酒店內,眼前所見就是金碧輝煌的大廳。"好奢華" 當下內心浮現的第一種聲音!
辦理好入住手續後,一夥人就拎著行李往住的地方走,過程中像是逛百貨公司般上電扶梯
   不一會兒時間,入目眼簾卻是一片奇幻景象,,因為外面天氣酷熱無比,天空是無比明亮,但目前所處之地卻是藍天白雲,氣候是格外涼爽無比,宛如置身奇幻虛擬城堡中.不知道真正地威尼斯是否如同此般之景象
   一打開住的房間,眼前所見又是一次驚奇"好大的房間",房間不單僅有兩張大床,也有空間大小類似兩張大床的客廳,且浴室也大。總之,這房間是我們至今出外旅遊中,所住的最大房間.CIMG0078CIMG0081CIMG0082   一放下手中的包袱,頓時就聽到肚子咕嚕咕嚕的叫聲,原來此刻也正值中餐的時間。初到人生地不熟的貴寶地,就僅能在附近的餐飲部果腹,類似台灣的美食街。CIMG0086   既然來到澳門,就應該要嚐嚐當地的美食---『豬扒包』,瞧這個包,居然跟我女兒的臉一樣大,外觀是蠻特別的。若問我口感,像是法國麵包與燒烤豬排一塊吃,只能說不難吃但個人吃不慣。(PS: 另一項驚奇就是覺得東西好貴ㄡ, 一個蛋塔=20塊港幣(澳幣)約為80塊台幣! )P_20130711_140223   吃飽飽後,就會令人昏睡。既然來此度假,也就要過的悠閒些,故大夥兒各自回房小睡片刻,先享受舒舒服服的床與被被。接近下午3~4點時,就開始我們第一個排定行程,到酒店內游泳池玩水。再次驚奇就是從房間到游泳池居然要走300公尺,可見這個酒店佔地應該是滿大的!
   玩了一個多小時左右,也該是回房換裝準備參加今晚的重頭戲—「水舞間」,隨便吃點東西後,就步行往新濠天地酒店,因為這個表演場地是在「新濠天地酒店」CIMG0096   早早地出發是擔心找不到所在地,但其實不是像我們想像般不好找或路程有點距離,因為「新濠天地酒店」就在「威尼斯人度假村酒店」對面,走些路過幾個紅綠燈就到了,所以我們比預期表演時間提早到些許,也很快地在售票口確認旅行社的訂票資訊而換取到真正的入場票.
   到了表演入場時間,大家一窩蜂走入會場中,而在服務人員的指引下也很快就找到我們的位置.就在舞台入口中央的右手邊。由於會場一片黑漆嗎烏,拍照時又不能用閃光,因為服務人員會制止照相;且座位剛好是在最後一排,是服務人員常走動的地方,故照片照得很GG,不過整個表演非常精采---舞者在水中舞台表演舞蹈、特技,配合燈光與佈景呈現給觀眾一幕幕地驚奇與讚嘆!P_20130711_201424   看完表演步出酒店後所看的景象,給人呈現又是不一樣的面貌。酒店周遭到處燈火通明,如同置身在繁華熱鬧之不夜城,我想越晚某些場所應該是非常High,所以我們三位大人們就決定到酒店賭場見識見識,因為年齡不到21歲是不能進賭場的!P_20130711_215854PSNyah-Nyah
若您問我賭場手氣如何?只能說平平,因為我只會拉Bar,其他牌桌上都不會玩!
到了12點左右,大夥兒就各自回房上床OO困,就這樣結束了第一天的行程.

2013年7月20日 星期六

Cygwin/X --- Uninstall & Remove Cygwin/X Component and related setting

Due to Cygwin/X never have uninstall facility by Setup tool, we have to do some method manually if need to remove all Cygwin/X component.
How to do it?
Stop and Remove any Cygwin Services
If the Cygwin services (# 1) such as sshd are running, ScreenHunter_02we have to stop all services by using cygrunsrv –E sshd commandScreenHunter_03ScreenHunter_04and uninstall all service by using cygrunsrv –R ssh command.ScreenHunter_05ScreenHunter_06
Delete the Cygwin root folder and all subfolders
Based on the logon account, we will take ownership of the recursive files and folders of the Cygwin installation path by using takeown /r /f c:\cygwin commandScreenHunter_02So does that the status is as follows:
AS-ISScreenHunter_01TO-BEScreenHunter_03
We also have to delegate Full Access to Everyone in the recursive files and folders of the Cygwin installation path by using icacls c:\cygwin /t /grant Everyone:F command.ScreenHunter_05So does that the status is as follows:
AS-ISScreenHunter_04TO-BEScreenHunter_06
In the moment, we can completely delete the cygwin folder and its subfolders by using rmdir /s c:\cygwin command.
ScreenHunter_07
Delete key from registry
Start...Run... regedit and Delete Cygwin keys from registry tree “Computer\HKEY_CURRENT_USER\Software”ScreenHunter_08Delete the system variable (option)
To remove the Environment Variable as 'CYGWIN' if ever create it.ScreenHunter_02Delete the related Account (option)
To remove the related account as cyg_server & sshd if ever create it in the installation process.ScreenHunter_01Until now, the Cygwin/X will be uninstalled clearly.

Reference(# 1) we can know what services are running now by using cygrunsrv –list on the prompt command.ScreenHunter_23
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.