How to start a script by root permission at boot time on Ubuntu server 8.10.

Today my Opmanger server is down, I start it again but my service doesn’t start by automatic at boot time. So I need to start it by root permission at startup time. And this is my solution.

1. Write your script for start a service

#!/bin/bash
echo "Start my service!!!";
cd /path/of/my/script/
./run_my_script.sh

Continue reading

มาทำความรู้จักกับไฟล์ System ext4 กันหน่อยมั๊ย

แอบไปอ่านเจอมาว่าตัว Ubuntu 9.04 ตัวใหม่ที่จะออกมัน Support ไฟล์ระบบแบบ ext4 ก็เลยเกิดคำถามขึ้นในใจว่า มันดีกว่า ext3 ยังไง คุณสมบัติเด่นๆ มีอะไรบ้าง ว่าแล้วผมก็ไปเริ่มที่ wikipedia ก็ไปเจอคำตอบมา ว่าแล้วก็ลองดูกันครับว่ามีอะไรน่าสนใจบ้าง

Continue reading

How to install DNS server on Ubuntu 8.04.1 .

ได้รับมอบหมายให้มาจัดการกับ Service ต่างๆ ที่ run อยู่ ณ ขณะนี้ใน office โดยพี่เค้าไม่อยากให้ user ต้องมานั่งจำ Service ต่างๆ เป็น IP Address แต่ให้จำเป็นชื่อของ Sub Domain เอา เช่น mail.aoddy.com, backup.aoddy.com, twiki.aoddy.com ฯลฯ โดยเงื่อนไขก็ Basic ทั่วๆไป คือต้องการให้มี DNS Service ที่เป็น Internal ข้างนอกไม่สามารถที่จะเข้ามา Access ได้

คราวนี้ก็มาดูว่า… รายละเอียดของ Network ผมเป็นอย่างไรบ้าง

  1. มี Internal Network เป็น 192.168.0.0/24
  2. IP Address ของ DNS คือ 192.168.0.2 และให้ชื่อเครื่อง ว่า ns.aoddy.com
  3. บนเครื่อง DNS มีจะทำเป็น Virtual Hosting ด้วย
  4. มี Service ที่ต้องใช้ใน Virtual Hosting นี้ก็คือ wwwin.aoddy.com, twiki.aoddy.com และ trac.aoddy.com

Continue reading

How to fix MAC Address with IP Address on DHCP server.

Today, I would like to monitor my internet network bandwidth. When my internet network is slow I often have questions from my boss “Why my internet network is slow, who are using a lot of internet bandwidth?”. I cannot answer these questions because I don’t have informations of current network status.

First step, I think I should know which IP Address is using a lot of internet bandwidth and second step I should know who is owner that IP Address.

The answer of the first step , I will use ntop software to answer this question. For the second step, I will fix all MAC Address of Laptop’s wireless card with IP Address on a DHCP Server. And this is my solutions :

Continue reading