หน้าเว็บ

แสดงบทความที่มีป้ายกำกับ installation แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ installation แสดงบทความทั้งหมด

วันอังคารที่ 3 พฤศจิกายน พ.ศ. 2552

Introduction To VMware VIX API

Introduction to VMware VIX API.


The VIX API allows you to automate virtual machine operations on VMware Server or VMware Workstation.


About the VIX API

The VIX API (or "Vix") is a library for writing scripts and programs to manipulate virtual machines. It is high-level, easy to use, and practical for both script developers and application programmers. The VIX API is designed for three kinds of users:

  • Technically Adventurous Users - For example, dedicated IT personnel in an organization building their own in-house tools.
  • Partners - Software vendors using Vix to integrate VMware products with their own products or to build management products specifically for virtual machines.
  • VMware Engineering - VMware uses Vix in its own products as a general abstraction layer between core virtual machine processes and associated service processes.

The VIX API runs on Microsoft Windows (Windows95 or later) and Linux platforms (kernel 2.4.x or later recommended). It supports programs written in C, Perl, and COM (Visual Basic, VBscript, C#).


Compatibility

This release of the VIX API is compatible with VMware Server 2.0 and VMware Workstation 6.5.

Product Compatibility

VIX API Version

Compatible Platform Products

Library Location

1.0.3

VMware Server 1.0

server-1

1.1

VMware Workstation 6.0

ws-3

1.1.1

VMware Workstation 6.0.1 or earlier

ws-3

1.1.2

VMware Workstation 6.0.2 or earlier

ws-3

1.1.4

VMware Workstation 6.0.4 or earlier

ws-5

1.1.5

VMware Workstation 6.0.5 or earlier

ws-5

1.6.0

VMware Server 2.0 or earlier

VIServer-2.0.0

1.6.1

Workstation 6.5 or earlier

Workstation-6.5.0

The library location is not important if you use the wrapper library as recommended.

Vix Version 1.x supports programs written to version 1.x of the VIX API. Exceptions are noted on function reference pages. For example, VMware Server does not support record and replay, while VMware Workstation does not support virtual machine registration.

Vix libraries are installed with VMware Server and VMware Workstation and provide API compatibility corresponding to the product release. Vix libraries are downward compatible in most cases. If you upgrade VMware Server or VMware Workstation, you should also upgrade any separately installed Vix libraries. For instructions, see Installing the VIX API. You should also upgrade VMware Tools to match the product release.

With VMware Server, you can run Vix programs remotely. With VMware Workstation, Vix programs usually run on the host.


64-Bit Library Support

The VIX API provides 64-bit libraries for Linux only. Windows 32-bit libraries may work in 64-bit emulation mode.


Redistributable Code and Sample Code

As noted in the End User License Agreement, the VIX API allows you to build and distribute your own applications. To facilitate this, the following files are designated as redistributable for the purpose of that agreement:

  • VixAllProducts.lib and VixAllProductsd.lib
  • vix.lib and vix.dll
  • vixCOM.dll
  • libvixAllProducts.so
  • libvix.so

Redistribution of the open source libraries included with the VIX API is governed by their respective open source license agreements.

The VIX API also includes sample code, which you can use as a starting point for your own programs. Code is delivered in the Samples directory installed with VMware VIX. A Makefile is provided for Linux, and an nMakefile for Windows.


Installing the VIX API

On the VMware Server or VMware Workstation host, you do not need to install any additional VIX API components. Vix libraries are installed by default under “VMware VIX” or vmware-vix. To compile programs on these systems


To control VMware Server remotely from another machine, you need header files vix.h and vm_basic_types.h, as well as one or more library files. You can get these files in one of two ways: Use the Vix standalone installer to get the files needed to compile a program


Using the Windows Standalone Installer

To install the VIX API files on Windows:

  1. Download the installer program to your Desktop.
  2. Double-click the installer icon to run the graphical installer.

To uninstall the VIX API, go to Start > Settings > Control Panel and use the Add/Remove Programs control panel.


Using the Linux Standalone Installer

To install the VIX API files on Linux:

  1. Download the tar-gzip package. For example:
    wget http://www.vmware.com/downloads/server/VMware-vix-110068.i386.tar.gz
  2. As superuser, extract the package:
    sudo tar zxpf VMware-vix-110068.i386.tar.gz
  3. Change directory and, as superuser, run the VMware installer:
    cd vmware-vix-distrib
    sudo ./vmware-install.pl
  4. Read the EULA and type "yes" if you agree to its terms. You can accept most defaults by typing Enter when prompted.

To uninstall the VIX API, run the vmware-uninstall-vix.pl script. The uninstaller is at /usr/bin/vmware-uninstall-vix.pl by default.


Upgrading an Earlier Installation

If you are using older Vix libraries, VMware recommends that you upgrade those libraries using the standalone installer. The standalone installer provides a current version of the wrapper library, which allows programs to communicate with any Vix library, regardless of version or target architecture. The wrapper library dynamically loads appropriate library files at connection time.

Otherwise you must link your program to a Vix library that matches the server version. This gets inconvenient if your program communicates with more than one version of the server.

VMware Tools in virtual machines should be kept up-to-date with the VMware version on the host. When upgrading, also update VMware Tools in all guest operating systems. The VIX API relies on a current matching version of VMware Tools to perform many operations.

Upgrading the Vix libraries replaces the older header files, vix.h and vm_basic_types.h with newer header files. The header files are installed at the following locations by default:

  • On a Windows system:
    • C:\Program Files\VMware\VMware VIX\vix.h
    • C:\Program Files\VMware\VMware VIX\vm_basic_types.h
  • On a Linux system:
    • /usr/include/vmware-vix/vix.h
    • /usr/include/vmware-vix/vm_basic_types.h

Whether or not you use the wrapper library, your programs may call only the functions supported by the host. If you communicate with an older host, you cannot use newer features.


Sample Vix Programs

On Windows, the sample programs are installed in C:\Program Files\VMware\VMware VIX\Samples by default. An nMakefile is provided to compile all sample programs using nmake and the Visual Studio C compiler.

On Linux, the sample programs are installed in /usr/share/doc/vmware-vix/VMwareVix/samples/ by default. A Makefile is provided to compile all sample programs using make and the GNU C compiler.

Compiling on Windows With Wrapper Library

To use the wrapper library with VIX 1.6, you need Visual Studio 2005 (Visual C release 8.0) or later. To compile code on Windows using the wrapper library, use the following procedure. Files are in the C:\Program Files\VMware\VMware VIX folder.

  1. Add the header file to an include statement in your source code:
  2. #include "vix.h"
    ... program code here ...
  3. Compile for, and link with, the multithreaded version of the C runtime library. For Workstation 6.0.1 and later, you may use either the debug or the non-debug version of this library. For Workstation 6.0.0 and earlier, you must use the non-debug version.
    • To compile and link with the debug version (libcmtd.lib) use compiler options /MTd /nodefaultlib:libcmtd.lib.
    • To compile and link with the non-debug version (libcmt.lib) use compiler options /MT /nodefaultlib:libcmt.lib.
  4. Compile code to link with these files:
    • VixAllProducts.lib for non-debug, or VixAllProductsd.lib for debug.
    • kernel32.lib
    • user32.lib
    • advapi32.lib
    • ole32.lib
    • oleaut32.lib
    • ws2_32.lib
    • shell32.lib

Compiling on Linux With Wrapper Library

This procedure assumes that you have installed Vix components in the default directories. If you made different choices during the installation, specify your directory choices instead.

  1. Add an include statement in your source code for the header file:
    #include "vix.h"
    ... program code here ...
  2. Compile your application, linking to the wrapper library and dynamic load library:
    $ gcc -I/usr/include/vmware-vix vixapp.c -o vixapp -lvixAllProducts -ldl

Compiling on Windows Without Wrapper Library

If you do not use the wrapper, you need to link the appropriate Vix libraries for the VMware product to which your Vix program connects. Workstation 6.5 is able to link a debug version of the C runtime library.

To compile your code for use with Workstation 6.5:

  1. Make the required DLL files available to your program, either by placing them in the same directory as your executable, or by placing them in the system directory (C:\WINDOWS\system32). The easiest option is to copy DLL files from the directory C:\Program Files\VMware\VMware VIX\Workstation-6.5.0\32bit or 64bit.
    • vix.dll (or vixd.dll if you are using debug C runtime library)
    • iconv.dll (or inconvd.dll if you are using debug C runtime library)
    • libxml2.dll (or libxml2d.dll if you are using debug C runtime library)
    • libeay32.dll
    • ssleay32.dll
    • vmcryptolib.dll
    • zlib1.dll
  2. Add the header file to an include statement in your source code:
    #include "vix.h"
    ... program code here ...
  3. Compile your code to link in vix.lib statically.
  4. Compile for, and link with, the multithreaded version of the C runtime library. You may use either the debug or the non-debug version of this library.
    • To compile and link with the debug version (libcmtd.lib) use compiler option /MTd with Microsoft Visual Studio.
    • To compile and link with the non-debug version (libcmt.lib) use compiler option /MT with Microsoft Visual Studio.

To compile your code for use with Workstation 6.0.x:

  1. Make the required DLL files available to your program, either by placing them in the same directory as your executable, or by placing them in the system directory (C:\WINDOWS\system32). The easiest option is to copy DLL files from the directory C:\Program Files\VMware\VMware VIX\ws-2\32bit or ws-3\32bit.
    • vix.dll
    • iconv.dll
    • libxml2.dll
    • libeay32.dll
    • ssleay32.dll
    • vmcryptolib.dll
    • zlib1.dll
  2. Add the header file to an include statement in your source code:
    #include "vix.h"
    ... program code here ...
  3. Compile your code to link in vix.lib statically.
  4. Compile for, and link with, the multithreaded version of the C runtime library. You must use the non-debug version of this library (libcmt.lib) by using compiler option /MT with Microsoft Visual Studio.

To compile your code for use with VMware Server 1.0:

  1. Make the following DLL files available to your program, either by placing them in the same directory as your executable, or by placing them in your system directory (C:\WINDOWS\system32). The easiest option is to copy DLL files from the directory C:\Program Files\VMware\VMware VIX\server-1\32bit.
    • vix.dll
    • ssleay32.dll
    • libeay32.dll
  2. Add the header file to an include statement in your source code:
    #include "vix.h"
    ... program code here ...
  3. Compile your code to link in vix.lib statically.

Compiling on Linux Without Wrapper Library

To compile your code with VMware Server or VMware Workstation installed:

  1. Add an include statement in your source code for the header file:
    #include "vix.h"
    ... program code here ...
  2. Compile your application, linking statically to libvix.so, as in the following examples.
    • To link the VMware Workstation library on a 32-bit machine:
      gcc -I/usr/include/vmware-vix -o vixapp vixapp.c /usr/lib/vmware-vix/Workstation-6.5.0/32bit/libvix.so
    • To link the VMware Server 2.0 library on a 32-bit machine:
      gcc -I/usr/include/vmware-vix -o vixapp vixapp.c /usr/lib/vmware-vix/lib/VIServer-2.0.0/32bit/libvix.so
    • To link the old VMware Server 1.x library:
      gcc -I/usr/include/vmware-vix -o vixapp vixapp.c /usr/lib/vmware-vix/lib/server-1/32bit/libvix.so
Thanks : VMware.com

วันพุธที่ 28 ตุลาคม พ.ศ. 2552

Installing PHP5 and Apache on Ubuntu

Installing PHP5 and Apache on Ubuntu

Easy way to get PHP and Apache for running on Ubuntu.


From a command shell, you will run the following commands:

sudo apt-get install apache2

sudo apt-get install php5

sudo apt-get install libapache2-mod-php5

sudo /etc/init.d/apache2 restart


Note that if apache is already installed you can omit the first line. Your web files will now be found in /var/www/

Thanks : howtogeek.com


วันอังคารที่ 13 ตุลาคม พ.ศ. 2552

Detail of Service of Fedora for security

รายละเอียดของแต่ละ service ที่มาจากการติดตั้ง Fedora 9 แบบไม่เลือก Package Group ใดๆ เลย พร้อมคำแนะนำว่าจะปิดหรือเปิด service สำหรับการใช้งาน

NetworkManager
เป็น service ที่สามารถปรับเปลี่ยนคอนฟิกของ network เพื่อให้ต่อเชื่อมกับ network เช่น WiFi ได้อย่างอัตโนมัติ
คำแนะนำ

* ปิด – สำหรับ server
* เปิด – สำหรับ notebook ที่มีการเปลี่ยนที่ใช้งานเป็นประจำ

acpid
เป็น service สำหรับตรวจสอบสถานะของเครื่อง โดยจะใช้ได้สำหรับ BIOS บางรุ่น วิธีทดสอบง่ายๆ คือเข้าไปดูใน /proc/acpi/ แล้วใช้คำสั่ง cat ดูไฟล์ต่างๆ ว่าสามารถตรวจสอบสถานะของอุปกรณ์ได้หรือไม่
คำแนะนำ

* เปิด – สำหรับเครื่องที่ตรวจสอบสถานะได้
* ปิด – ถ้าเราไม่สนใจตรวจสอบ

anacron
การปิด/เปิด บ่อยๆ อาจทำให้ crontab ที่ตั้งไว้ไม่สามารถทำงานได้เลย เช่นโดยดีฟอลต์แล้วจะมี crontab รันอยู่ทุกวันเวลา 4:02 AM แต่ถ้าเราไม่ได้เปิดเครื่องเวลานี้ crontab นี้ ก็จะไม่ถูกรันเลย
คำแนะนำ

* เปิด – สำหรับ notebook, desktop ที่มีการปิด/เปิด อยู่เรื่อยๆ
* ปิด – สำหรับ server ที่เปิดเครื่องตลอดเวลา

atd
เป็น service สำหรับการตั้งเวลาในการรันโปรแกรมได้ ซึ่งตามประสบการณ์ส่วนตัวของผมแล้ว แทบไม่เคยใช้เลย
คำแนะนำ

* ปิด – ยกเว้นมีคนต้องการใช้จริงๆ

avahi-daemon
ใช้สำหรับหาอุปกรณ์เช่น printer, scanner ที่เชื่อมอยู่โดยอัตโนมัติ
คำแนะนำ

* ปิด – เวลาจะใช้อุปกรณ์ แล้วค่อยคอนฟิกเองดีกว่า

bluetooth
สำหรับเชื่อมต่อกับ bluetooth
คำแนะนำ

* ปิด – ยกเว้นต้องการใช้งาน

capi
สำหรับต่อเชื่อมอุปกรณ์ประเภท ISDN
คำแนะนำ

* ปิด

cpuspeed
เป็นการปรับความเร็วของ CPU ตามการใช้งาน
คำแนะนำ

* ปิด – สำหรับ server
* เปิด – สำหรับ notebook เพื่อการประหยัดไฟ

crond
เป็น service สำหรับการตั้งเวลาในการรันโปรแกรมต่างๆ จำเป็นต้องรันทุกเครื่อง
คำแนะนำ

* เปิดเท่านั้น

cups
สำหรับต่อเชื่อมกับ printer ไม่ว่าจะเป็นแบบต่อโดยตรง หรือสั่งผ่าน network
คำแนะนำ

* ปิด – ยกเว้นต้องการใช้งาน printer เช่น สั่งพิมพ์งานจากโปรแกรมที่รันอยู่ใน Linux

dund
เป็นโปรแกรมที่ทำให้สามารถสั่ง dial-up ได้ผ่านอุปกรณ์ Bluetooth
คำแนะนำ

* ปิด

gpm
ทำให้เราสามารถใช้ mouse ผ่านหน้าจอ console โดยตรงของเครื่องได้ เช่น copy, paste ไม่เกี่ยวกับใช้งาน mouse ผ่าน X Window หรือใช้งานผ่านโปรแกรมที่เรา Secure Shell เข้าไป
คำแนะนำ

* ปิด

haldaemon
ตรวจสอบสถานะของอุปกรณ์
คำแนะนำ

* เปิด

ip6tables
เป็น iptables firewall ที่รองรับ IPv6
คำแนะนำ

* ปิด – ไว้ IPv6 ใช้งานอย่างแพร่หลายแล้ว ค่อยมาว่ากันใหม่

iptables
ทำหน้าที่เป็น firewall
คำแนะนำ

* เปิด – โดยดีฟอลต์แล้ว จะอนุญาต เฉพาะ ping หรือ Secure Shell เข้ามายังเครื่องเราเท่านั้น แต่จากเครื่องเราสามารถออกไปข้างนอกได้หมด

irda
รองรับพอร์ต Infrared
คำแนะนำ

* ปิด

irqbalance
เพิ่มประสิทธิภาพในการทำงานสำหรับเครื่องที่มี multiprocessor ซึ่งรวมทั้ง multi-core ด้วย
คำแนะนำ

* เปิด – ยกเว้นเครื่องจะเก่ามากเป็นแบบ CPU เดียว

isdn
รองรับอุปกรณ์ ISDN
คำแนะนำ

* ปิด

mdmonitor
ตรวจสอบสถานะของ Software RAID ซึ่งไม่รวมถึง Hardware RAID
คำแนะนำ

* ปิด – ยกเว้นในเครื่องมีคอนฟิกฮาร์ดดิสก์เป็นแบบ Software RAID

messagebus
สำหรับส่งข้อมูลระหว่างโปรแกรม
คำแนะนำ

* เปิด

microcode_ctl
สำหรับปรับปรุงค่าใน CPU Intel เท่านั้น
คำแนะนำ

* เปิด – สำหรับ CPU Intel

multipathd
รองรับการเชื่อมต่อกับ Multi-path Storage Device พร้อมๆ กันหลายเครื่องได้
คำแนะนำ

* ปิด – ยกเว้นมีการเชื่อมต่อกับอุปกรณ์ประเภทนี้

netconsole
สำหรับส่ง console logging ผ่าน network
คำแนะนำ

* ปิด

netfs
เป็น service สำหรับใช้งานดิสก์ (mount) ผ่านทาง network ไม่ว่าจะเป็น NFS, Samba
คำแนะนำ

* ปิด

netplugd
ตรวจสอบและเปลี่ยนค่าคอนฟิกของ network interface เมื่อมีการเปลี่ยนแปลงสถานะ
คำแนะนำ

* ปิด

network
คอนฟิกค่า IP Address, Subnet mask และอื่นๆ สำหรับการเชื่อมต่อกับ network
คำแนะนำ

* เปิดเท่านั้น – ยกเว้นคุณต้องการให้เครื่องอยู่อย่างโดดเดี่ยว (standalone) ไม่คุยกับใคร

nfs
nfslock
เป็น service เพื่อให้สามารถใช้งานดิสก์ผ่านทาง network แบบ NFS ได้
คำแนะนำ

* ปิด – ยกเว้นเมื่อต้องการใช้งาน

nscd
เก็บค่าสำรอง (cache) สำหรับข้อมูลเช่น password ในการใช้งาน NIS, LDAP
คำแนะนำ

* ปิด

pand
รองรับอุปกรณ์ bluetooth
คำแนะนำ

* ปิด

pcscd
มีไว้สำหรับรองรับอุปกรณ์ประเภท Smart Card ที่ต่อเชื่อมกับเครื่องโดยตรง
คำแนะนำ

* ปิด

psacct
เก็บข้อมูลการใช้งาน process ว่าผู้ใช้งาน ใช้คำสั่ง อะไรบ้าง เมื่อเวลาเท่าไร โดยถ้ารัน service นี้แล้ว เราสามารถใช้คำสั่ง lastcomm เพื่อดูข้อมูลย้อนหลังได้
คำแนะนำ

* ปิด – ยกเว้นมีนโยบายในการตรวจสอบจริงๆ

rdisc
ไว้สำหรับค้นหา router ที่ต่อเชื่อมกับ network โดยอัตโนมัติ
คำแนะนำ

* ปิด – แล้วคอนฟิกเองดีกว่า

restorecond
เป็น service สำหรับตรวจสอบสถานะและปรับปรุงคอนฟิกของ SELinux
คำแนะนำ

* เปิด – ถ้าคุณตัดสินใจใช้ SELinux

rpcbind
ทำหน้าที่จัดการโปรแกรม NFS, NIS เหมือนกับ portmap
คำแนะนำ

* ปิด

rpcgssd
rpcidmapd
rpcsvcgssd
เป็น service สำหรับ NFSv4
คำแนะนำ

* ปิด

rsyslog
เป็นโปรแกรมที่ใช้แทนที่ syslog สำหรับเก็บ log ของเครื่อง
คำแนะนำ

* เปิดเท่านั้น

saslauthd
รองรับโปรแกรมที่ใช้แบบ SASL เช่นโปรแกรมประเภท Mail Server
คำแนะนำ

* ปิด – แนะนำให้ปิดไว้ก่อน ถ้าจะคอนฟิก Mail Server แล้วค่อยมาเปิดกันอีกที

sendmail
โดยคอนฟิกที่มาตอนติดตั้ง จะทำหน้าที่เป็น Mail Server แต่ใช้งานเฉพาะในเครื่องเท่านั้น (localhost, 127.0.0.1) ไม่รองรับการเชื่อมต่อจากเครื่องอื่นๆ บางคนก็แนะนำให้เปิดไว้ เพราะจะมี log บางอย่างเช่น จาก crontab ส่งไปยัง root แต่ถ้าคุณไม่สนใจ log พวกนี้ ก็ปิดไปได้เลย
คำแนะนำ

* ปิด

smartd
มีไว้สำหรับตรวจสอบสถานะเช่นอุณหภูมิของฮาร์ดดิสก์ได้ แต่ดิสก์บางรุ่นก็ไม่รองรับ หรืออาจมีปัญหาในการรัน service นี้ได้
คำแนะนำ

* เปิด – สำหรับเครื่องที่ตรวจสอบสถานะได้ แล้วไม่มีปัญหาในการรัน

sshd
เป็น service ที่ทำให้เราสามารถที่จะ remote login แบบ Secure Shell เข้าไปในเครื่องได้ โดยใช้โปรแกรมเช่น PuTTY
คำแนะนำ

* เปิด – สำหรับ server
* ปิด – สำหรับ notebook, desktop ที่ใช้งานส่วนตัว และไม่ต้องการให้เครื่องอื่น remote เข้ามาได้

udev-post
ใช้ตรวจสอบ แก้ไข คอนฟิกของอุปกรณ์ที่มีการเปลี่ยนแปลงได้
คำแนะนำ

* เปิด

winbind
ทำงานร่วมกับ Samba File Sharing
คำแนะนำ

* ปิด

wpa_supplicant
เป็น service เพื่อรองรับการเชื่อมต่อกับ Wireless แล้วมีการใช้งานแบบ WPA
คำแนะนำ

* ปิด – สำหรับเครื่องที่ไม่ได้ใช้ Wireless ในการเชื่อมต่อ network

ypbind
ทำให้เครื่องเป็น NIS Client
คำแนะนำ

* ปิด


Thanks : spalinux.com

วันศุกร์ที่ 9 ตุลาคม พ.ศ. 2552

DNS Server On Fedora Core 5

การติดตั้ง DNS Server ด้วย Fedora Core 5

การติดตั้ง DNS Server เพื่อใช้งานในเครือข่ายองค์กร และเครือข่ายอินเตอร์เน็ต ....

การติดตั้ง DNS Server ด้วย Fedora Core 5

1. ตรวจสอบ BIND packet ด้วยคำสั่ง ดังตัวอย่างนี้

[ root@kk ~ ]# rpm -qa bind
bind-9.3.2-4.1

ในการทดลองนี้ ได้ติดตั้งโปรแกรม BIND ไว้แล้วคือ bind-9.3.2-4.1 ซึ่งเป็นเวอร์ชั่น 9.3.2-4.1

2. หากยังไม่ได้ติดตั้งโปรแกรม BIND สามารถดาวน์โหลดได้ที่ http://fedora.redhat.com/download/ ซึ่งต้องดาวน์โหลดเป็นไฟล์ rpm และเป็น Fedora Core 5 หรือสูงกว่า เมื่อดาวน์โหลดเสร็จแล้ว ทำการติดตั้งด้วยคำสั่ง ดังตัวอย่างนี้

[ root@kk ~ ]# rpm -ivh bind-9.3.2-4.1.rpm

3. เพิ่มชื่อโดเมน และกลุ่ม IP address ที่ต้องการ ลงไปในไฟล์ named.conf ดังตัวอย่างนี้

3.1 ใช้คำสั่ง vi เพื่อแก้ไขไฟล์ named.conf ดังตัวอย่างนี้

[ root@kk ~ ]# vi /etc/named.conf

3.2 กดปุ่ม insert หรือ กด i เพื่อแทรกและแก้ไขข้อความ

3.3 จากนั้นเพิ่มกลุ่มโดเมนและ กลุ่มไอพีแอดเดรส ดังตัวอย่างนี้

zone "kk.koogle.com" IN {
type master;
file "koogle.com.zone";
allow-update { none; };
};

zone "0.168.192.in-addr.arpa" IN {
type master;
file "192.168.0.zone";
allow-update { none; };
};

3.4 บันทึกไฟล์ named.conf ด้วยคำสั่ง ดังนี้

3.4.1 กดปุ่ม Esc

3.4.2 ตามด้วยเครื่องหมาย : และ wq!

3.5 สร้างไฟล์ ossthailand.com.zone และไฟล์ 192.168.0.zone ดังตัวอย่างนี้

3.5.1 เข้าไปยังไดเรคเทอรี่ /var/named/chroot/var/named ดังตัวอย่างนี้

[ root@kk ~ ]# cd /var/named/chroot/var/named/

3.5.2 สร้างไฟล์ koogle.com.zone โดยการก๊อบบี้จากไฟล์ localhost.zone ดังตัวอย่างนี้

[ root@kk named ]# cp localhost.zone koogle.com.zone

3.5.3 สร้างไฟล์ 192.168.0.zone โดยการก๊อบบี้จากไฟล์ localhost.zone ดังตัวอย่างนี้

[ root@kk named ]# cp localhost.zone 192.168.0.zone

3.6 แก้ไขไฟล์ koogle.com.zone ดังตัวอย่างนี้

$TTL 86400
@ IN SOA kk.koogle.com. root.kk.koogle.com (
2007022201 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

IN NS kk.koogle.com
koogle.com. IN NS kk.koogle.com
koogle.com. IN MX 5 mail.koogle.com

kk IN A 192.168.0.7
data IN A 192.168.0.1

www IN CNAME kk
ftp IN CNAME kk

3.7 แก้ไขไฟล์ 192.168.0.zone ดังตัวอย่างนี้

$TTL 86400
@ IN SOA kk.koogle.com. root.kk.koogle.com. (
2007022201 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

IN NS kk.koogle.com

1 IN PTR data.koogle.com
7 IN PTR kk.koogle.com

3.8 เปิดการใช้งานโปรแกรม BIND ด้วยคำสั่ง ดังตัวอย่างนี้

[ root@kk named ]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]

3.9 ทดสอบ Forward mapping ด้วยโปรแกรม BIND โดยคำสั่ง dig ดังตัวอย่างนี้

[ root@kk ~ ]# dig kk.koogle.com

3.9.1 โดยแสดงรายการดังนี้

; <<>> DiG 9.3.2 <<>> kk.koogle.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55458
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;kk.koogle.com. IN A

;; ANSWER SECTION:
kk.koogle.com. 86400 IN A 192.168.0.7

;; AUTHORITY SECTION:
koogle.com. 86400 IN NS kk.koogle.com.koogle.com.

;; Query time: 4 msec
;; SERVER: 192.168.0.7#53(192.168.0.7)
;; WHEN: Tue Mar 6 00:55:10 2007
;; MSG SIZE rcvd: 85

3.10 ทดสอบการทำงานโปรแกรม BIND ด้วยคำสั่ง nslookup ดังตัวอย่างนี้

[ root@kk ~ ]# nslookup
> kk.koogle.com <------- ใส่ชื่อโดเมนที่ต้องการตรวจสอบ
Server: 192.168.0.7
Address: 192.168.0.7#53
Name: cs.ossthailand.com
Address: 192.168.0.7


Thanks : kom.homelinux.org

วันพฤหัสบดีที่ 8 ตุลาคม พ.ศ. 2552

Zimbra Collaboration Mail Server



#การเตรียมความพร้อม

#add HOST record ของ zimbra server ใน DNS --> mail.example.com
#add MX record ของ zimbra server ใน DNS

#Hardware
#Memory Minimum 1GB
#Harddisk Minimum 5GB
#Linux OS

#Download Zimbra Installation Package กันก่อนครับ
#ที่นี่ http://www.zimbra.com/community/downloads.html
#ก็แล้วแต่ว่า OS เป็นอะไรของผมเป็น CenOS5 x86_64 ครับเลยใช้ของ Redhat ครับ
#เปิด terminal
#root user
wget -c http://h.yimg.com/lo/downloads/5.0.16_GA/zcs-5.0.16_GA_2921.RHEL5_64.20090429051405.tgz
#รอ download ให้เสร็จพักใหญ่ ~ 472MB
tar zxvf zcs-5.0.16_GA_2921.RHEL5_64.20090429051405.tgz
cd zcs-5.0.16_GA_2921.RHEL5_64.20090429051405

#Remove MTA Service ก่อนเลยครับ Redhat/CentOs จะใช้ sendmail
service sendmail stop #stop sendmail service
chkconfig --del sendmail #remove sendmail service

#เริ่มติดตั้ง
# --platform-override เป็นการบังคับให้ติดตั้งกับ CentOS ได้ครับ
./install.sh --platform-override
#... จะมี error เกี่ยวกับ library dependency compat-libstdc++-296 compat-libstdc++-33 libtool-ltdl ประมาณนี้ต้องติดตั้ง package เพิ่มเติม
yum install -y compat-libstdc++-296 compat-libstdc++-33 libtool-ltdl
#ลองอีกครั้ง
./install.sh --platform-override
#ตอบคำถามตามที่ installer แจ้งมา ผมใช้ตาม default เลยครับ
#Install zimbra-ldap [Y]
#Install zimbra-logger [Y]
#Install zimbra-mta [Y]
#Install zimbra-snmp [Y]
#Install zimbra-store [Y]
#Install zimbra-apache [Y]
#Install zimbra-spell [Y]
#Install zimbra-proxy [N]

#You appear to be installing packages on a platform different
#than the platform for which they were built

#This platform is CentOS5
#Packages found: zimbra-core-5.0.16_GA_2921-RHEL5.20090429051405.x86_64.rpm

#This may or may not work

#Install anyway? [N] Y

#The system will be modified. Continue? [N] Y

#จะมี Menu แสดงรายละเอียด config ต่างๆสิ่งที่ต้องแก้ไขคือ
#Time zone
#Admin password
#แล้ว apply รอจนเสร็จ

#archive tools support
yum install unrar arj unarj arc lha cabextract zoo lzop freeze tnef

#เปิด firewall
#root user
vim /etc/sysconfig/iptables
#webmail http port
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
#admin port
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 7071 -j ACCEPT
#webmail https port
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT

#restart iptables
service iptables restart

#เรียบร้อยครับสามารถใช้งานได้ ด้วย browser เพื่อ setup ต่อ
#Admin
https://mail.example.com:7071
#ที่เหลือก็แล้วแต่ครับว่ากันเองได้ลย

----------------------------------------------------------------------------------------------------------------------
#การ relay e-mail ไปที่ ISP เพื่อให้ส่ง mail ออกไปภายนอกได้
#zimbra user
su - zimbra
zmprov ms mail.example.com zimbraMtaRelayHost relay.your-isp-smtp.com
echo relay.your-isp-smtp.com ispusername:isppassword > /opt/zimbra/conf/relay_password
postmap hash:/opt/zimbra/conf/relay_password
postconf -e smtp_sasl_password_maps=hash:/opt/zimbra/conf/relay_password
postconf -e smtp_sasl_auth_enable=yes
postconf -e smtp_cname_overrides_servername=no
postconf -e smtp_use_tls=yes
postconf -e smtp_sasl_security_options=noanonymous
postfix reload

#ติดตั้ง fetchmail เพื่อดึง mail จากภายนอก
#root user
chown zimbra:zimbra /opt/zimbra
#zimbra user
su - zimbra
#สร้าง .fetchmailrc ไว้ที่ /opt/zimbra/

vim .fetchmailrc
### DOMAINPOP SETTING ###
set no bouncemail
set postmaster postmaster@example.com
set logfile /opt/zimbra/extlog/fetchmailrc.log
poll pop3.your-isp.com with protocol POP3, with options uidl
localdomains example.com
no dns
envelope "Envelope-to"
user "pop3user" there with password "pop3password" is *
here
with options rewrite fetchall

#สร้าง fetchmail log file
mkdir /opt/zimbra/extlog/
touch /opt/zimbra/fetchmailrc.log

#root user
#add fetchmail cronjob
crontab -e -u zimbra
# add MAILTO at 1 st line in crontab 's zimbra file
MAILTO=admin@example.com
# add this last line ดึงทุกๆ 3 นาที
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * fetchmail -v -v > /dev/null 2>&1

#logrotate add /etc/logrotate.d/zimbra
/opt/zimbra/extlog/fetchmailrc.log {
daily
missingok
notifempty
create 0660 zimbra zimbra
compress
size 10240k
rotate 7
}

#zimbra user
su - zimbra
#enable http/https
zmtlsctl both # as zimbra

#zimlet deploy
zmzimletctl deploy /opt/zimbra/zimlets-extra/com_zimbra_collector.zip
zmzimletctl deploy /opt/zimbra/zimlets-extra/com_zimbra_contactcleaner.zip
zmzimletctl deploy /opt/zimbra/zimlets-extra/com_zimbra_birthdayreminder.zip
zmzimletctl deploy /opt/zimbra/zimlets-extra/com_zimbra_dnd.zip
zmzimletctl deploy /opt/zimbra/zimlets-extra/com_zimbra_email2doc.zip
zmzimletctl deploy /opt/zimbra/zimlets-extra/com_zimbra_emailreminder.zip
zmzimletctl deploy /opt/zimbra/zimlets-extra/com_zimbra_coloredemails.zip

#add users
zmprov createAccount mailuser@example.com userpassword displayName 'Firstname Surname' givenName Firstname sn Surname company 'your company'

#สร้าง Distrubitionlist
zmprov cdl everyone@example.com
zmprov cdl list2@example.com
#add user to list
zmprov adlm everyone@example.com mailuser@example.com

#email ailas
zmprov aaa mailuser@example.com mailuseralias@example.com

#List alias
zmprov adla list2@example.com listalias@example.com

#stop zimbra
zmcontrol stop
#start zimbra
zmcontrol start
#เหนื่อย เข้าใช้งานได้แล้ว
http://mail.example.com/zimbra/
#หรือ
https://mail.example.com/zimbra/

#แหล่งข้อมูลที่สำคัญให้ศึกษา
http://wiki.zimbra.com/index.php?title=Category:Installation


Thanks : นายเทิ่ง

วันอังคารที่ 29 กันยายน พ.ศ. 2552

Installation of Linksys WRT54GL And D-link DWL-P200

บทความสำหรับ: ผู้ที่มีความรู้เกี่ยวกับระบบเครือข่ายในระดับเบื้องต้นถึงปานกลาง (v1.1)
โดย วิทวัส โฉมประเสริฐ, ศุภสิทธิ์ ศิริพานิชกร


คำถาม

1. ถ้าต้องการเชื่อมต่ออุปกรณ์ Wireless Access Point เพื่อกระจายสัญญาณไร้สาย แต่มีอุปสรรคในเรื่องของการติดตั้งแหล่งจ่ายไฟฟ้า ต้องทำอย่างไร ?

คำตอบ

หลาย ท่านที่มีประสบการณ์ในการติดตั้งอุปกรณ์ Wireless Access Point ที่ไม่ได้รองรับ PoE เช่น Linksys WRT54GL เพื่อกระจายสัญญาณไร้สาย ภายในบ้านพักอาศัย อาคารสำนักงาน หรืออพาร์ทเมนท์ ในจุดหรือบริเวณที่ไม่ได้ติดตั้งแหล่งจ่ายไฟฟ้าเอาไว้ ทำให้ต้องติดตั้งสายนำสัญญาณ (สายแลน) + สายไฟฟ้าและปลั๊กไฟฟ้าใหม่พร้อมกันทั้งคู่ สิ้นเปลืองเวลาและค่าใช้จ่ายค่อนข้างสูง

อีกทั้งในกรณีที่เป็นการ ใช้งานประเภทภายนอกอาคารซึ่งจะพบปัญหาเช่นเดียวกัน เพราะจำเป็นที่จะต้องติดตั้ง Wireless Access Point + เสาอากาศ ณ ภายนอกอาคาร ซึ่งไม่มีการติดตั้งแหล่งจ่ายไฟฟ้าเอาไว้ ทำให้บางท่านแก้ปัญหาโดยการเพิ่มความยาวของสายนำสัญญาณสูญเสียต่ำ (Low-loss Cable) ที่ต่อกับเสาอากาศแบบภายนอกให้มากขึ้น เพื่อให้ Wireless Access Point สามารถติดตั้งใกล้กับปลั้กไฟฟ้าให้มากที่สุด แต่ผลกระทบที่เกิดขึ้นคือความยาวของสายนำสัญญาณ (Low-loss Cable) ที่เพิ่มขึ้นจะทำให้กำลังส่ง (Transmission Power) ที่ส่งผ่านสายนำสัญญาณลดลงในอัตราส่วนโดยประมาณ 0.8 dB ต่อเมตร (เมื่อใช้สายแบบ HDF-200 พร้อมหัวต่อ) ซึ่งส่งผลกระทบโดยตรงต่อระยะทางในการรับ-ส่งสัญญาณไร้สายที่ได้


ดัง นั้นบทความนี้จะเป็นวิธีการติดตั้งอุปกรณ์จ่ายไฟฟ้าผ่านสายแลน หรือ Power Over Ethernet (POE) ซึ่งเป็นอุปกรณ์ที่ใช้สำหรับจ่าย-รับไฟฟ้าผ่านสายแลน โดยจะประกอบไปด้วย 2 ส่วน คือ

  1. อุปกรณ์ต้นทางเพื่อส่งข้อมูลพร้อมกับจ่ายไฟฟ้า เรียกว่า 'Power Injector'
  2. อุปกรณ์ปลายทางเพื่อแยกสัญญาณของข้อมูลและไฟฟ้าออกมา เรียกว่า 'Power Splitter'


รูปภาพ

รูป การติดตั้งอุปกรณ์จ่ายไฟฟ้าผ่านสายแลน D-Link DWL-P200 ภายในอาคารชั้นที่ 1 ไปยังชั้นที่ 4 เพื่อกระจายสัญญาณไร้สาย


ข้อมูลเบื้องต้นก่อนการติดตั้ง
  1. อุปกรณ์ที่นำมาใช้งานกระจายสัญญาณไร้สาย Linksys WRT54GL - Wireless-G Broadband Router ใช้ระดับไฟฟ้า 12VDC/1A
  2. อุปกรณ์ที่นำมาใช้ในการจ่ายไฟฟ้าผ่านสายแลน D-Link DWL-P200 สามารถจ่ายไฟฟ้าให้กับอุปกรณ์ได้ 2 ระดับ
    • 12VDC/1A
    • 5VDC/2.5A

ขั้นตอนที่ 1 ติดตั้งส่วนจ่ายไฟฟ้าต้นทาง DWL-P200 (Power Injector)

  1. เชื่อม ต่ออุปกรณ์จ่ายไฟฟ้าต้นทาง D-Link DWL-P200 (Power Injector) เข้ากับระบบเครือข่ายที่ต้องการจะเชื่อมต่อ โดยเชื่อมต่อจากสวิทช์เข้าที่พอร์ท 'LAN IN' และจ่ายไฟฟ้าระดับ 48VDC/400mA จาก Power Adapter ของ DWL-P200 ตามมาตรฐาน IEEE802.3af เข้าที่พอร์ท 'PWR'

    รูปภาพ

    รูป การเชื่อมต่อส่วนต้นทาง จากสวิทช์เข้าที่พอร์ท 'LAN IN' และจ่ายไฟฟ้าระดับ 48VDC/400mA เข้าที่พอร์ท 'PWR'


    รูปภาพ

    รูป D-Link DWL-P200 (Power Injector) ด้านหน้า และด้านหลัง


ขั้นตอนที่ 2 ติดตั้งส่วนจ่ายไฟฟ้าปลายทาง DWL-P200 (Power Splitter)

  1. ปรับ ระดับการจ่ายไฟฟ้าของอุปกรณ์ปลายทาง D-Link DWL-P200 (Power Splitter) ให้ตรงกับอุปกรณ์ Linksys WRT54GL โดยการปรับสวิทช์แรงดันไฟฟ้าไปที่ตำแหน่ง '12VDC'

    รูปภาพ

    รูป D-Link DWL-P200 (Power Splitter)

  2. เชื่อมต่ออุปกรณ์จ่ายไฟฟ้าปลายทาง D-Link DWL-P200 (Power Splitter) เข้ากับอุปกรณ์ Linksys WRT54GL โดย
    1. เชื่อมต่อจากพอร์ท 'LAN' หรือ 'WAN' ของ Linksys WRT54GL ไปยังพอร์ท 'LAN OUT' ของอุปกรณ์ DWL-P200
    2. เชื่อมต่อสายพอร์ท 'POWER' ของ Linksys WRT54GL ไปยังแหล่งจ่ายไฟฟ้าจากพอร์ท 'DC OUT' ของอุปกรณ์ DWL-P200

    รูปภาพ

    รูป การเชื่อมต่อส่วนปลายทาง อุปกรณ์ Linksys WRT54GL กับอุปกรณ์ D-Link DWL-P200 (Power Splitter)




ขั้นตอนที่ 3 เชื่อมต่อระหว่างส่วนต้นทางและส่วนปลายทาง

  1. เชื่อมต่อสายแลนระหว่างส่วนต้นทางและส่วนปลายทาง

    รูปภาพ

    รูป การเชื่อมต่อส่วนต้นทาง และส่วนปลายทาง อุปกรณ์ D-Link DWL-P200 (Power Injector) กับอุปกรณ์ D-Link DWL-P200 (Power Splitter)


    เพียงเท่านี้เป็นอันเสร็จเรียบร้อย ท่านสามารถการะจายจุดส่งสัญญาณไร้สายได้โดยไม่ต้องเดินสายไฟฟ้าเพิ่มเติมได้อย่างสะดวกสบายครับ


รายการอุปกรณ์ในการติดตั้ง
1. Linksys WRT54GL Wireless-G Broadband Router with Linux
2. D-Link DWL-P200 Power Over Ethernet Adapter (Injector + Splitter) 5VCD/2.5A or 12VCD/1A

Thanks : sys2u.com