A Technical Guy’s Blog


Archive for the ‘Lesson’ Category

Technical Support

Posted by: pin on: 25 Sep, 2008

My customers used to tell me they have problem with their email. This is how they describe their problem:
‘I have some little problem with receiving email…’
This is cracking our head as we need a little bit more info to debug too :)

ADSL Modem Setup for Streamyx with Fixed IP

Posted by: pin on: 05 Sep, 2008

I bought a new Linksys ADSL modem (AM300) to replace the faulty modem came together when I signed up my Streamyx Corporate ADSL package with fixed one fixed IP address.

It was indeed a nightmare. It is definitely not a plug-and-play task. TM’s technician wasn’t turn out too after filing the support ticket. Over the last 24 hours, I called my friends, stranger’s phone number which I found from some don’t-know-what forums, asking their helps. Many articles I found online are not updated and this only add to my confusion and more time to restart my modem with random and unsure settings.

The following are steps which I have confirmed and I really hope that it can help someone out there. I am using Linksys AM300 (yeah again, never listed in the list of Streamyx Supported Modem). Who cares, if you are using Dlink, Aztech or any other ADSL modems - I am sure they work too!

1) Call 1300-88-9515 Streamyx Support (they require some verification like your company address and ROC, etc. I must admit, their call centre are supportive). Request for your username and password. This is crucial, you don’t want to bang on wrong login just in case. My account was registered since year 2005. I am not sure if the new Streamyx Fix IP Package are changed to xxxx@streamyx, but I am sure (confirmed by their call centre) my username is xxxx@tmnet (1001% sure). Also ask for your IP addreses. They will tell you two IP address, with only last digit different. Eg 60.49.166.105 & 60.49.166.106.

2) Unpack your new modem (forget about the bundled quick start CD). Connect your new modem to your PC, instead of the router. For Linksys AM300, enter 192.168.1.1 in your web browser. Use the default login admin/admin to access the web admin. Remember to enable DHCP in your PC, or you will not able to access the web admin.

3) I have circled (in grey) those fields that you need to change. If you are using different modem, please make sure you have chosen PPPOA (Not PPPOE), LLC (not VC), VPI 0 (Must), VCI 35 (Must). Your modem IP is the one with smaller number (in my case, it is 60.49.166.105), and enter Netmask as 255.255.255.252 (if Streamyx gives you 5 fixed IPs, chances you need to modify this).

4) Tricky part now. Make sure you have Operation Mode (or whatever similiar) set as Router (Not Gateway). Also remember to disable NAT. Many online tutorial never explain about this.

If you are not able to access the Web Admin after saving the changes, try disable DHCP in your PC and use 60.49.166.106 (in your case, it would be the IP with bigger number), netmask 255.255.255.252, gateway 60.49.166.105 and DNS (202.188.0.133, 202.188.1.5)

In case you still have any problem, you can call my friend Aiktern (012-7073993). Or you can post your question here, and I will try to see how I can help.

Most recent Dell notebook comes with SATA harddrive and Windows Vista preloaded. For those who wish to install Windows XP over Vista, you might run into problems because your XP CD doesn’t come with SATA driver support.

In other words, you will get an error message of disk can not found when booting your XP installation CD. To fix this,

1. Copy ALL content in your Windows XP CD into your computer
2. Go to Dell Support to download SATA Driver for your notebook model (under Windows XP)
3. Follow this guide to Slipstreaming SATA driver into XP bootable CD using nLite
4. nLite create the new image file burn into a bootable new XP CD with SATA support!

List Of Linux Server Commands

Posted by: admin on: 14 Feb, 2008

List of Commands

Add New User

/usr/sbin/groupadd <groupname>
/usr/sbin/useradd <username> –g <groupname>
chown <username>.<groupname> /path/to/usernamefolder
chmod 755 /path/to/usernamefolder

Set User Password

passwd <yourusername>
<enter new password>
<enter again new password>

Check RPM Status

rpm –q <rpmname>
Eg. rpm –q imap

Extract a .tar File

tar –zxvf <filename>

Manual on a Specific Command

man <command>
Eg. man sendmail

End a Session

Ctrl + Z

./<command>

[root@kuittho /usr]# ./edquota
Specifies that the command edquota is located inside current folder [...]

Configuring Virtual Server As Zope Server

Posted by: admin on: 14 Feb, 2008

Configure Virtual Server as Zope Server

Download current version of Python (2.3.5 or later) from http://www.python.org/download/.
wget –P /usr/src/ http://www.python.org/ftp/python/version/Python-version.tgz

Unpack and install current version of Python (2.3.5 or later). Using the instructions in README.txt.
tar –zxvf /usr/src/Python-version.tgz
cd /usr/src/Python-version
./configure
make
make install

Download current version of Zope (2.7.8 or later) from http://www.zope.org/Products.
wget –P /usr/src/ http://www.zope.org/Products/Zope/version/Zope-version-final.tgz

Download current version of Zope (2.7.8 or [...]

Configuring Virtual Server As Mailman Server

Posted by: admin on: 14 Feb, 2008

Configure Virtual Server as Mailman Server

Check if python is installed
rpm -qa | grep –I python

tar –zxvf mailman-version.tgz

Add Mailman group and user
groupadd mailman
useradd -c “GNU Mailman” -s /sbin/nologin -M -g mailman mailman

Create mailman folder in default prefix /usr/local/mailman
mkdir /usr/local/mailman
cd /usr/local/mailman/
chgrp mailman .
chmod a+rx,g+ws .

Install Mailman from /usr/src/mailman-version
./configure –with-mail-gid=mail –with-cgi-gid=apache
make
make install

Check and fix any permission error
Check file [...]

Configuring Virtual Server As File Server

Posted by: admin on: 14 Feb, 2008

Configure Virtual Server as File Server

In the terminal, type startx to launch the Gnome interface

Enable run level 2, 3, 4 and 5 for Samba service using chkconfig.
chkconfig –level 2 smb on
chkconfig –level 3 smb on
chkconfig –level 4 smb on
chkconfig –level 5 smb on

Install samba-swat rpm that allows web-based administration of Samba service. Set swat in [...]

Backup

Posted by: admin on: 14 Feb, 2008

Backup

We use scp to transfer backup file in each server to a centralized backup server. We need to setup quick login with ssh Client Keys.

Generate a public/private key pair in the centralized backup server
ssh-keygen –t rsa
Just hit Enter when asked, this leave the passphrase empty.
This created two files, ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.

Copy id_rsa.pub to the server [...]

Monitoring

Posted by: admin on: 14 Feb, 2008

Monitoring

Nmap has the ability to test out open ports and discover what version of software is running.
nmap -O -p 1-65535 <host>

Offline Installation

Posted by: admin on: 14 Feb, 2008

Offline Installation

The following steps need to be done for new network environment after offline installation.

/etc/resolv.conf, to add in more DNS server

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=<hostname>

/etc/hosts

127.0.0.1 localhost.localdomain localhost
<IP> <hostname> <hostname in short>

Eg:
203.115.228.142 it-lodge.ywso.com it-lodge

/etc/sysconfig/network-scripts/ifcfg-eth0

Remove BROADCAST=192.168.0.255 and NETWORK=192.168.0.0

/etc/sysconfig/network-scripts/ifcfg-eth1 (if any)

/etc/sysconfig/iptables

Set correct date on both system clock and hardware clock with the following command:
Set the system [...]

Default Setup

Posted by: admin on: 01 Feb, 2008

Default Setup

Run crontab –e to add the following setting:
MAILTO=root
0 6 * * 5 /sbin/shutdown -r now
0 2 1 * * /etc/rc.d/init.d/httpd stop; rm -f /etc/httpd/logs/*; /etc/rc.d/init.d/httpd start

Install info.php in /home/admin/web/php-bin
touch /home/admin/web/php-bin/info.php
vi /home/admin/web/php-bin/info.php
<? phpinfo(); ?>

Install phpMyAdmin in /home/admin/web/php-bin/phpmyadmin
wget –P /home/admin/web/php-bin http://<latest_phpmyadmin>
tar –zxvf /home/admin/web/php-bin/phpMyAdmin-latest.tar.gz
rm /home/admin/web/php-bin/phpMyAdmin-latest.tar.gz
mv phpMyAdmin-latest phpmyadmin
vi phpmyadmin/config.inc.php
$cfg['PmaAbsoluteUri'] = ‘http://<hostname>/php-bin/phpmyadmin/’;
$cfg['Servers'][$i]['auth_type'] = ‘http’;
$cfg['Servers'][$i]['user'] [...]

LogWatch

Posted by: admin on: 01 Feb, 2008

LogWatch

Edit Logwatch configuration file at /etc/log.d/logwatch.conf
Detail = High

Webalizer

Posted by: admin on: 01 Feb, 2008

Webalizer

Webalizer is a web server log file analysis program, which produces usage statistics in HTML format for viewing with a browser. The results are presented in both columnar and graphical format, which facilitates interpretation. Yearly, monthly, daily and hourly usage statistics are presented, along with the ability to display usage by site, URL, referrer, user [...]

CGIWrap

Posted by: admin on: 01 Feb, 2008

CGIWrap

Assume we have main web root directory at /home/admin/web, and we would like to have CGIWrap transparently at the background. The cgi-bin folder is located inside web folder. Please change both the user and group in httpd.conf to apache.

tar -zxvf cgiwrap-version.tar.gz

./configure –with-cgi-dir=web/cgi-bin –with-httpd-user=apache –with-install-dir=/home/<user>/web/cgi-bin

make

make install

Update the httpd.conf file with
ScriptAlias /cgi-bin/ “/home/admin/web/cgi-bin/”
RewriteEngine On
RewriteMap lowercase int:tolower
RewriteRule ^/cgi-bin/(.*) [...]

PHP

Posted by: admin on: 01 Feb, 2008

PHP

PHP is a server-side, cross platform, HTML embedded scripting language. Learn more of PHP from http://www.php.net

You need php-mysql package to connect to a MySQL database. Download and install php-mysql-version.rpm. It is better to install a version of php-mysql that match with your native php and mysql that shipped together with your current Linux software.

Update [...]

MySQL Database Server

Posted by: admin on: 01 Feb, 2008

MySQL Database Server

MySQL database server (http://www.mysql.com) is the world’s most popular open source database. With more than five million active installations, MySQL has quickly become the core of many high-volume, business-critical applications. MySQL has the capabilities to handle most corporate database application requirements with an architecture that is extremely fast and easy to use.

rpm -qa [...]

Apache HTTP Server

Posted by: admin on: 01 Feb, 2008

Apache HTTP Server

The Apache HTTP Server Project (http://httpd.apache.org) is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
Apache has been [...]

Sendmail

Posted by: admin on: 01 Feb, 2008

Sendmail

The sendmail program is installed by default. Type rpm -q sendmail to view sendmail version number.

By default, the date for /etc/mail/*.db is not correct and therefore you need to re-make the *.db file before you can start sendmail properly.
makemap hash /etc/mail/access < /etc/mail/access
makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
makemap hash /etc/mail/domaintable < /etc/mail/domaintable
makemap hash /etc/mail/mailertable < [...]

FTP Server

Posted by: admin on: 01 Feb, 2008

FTP Server

File Transfer Protocol is a way of transferring files over the Internet from one computer to another. You can connect to a FTP server, browse directories and transfer files. Red Hat Linux comes with different or updated version of FTP daemon with each release. Newer versions of Red Hat no longer support the wu-ftpd, [...]

Htaccess

Posted by: admin on: 01 Feb, 2008

Htaccess

htaccess is a way to password protect directories. It can also be used to give user or group specific access to directories.

Now that the directory and its subdirectories are htaccess enabled, you’ll need to setup the actual files.
Create a file in the dir you want to protect called .htaccess
Here’s an example .htaccess file:

AuthUserFile [...]



 

Categories