A Technical Guy’s Blog


Archive for the ‘Server’ Category

Samba Error ‘network path not found’

Posted by: pin on: 13 Nov, 2008

You can find a lot of tutorial on setting up Samba from the Internet. I found this can be of useful for your debugging purpose when you have this error ‘network path not found’.
During setting up, we disabled firewall but still have problem connecting from our Windows desktop to Samba server, until we find that [...]

My First Domain

Posted by: pin on: 10 Sep, 2008

My first domain is it-lodge.com, registered on 1999. Perhaps, I have also registered websitesolution.com.my and could be even earlier, but it was all done and managed by Asia Pacific Net.

One thing I’m sure - PageRank (PR) has really nothing to do with how long a domain name was registered. The website it-lodge.com has PR1 because it was not updated for long.

The challenge of getting it-lodge.com done, mainly because I was required to setup the website and all its pointing to our own web server. It was a Xitami server installed in a Windows platform, sitting on a HP server.

It was all new to me. I used a Public DNS Service called Granite Canyon (I’m happy that I can remember the name still). There are no nice interface for me to edit the zone file in their DNS server. It was all done manually from setting A to MX records.

Then, comes the Xitami server that never seems to work. I configured it in blind. Lucky, the whole projects was funded under the research projects by my mentor, Dr. Lee Yee Loon. He is the head of research of UTHN. It was how I managed to learn all this, with his support.

The IT-Lodge project meant to be a Research Portal to bridge researchers and industrial people. We don’t have Blog those days. But, Dr. Lee’s ideas of sharing inspiring us until today.

Is Your Website Loading Slow?

Posted by: pin on: 15 Aug, 2008

If your web hosting costs you around RM200-300 a year, chances are that it’s a shared basis. Perhaps I’m wrong. Dividing the yearly price to 12 months, I doubt how an average of RM20 monthly web hosting fee is enough to cover the cost of server hardware, bandwidth, co-location and even the unlimited mailbox account offered. That is barely enough for a McD set.

Where goes wrong then?

Forget about the page-long list of feature of those web hosting plan. Look for ‘Monthly data transfer’ and ‘No of website per server’. If you can find them, chances that you are in the right direction. Vaguely still, both offering tricky measurement which sounds to me like finding a virgin in a brothel.

It would be easier to put it this way

1) First offer allows you to stay in a hotel for X amount of days in a month. But didn’t tell you the fact that another 100 people are getting the same offer, and the hotel has just one room! - Monthly data transfer

2) Second offer limits to X amount of people who get the offer, but didn’t mention about the number of days each person will stay in this one-room hotel - No of website per server

What can I do?

Find out number of rooms. In this case, it is the dedicated bandwidth assigned to each website, not server. Remember, shared basis servers host not just your website. It makes huge differences here. A shared 1Mbps for 10 websites may be slower than single website with dedicated 256Kbps bandwidth.

Find out number of days one can stay in your second offer. In this case, check out the ‘Compute Cycles’ offered. It measures how much the processing time your application required in a server. 10,000 compute cycles are roughly equivalent to the monthly capacity of a server with a server with 1.2GHz modern processor. For example, a website with only static pages consumes less compute cycles than a website with shopping cart applications.

Is your website loading slow?

I see big corporate website paying as little as RM20 a month for their online infrastructure including email & web hosting (some with domain as well). I bet this amazing offer answer to the question above.

Stop Using TM’s DNS Servers

Posted by: pin on: 13 Aug, 2008

Sorry to have sound a little harsh in the title. Trust me, if there are only two last DNS servers to use, check out OpenDNS. The nameservers are 208.67.222.222 and 208.67.220.220. Forget about our local ISPs’ DNS servers. They are geographically near you, but that doesn’t mean they are realiable!

DNS is important. A good one log you into your server without delay, resolving your web address in your web browser quicker! Yet, our local ISPs never seem to take care of this seriously. Your router, computers, servers around you require a pair of reliable DNS servers.

Change your DNS now:

1) In your Router

Enable OpenDNS in your router so every computer benefits. The OpenDNS website is kind enough to list every model of router and guide you through the process. Stop using the famous Streamyx’s DNS servers (202.188.0.133 & 202.188.1.5).

2) In your Computer

If you’re connecting to Internet directly without a router, you can enter OpenDNS’s DNS servers into your computer, instead of using ‘obtain DNS server address automatically’. This also applies to those on Wireless broadband such as Celcom and Maxis 3G, etc.

3) In your Server

For example, if you have Linux installed in your server, include OpenDNS’s DNS servers to /etc/resolv.conf. I’m using TM’s DNS earlier and my dig and host command stop responding when TM’s DNS server decided to go teh tarik…

About OpenDNS

From the way how OpenDNS manage their website, showing the uptime of their globally loacated servers - rest assure this is the last time to change your DNS!

Free Ubuntu CD

Posted by: pin on: 08 Aug, 2008

Request free Ubuntu CD

Ubuntu is a community developed operating system that is perfect for laptops, desktops and servers. Whether you use it at home, at school or at work Ubuntu contains all the applications you’ll ever need, from word processing and email applications, to web server software and programming tools.

Request a free CD - Request a free Ubuntu, Edubuntu or Kubuntu CD from Canonical. Delivery typically takes 6-10 weeks. You can use each CD as many times as you like - you are free to use it on as many computers as you wish and to pass on to others.

P/s, just received the CD from Ubuntu, sent from UK. Through, due to the mass production, it is wee bit outdated version, but definitely save me a lot of time than downloading and built my own CD.

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 < [...]



 

Categories