Tutorial

การสอนแบบสั้นๆ

nBind Installation

Submitted by joezine on Wed, 01/07/2009 - 10:09

ถ้าใช้ DNS ของ CS Loxinfo, TRUE, KSC, Inet หรือ JI-Net ถ้าเปิดเว็บที่ไม่มีอยู่จริง DNS จะทำการ Redirect ไปหน้าเว็บของนามไทย (คล้าย NIPA) เหตุที่เป็นเช่นนี้แทนที่จะขึ้นว่า “Error 404 : Page not found” เพราะได้ติดตั้ง nBind เข้าไปที่ DNS (พัฒนาโดยนามไทย) วิธีการติดตั้งง่ายมาก โดยติดตั้ง nBind เข้าไปที่ DNS Cache ทุกเครื่อง

Download nBind

#wget http://download.namathai.com/nBIND/nBIND.htm

Tarball ออกมา (ใช้ RedHat ES4) จะได้ Folder 5 Folder (bin, include, lib, sbin, script, share)

#tar xzf nbind_9.4.2_P1_080711.redhatES4.tar.gz
Tags: | »

Auto Root Login

Submitted by joezine on Tue, 01/06/2009 - 10:22

I wrote how to automatically authenticate with user via public key authentication. But I still type root’s password. Right now, I don’t type it again. Here is how to automatically authenticate with root via ssh.

Firstly, logged in as root

#vi /etc/sudoers

Insert user in the last line

surasitl        ALL=(ALL) NOPASSWD: ALL

Then, save and exit.

Secondly, logged out root.

$vi .bash_profile

Then insert “sudo su -” into the last line

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
sudo su -

Finishly, save and exit.

Tags: | »

How to Clone Linux

Submitted by joezine on Thu, 12/04/2008 - 12:47

มีแผนการจะย้ายข้อมูล (รวมถึง OS) จากเครื่องหนึ่งสู่อีกเครื่องหนึ่ง แต่หากต้อง Install ใหม่ทั้งหมดจะต้องเสียเวลามานั่ง Config ค่าต่างๆใน OS ทั้ง เช่น iptables, Bind, User Authentication เลยคิดว่า Clone ทั้งหมดมาเลยจะง่ายกว่า

โดยส่วนตัวยังไม่มีความรู้เรื่อง Linux มาก แต่โชคดีที่ได้พี่สัญสอน ในสถานการณ์ตอนนี้มีอยู่ 2 เครื่อง คือ (1) เครื่อง Cache DNS (ใช้ชื่อว่า A - 192.168.1.1) และ (2) เครื่องเปล่า (ให้ชื่อว่า B - 192.168.1.2) โดยมีขั้นตอนดังนี้

[1] tar ข้อมูลของ A ทั้งหมด (ต้อง Stop Service ของ Application ที่กำลัง Run อยู่ เช่น Oracle, MySQL, Bind, ฯลฯ เพราะโปรแกรมพวกนี้มีการ Wri

Tags: | »