檔案為 'server' 類別

Ubuntu 8.04 LTS 安裝vmware-server 1.06的方法

先下載 安裝檔。

wget -c http://download3.vmware.com/software/vmserver/VMware-server-1.0.6-91891.tar.gz

另外安裝所要的library

sudo aptitude install build-essential linux-kernel-devel linux-headers-generic xinetd

開始安裝.

tar xf VMware-server-1.0.6-*.tar.gz
cd vmware-server-distrib
sudo ./vmware-install.pl


安裝後開啓會出現以下的錯誤

/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib/libstdc++.so.6)

解決的方法如下

cd /usr/lib/vmware-server-console/lib/
sudo mv libpng12.so.0/libpng12.so.0 libpng12.so.0/libpng12.so.0.disabled
sudo ln -sf /usr/lib/libpng12.so.0 libpng12.so.0/libpng12.so.0 

cd /usr/lib/vmware-server-console/lib/libgcc_s.so.1/
sudo mv libgcc_s.so.1 libgcc_s.so.1.disabled
sudo ln -sf /lib/libgcc_s.so.1 libgcc_s.so.1

分享此文章


提高網頁打開速度的一些小技巧

互聯網帶寬越來越寬,似乎讓網頁的加載速度得到了質的飛躍。其實不然,因為隨著帶寬的提高,網頁上的對象也越來越多,因此加快網頁打開速度還是一個 重要的課題。加快網頁的打開速度,有三個路徑,一是提高網絡帶寬,二是用戶在本機做優化,三是網站設計者對網頁做一定的優化。這篇文章站在一個網站設計者 的角度,分享一些優化網頁加載速度的小技巧。

网页提速!

一、優化圖片

幾乎沒有哪個網頁上是沒有圖片的。如果你經歷過56K貓的年代,你一定不會很喜歡有大量圖片的網站。因為加載那樣一個網頁會花費大量的時間。

即使在現在,網絡帶寬有了很多的提高,56K貓逐漸淡出,優化圖片以加快網頁速度還是很有必要的。

優化圖片包括減少圖片數、降低圖像質量、使用恰當的格式。

1、減少圖片數:去除不必要的圖片。

2、降低圖像質量:如果不是很必要,嘗試降低圖像的質量,尤其是jpg格式,降低5%的質量看起來變化不是很大,但文件大小的變化是比較大的。

3、使用恰當的格式:請參閱下一點。

因此,在上傳圖片之前,你需要對圖片進行編輯,如果你覺得photoshop太麻煩,可以試試一些在線圖片編輯工具。懶得編輯而又想圖片有特殊的效果?可以試試用過調用javascript來實現圖片特效

二、圖像格式的選擇

一般在網頁上使用的圖片格式有三種,jpg、png、gif。三種格式的具體技術指標不是這篇文章探討的內容,我們只需要知道在什麼時候應該使用什麼格式,以減少網頁的加載時間。

1、JPG:一般用於展示風景、人物、藝術照的攝影作品。有時也用在電腦截屏上。

2、GIF:提供的顏色較少,可用在一些對顏色要求不高的地方,比如網站logo、按鈕、表情等等。當然,gif的一個重要的應用是動畫圖片。就像用Lunapic製作的倒映圖片

3、PNG:PNG格式能提供透明背景,是一種專為網頁展示而發明的圖片格式。一般用於需要背景透明顯示或對圖像質量要求較高的網頁上。

三、優化CSS

CSS疊層樣式表讓網頁加載起來更高效,瀏覽體驗也得到提高。有了CSS,表格佈局的方式可以退休了。

但有時我們在寫CSS的時候會使用了一些比較囉嗦的語句,比如這句:

margin-top: 10px;
margin-right: 20px;
margin-bottom: 10px;
margin-left: 20px;

你可以將它簡化為:

margin: 10px 20px 10px 20px;

又或者這句:

<p class=”decorated”>A paragraph of decorated text</p>
<p class=”decorated”>Second paragraph</p>
<p class=”decorated”>Third paragraph</p>
<p class=”decorated”>Forth paragraph</p>

可以用div來包含:

<div class=”decorated”>
<p>A paragraph of decorated text</p>
<p>Second paragraph</p>
<p>Third paragraph</p>
<p>Forth paragraph</p>
</div>

簡化CSS能去除冗余的屬性,提高運行效率。如果你寫好CSS後懶得去做簡化,你可以使用一些在線的簡化CSS工具,比如CleanCSS

四、網址後加斜槓

有些網址,比如”www.kenengba.com/220“,當服務器收到這樣一個地址請求的時候,它需要花費時間去確定這個地址的文件類型。如果220是一個目錄,不妨在網址後多加一個斜槓,讓其變成www.kenengba.com/220/,這樣服務器就能一目瞭然地知道要訪問該目錄下的index或default文件,從而節省了加載時間。

五、標明高度和寬度

這點很重要,但很多人由於懶惰或其它原因,總是將其忽視。當你在網頁上添加圖片或表格時,你應該指定它們的高度和寬度,也就是height和 width參數。如果瀏覽器沒有找到這兩個參數,它需要一邊下載圖片一邊計算大小,如果圖片很多,瀏覽器需要不斷地調整頁面。這不但影響速度,也影響瀏覽 體驗。

下面是一個比較友好的圖片代碼:

<img id=”moon” height=”200″ width=”450″ src=”http://www.kenengba.com/moon.png” alt=”moon image” />

當瀏覽器知道了高度和寬度參數後,即使圖片暫時無法顯示,頁面上也會騰出圖片的空位,然後繼續加載後面的內容。從而加載時間快了,瀏覽體驗也更好了。

六、減少http請求

當瀏覽者打開某個網頁,瀏覽器會發出很多對像請求(圖像、腳本等等),視乎網絡延時情況,每個對象加載都會有所延遲。如果網頁上對像很多,這可以需要花費大量的時間。

因此,要為http請求減負。如何減負?

1、去除一些不必要的對象。

2、將臨近的兩張圖片合成一張。

3、合併CSS

看看下面這段代碼,需要加載三個CSS:

<link rel=”stylesheet” type=”text/css” href=”/body.css” />
<link rel=”stylesheet” type=”text/css” href=”/side.css” />
<link rel=”stylesheet” type=”text/css” href=”/footer.css” />

我們可以將其合成一個:

<link rel=”stylesheet” type=”text/css” href=”/style.css” />

從而減少http請求。

七、其它小技巧(譯者添加)

1、去除不必要加載項。

2、如果在網頁上嵌入了其它網站的widget,如果有選擇餘地,一定要選擇速度快的。

3、盡量用圖片代替flash,這對SEO也有好處。

4、有些內容可以靜態化就將其靜態化,以減少服務器的負擔。

5、統計代碼放在頁尾。

本文編譯自Daily Blog Tips,內容有刪改。

原文地址:http://www.kenengba.com/post/435.html

分享此文章


How to remove a domain controller from Win Server 2003

This tutorial will explain how to remove domain controller from your network.Procedure to follow

On the last domain controller in the domain, click Start, and then click Run.

In Open, type dcpromo to open the Active Directory Installation Wizard, and then click Next.
On the Remove Active Directory page, select the This server is the last domain controller in the domain check box, and then continue to follow the wizard.

Caution

• Removing a domain will result in the permanent loss of any data contained in that domain. This includes all user, group, and computer accounts.

Useful Notes

• To perform this procedure, you must be a member of the Domain Admins group (in the forest root domain) or the Enterprise Admins group in Active Directory, or you must have been delegated the appropriate authority. As a security best practice, consider using Run as to perform this procedure. For more information, see Default local groups, Default groups, and Using Run as.

• To remove an Active Directory domain, you must first demote all other domain controllers associated with the domain. For information about demoting domain controllers.

• If the domain has child domains, it cannot be deleted.

• If this is the last domain in the forest, demoting this domain controller will also delete the forest.

• If the domain controller currently holds the domain naming master or schema master operations roles, transfer the role to domain controller in a different domain before removing the domain. For information about locating operations masters and transferring operations master roles.

• If the domain controller holds the last replica of one or more application directory partitions, you must first remove the last application directory partition replicas from the domain controller before you can delete the domain. You can use the Active Directory Installation Wizard to remove all application directory partition replicas from the domain controller or you can manually remove the partitions using the Ntdsutil command-line tool.

分享此文章


50種強大的CSS技術

CSS技巧

1. Triadic Background Setting with CSS
利用三張背景圖片來創造一種錯覺上的3D效果,非常的酷. [via Wilson Miner]

2. Creative Use of PNG Transparency in Web Design
使用JavaScript和CSS技巧,讓PNG透明圖片能夠IE7或其它一些較老的瀏覽器支持。

繼續讀取 ‘50種強大的CSS技術’

分享此文章


syslog server設定 (將所有機器的 syslog 集中管理)

打開防火場udp 514 port

syslog server: ( ex : 192.168.0.200 )
#vi /etc/rc.conf
syslogd_flags=”-a 192.168.0.0/24:514″

syslog client:
#vi /etc/syslog.conf
*.* @192.168.0.200

PS: 請自行替換斜體黑字部份。

分享此文章