วันพุธที่ 25 เมษายน พ.ศ. 2555

การติดตั้ง Opensim centos 5.4


ติดตั้ง Mono Repository

เพิ่ม yum repo ของ novell 
cd /etc/yum.repos.d
vi mono.repo

mono.repo 

[mono]
name = novell-mono
baseurl=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/
enabled=1
gpgcheck=0
 

Installing from Mono Repository

yum install mono-core mono-data-sqlite mono-extras libgdiplus

โปรแกรม Yum จะติดตั้ง mono ภายใน /opt/novell/mono, ทำ symbolic link to /usr/bin :

ln -s /opt/novell/mono/bin/mono /usr/bin/mono

Mono ติดตั้งเสร็จ สามารถเช็ค version ของ mono ได้จากคำสั่ง
 
mono -V

Mono JIT compiler version 2.10.2 (tarball Mon Apr 18 18:57:39 UTC 2011)
Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none
        Misc:          debugger softdebug
        LLVM:          supported, not enabled.
        GC:            Included Boehm (with typed GC and Parallel Mark)

เริ่มต้นติดตั้ง opensim server

 download โปรแกรมได้จาก http://opensimulator.org/dist/opensim-0.7.3.1.tar.gz










ขั้นตอนติดตั้ง

หลังจาก download ให้ทำการแตกไฟล์ ไปที่ /opt

 tar xvfz opensim-0.7.3.1.tar.gz -C /opt


ขั้นตอน setting
เข้าไปที่ cd /opt/opensim-0.7.3.1/bin
mono OpenSim.exe














เปิดโปรแกรมครั้งแรก จะมีให้ทำการตั้งค่า

1. region name ชื่อเกาะ
2. region uuid รหัสเกาะ
3. region location พิกัดเกาะ ค่า default 1000,1000
4. ip ภายใน
5. port
6. allow alternate port
7. external host name
8. master avatar uuid รหัส avatar
9. master avatar first name ชื่อแรกของ avatar
10. last name สกุลของ avatar
11. password รหัสผ่าน

การเข้าใช้งาน opensim ผ่าน viewer ของ secondlife








คลิกขวาที่ Second Life Viewer เลือก properties
Taget :"C:\Program Files\SecondLifeViewer\SecondLife.exe" --loginuri http://192.168.7.235:9000/




 



 การเข้าใช้งาน opensim ผ่าน viewer ของ imprudence
 

 




เลือก grid manager













Add New Grid
Grid name : TCU
Login URI : http://192.168.7.235:9000









วันพุธที่ 29 ธันวาคม พ.ศ. 2553

Google Short URL

Google Short URL คือบริการของ Goolde ที่ใช้แปลง Link ที่เป็น URL ทุกแบบ เป็น URL ชนิดสั้นเพื่อใช้แทน URL ยาว ๆ เพื่อความสะดวกในการจดจำ และเพิ่มความสะดวกในการใช้งาน โดยลดจำนวนอักษร และเนื้อที่บนหน้าอินเทอร์เน็ต
http://goo.gl

สำหรับ http://www.thaicyberu.go.th   = http://goo.gl/Xzji

การฟังวิทยุ online โดยใช้โปรแกรม winamp

การฟังวิทยุ online โดยใช้โปรแกรม winamp

1. เปิดโปรแกรม winamp

2. เลือกเมนู File

3. เลือก Play URL…

4. ใส่ URL ของสถานีที่ต้องการรับฟัง

รายการ URL แต่ละสถานี

วันจันทร์ที่ 27 ธันวาคม พ.ศ. 2553

Fail2ban


Fail2ban เป็นโปรแกรมตรวจสอบ log files และปิดกั้นการเชื่อมต่อจาก IP ที่ล็อกอินผิดหลายๆครั้ง โดยสนับสนุน Service หลายตัวเช่น apache, vsftpd, proftpd, postfix, courier smtp, named (DNS),ssl


หลักการทำงานมีดังนี้


โปรแกรม Fail2ban จะตรวจสอบ Log Files เป็นระยะ ว่ามี IP ที่ล๊อคอินเข้าระบบแล้ว Fail ติดๆกัน ครบตามจำนวนที่ตั้งไว้ในไฟล์คอนฟิกหรือไม่ ถ้ามีจะแบน IP หมายเลขนั้นโดยไปกำหนดที่ iptable ให้ Block IP Address เมื่อแบน IP ครบตามกำหนดเวลาที่ตั้งไว้ในไฟล์คอนฟิก Fail2ban จะไปแก้ไข iptable ให้ IP Address นั้นสามารถใช้งานได้ตามเดิม


การ Config สามารถเข้าไปแก้ไขไฟล์ /etc/fail2ban/jail.conf ได้ดังนี้

[DEFAULT]
ignoreip = 127.0.0.1 //กำหนด IP Address ที่ไม่มีการ Ban
bantime = 600 //กำหนดเวลา Ban IP 600 วินาที

maxretry = 3 //กำหนดจำนวนครั้งของการล๊อคอินที่ผิดพลาด
[ssh-iptables]
enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
sendmail-whois[name=SSH, dest=root, sender=fail2ban@thaicyberu.go.th]
logpath = /var/log/secure
maxretry = 3

//Fail2ban สามารถตรวจสอบ Process ของโปรแกรมอื่นได้ด้วย ถ้าต้องการให้ตรวจสอบโปรแกรมใดให้ตั้งค่า enabled = true ตรงโปรแกรมนั้น ตัวอย่างเช่น

[proftpd-iptables] //ตัวอย่างการกำหนดให้ Fail2ban ตรวจสอบ Service Proftpd

enabled = true
filter = proftpd
action = iptables[name=ProFTPD, port=ftp, protocol=tcp]
sendmail-whois[name=ProFTPD, dest=root, sender=fail2ban@thaicyberu.go.th]
logpath = /var/log/secure
maxretry = 3






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

Adito SSL-VPN



SSL VPN (Secure Sockets Layer Virtual Private Network)เป็นการให้บริการเข้าถึงเครือข่ายภายในองค์กรโดยอาศัยเครือข่ายสาธารณะ(public Network)หรือInternet โดยใช้ระบบพิสูจน์ตัวตนก่อนให้บริการ และใช้ระบบการเข้าถึงข้อมูลผ่าน  SSL ซึ่งเป็นมาตรฐานการส่งเอกสารที่เป็นความลับบนระบบ Internet  โดยอาศัยการเข้ารหัส  cryptographic system ระหว่าง Server กับ client ในรูปแบบของ https

การติดตั้ง Opensource Adito SSl VPN

1: ติดตั้ง JRE and Configuring JAVA Environment.
 
download jre จาก http://www.java.com/en/download/index.jsp
แก้ไข /etc/profile 
---------- 
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin
-----------
source /etc/profile      //  update Profile  
java -version             // check java 

2: ติดตั้ง ANT
download http ant จาก http://ant.apache.org/manual/index.html
export PATH=$PATH:apache-ant/bin     // เพิ่ม Path ant
source /etc/profile      // update Profile
ant -version              // check ant 

3: ติดตั้ง Adito

download Adito จาก http://sourceforge.net

การ configure adito :
#ant install
---------------------
Buildfile: build.xml

set-tools:

check-tools:

check-permissions:

install:
[java] Starting installation wizard.........Point your browser to http://ServerName:28080.

[java] Press CTRL+C or use the 'Shutdown' option from the web interface to leave the installation wizard.
----------------------

เปิด browser http://ServerName:28080




ตั้งค่า Admin Password สำหรับผู้ดูแลระบบ
ตั้งค่า Port สำหรับ connect มาจาก Internet






  

ที่ terminal, ถ้าขึ้นลักษณะดังนี้ เป็นเสร็จเรียบร้อย

-------------------------
[java] .
[java] Jun 29, 2009 8:19:53 PM java.util.prefs.FileSystemPreferences$3 run
[java] INFO: Created system preferences directory in java.home.

BUILD SUCCESSFUL
Total time: 3 minutes 17 seconds
---------------------
สั่ง start adito ใหม่ โดยใช้คำสั่ง

#ant start
------------------------
Buildfile: build.xml

create-wrapper-conf:
[copy] Copying 1 file to /opt/adito-0.9.1/conf
[echo] Creating wrapper configuration dynamically

[echo] Java executable: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java
[echo] Wrapper directory: install/platforms/linux/x86

set-tools:

check-tools:

check-permissions:

start:
[exec] Starting Adito...
[echo] Adito started

BUILD SUCCESSFUL
Total time: 0 seconds
---------------------------

ติดตั้ง Adito as linux service, โดยใช้คำสั่ง
#ant install-service


วันอาทิตย์ที่ 10 ตุลาคม พ.ศ. 2553

IP address และ hostname



การกำหนด IP address และ host name
ขั้นตอนการแก้ไข IP และ Host name
/etc/hosts
127.0.0.1      localhost.localdomain localhost
202.29.13.25    Natalie Natalie.thaicyberu.go.th  icecast

/etc/sysconfig/network
NETWORKING = yes
HOSTNAME = Natalie
GATEWAY = 202.29.13.1

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=202.29.13.1
IPADDR=202.29.13.25
NETMASK=255.255.255.0
NETWORK=202.29.13.0
ONBOOT=yes
TYPE=Ethernet

/etc/resolv.conf
nameserver 208.67.222.222     // OpenDNS-1 //
nameserver 208.67.220.220    // OpenDNS-2 //
nameserver 8.8.8.8                  // Google DNS -1 //
nameserver 8.8.4.4                  // GoogleDNS-2 //

สามารถใช้คำสั่ง setup แล้วเลือก Network Configuration เป็นอีกวิธีหนึ่ง เพื่อเข้าแก้ IP Address โดยสามารถเข้าไปแก้ไขแฟ้มต่าง ๆ ให้อัตโนมัติ เสร็จแล้วใช้คำสั่ง  #service network restart

วันพฤหัสบดีที่ 30 กันยายน พ.ศ. 2553

MSN Chat



http://settings.messenger.live.com/Applications/Default.aspx

 
-คลิกเมนู "การตั้งค่าเว็บ" (Web Settings)


----- คลิกอนุญาตให้เว็บไซต์สามารถมองเห็นสถานะของ Messenger และส่งข้อความถึงได้
       (
Allow anyone on the web to see my presence and send me messages.)
----- บันทึก (Save)
-สร้าง (HTMLCreate HTML)
----- เลือกปรับรูปแบบ ขนาดและสี

 

โดยบริการนี้จะมีให้เลือกสามส่วนคือ
หน้าต่าง IM (IM Window) สำหรับให้ระบบสร้าง Code หน้าต่าง MSN ให้ไปติดเว็บ
ปุ๋ม (Button) สำหรับสร้างปุ๋มไว้ให้ไปติดหน้าเว็บ
ไอคอนสถานะ(Status icon) สำหรับแสดง icon สถานะ Online

หลังจากนั้นให้นำ Code ที่ได้ด้านล่างมาแปะ ในหน้าเว็บที่ที่ต้องการ

สำหรับการเปลี่ยนภาษาที่แสดงหน้าต่างที่ไปติดบนเว็บ
หากจะให้เป็นภาษาไทยแก้ messenger.live.com&mkt=th-TH
ภาษาอังกฤษใส่ messenger.live.com&mkt=en-US