Dedicated Server Support

Tips on Linux, FreeBSD, Windows Dedicated Server.

Thursday, May 26, 2005

Qmail installation on server12.netfreehost.com

Last two days i was working on to replace sendmail with Qmail.

I have completed installation with Qmail, Qmailadmin, vpopmail and vqadmin.

Now all websites on server12.netfreehost.com is sending mails with Qmail. This Free Hosting servers have no email account, only use of qmail is to send emails through PHP and perl scripts.

For testing, i change MX record of the domain name www.domainstobuy.com to server12.netfreehost.com so all mails are now processed by qmail. Receiving part is ok, i can receive emails with my favorite pop3 client outlook express.

But getting following error while sending mails

The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'mail@netforhost.com'. Subject 'Testing from s12', Account: 'server12.netfreehost.com', Server: 'server12.netfreehost.com', Protocol: SMTP, Server Response: '553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)', Port: 25, Secure(SSL): No, Server Error: 553, Error Number: 0x800CCC79

Think some thing wrong with qmail relay settings, have to figure out....

Tuesday, May 24, 2005

FreeBSD Apache Install Error - OpenSSL version contains known vulnerabilities

I got following error while installing Apache from ports

# cd /usr/ports/www/apache21
# make

To enable a module category: WITH__MODULES
To disable a module category: WITHOUT__MODULES

Per default categories are:
AUTH AUTHN AUTHZ DAV MISC
Categories available:
AUTH AUTHN AUTHZ DAV EXPERIMENTAL LDAP MISC PROXY SSL SUEXEC THREADS

To see all available knobs, type make show-options
To see all modules in different categories, type make show-categories
You can check your modules configuration by using make show-modules

Dependency warning: used OpenSSL version contains known vulnerabilities
Please update or define either WITH_OPENSSL_BASE or WITH_OPENSSL_PORT
*** Error code 1

Stop in /usr/ports/www/apache21.

I tryed upgrading ports with cvsup, but it won't help.

Solved it by adding

WITH_OPENSSL_BASE=YES

to

/etc/make.conf

Installing FreeBSD as local web server

After having two servers with FreeBSD, i think its time to say Good bye to Linux.

I am thinking of getting all new servers with FreeBSD installed.

Rightnow i am installing local test web server on FreeBSD 5.2, i was using Fedora c3 for local web server. Just finished FreeBSD installtion with out GUI, i have some problem in getting GUI work, but i don't need it as i used this as a web server to test web pages local before uploading to internet.

I can browse internet with text browser lynx, just installed cvsup with out gui

cd /usr/ports/net/cvsup-without-gui
make install clean

Now i am updating the ports with

/usr/local/bin/cvsup -g -L2 /etc/cvsupfile

Ports are getting updated well on my slow net connection.

I thought i could not do this on my slow connection and tryed to get ports one by one from

http://www.freebsd.org/ports/

I downloaded Apache21 port, but trying to install it got some errors, like autoconf marked the version of Apache as broken, may be because autoconf is old version and can't identify the new version of Apache. So desicded to try the ports upgrade with cvsup and is working fine.

Server10 MotherBoard replaced

Yesterday found server10.hosthat.com down, on contacting data center found there is problem with the server power supply, later they told the MotherBoard is faulty and they put the harddisk on a new computer. Now the sites are working.

On getting the srever online, i tryed to take a remote backup with rsync, but i start getting warning that the CPU is HOT. So i stoped the backup with Ctrl+C

After about a hour, server again went down... Submited support ticket and got it back online. Next day i wakeup and found it offline... Support ticket bring it back online...

I thought the server can't handle high server load due to some reason, so i moved 3 of high traffic web sites out of the server.

http://www.netfreehost.com
http://forums.bizhat.com
http://gallery.bizhat.com

But server is getting down even after the sites are moved. After the Harddisk moved to this server, it went offline 5 times within 24 hours. So i have asked www.dedicatednow.com to check the server for hardware problem.

They told one of the 512MB RAM was from the new server and one from the old server. Now they put both RAM from old server, also put a cabin with more ventilation. It seems a problem with RAM mismatch.

After this change, server is working fine, no down time even after 24 hours.

Saturday, May 21, 2005

FreeBSD and Ports System

I am new to FreeBSD. I got my last two servers with FreeBSD. I was using Linux on my servers, i brought my FreeBSD box as many says its best and i want to try it. May be because FreeBSD newbie, still i can't find the real advantage. Here is some points from my short experience with FreeBSD.

Advantage

Software Install From Ports, that is easy to do... just got to port directory and type in "make install clean" everything will be installed including required other packages. I like the phpX-extensions port, that is really time saving when installing PHP extensions.

In Linux, you can download source and install it with "./configure && make && make install", at times, you need other depended packages to be installed first. But this is a one time process and you know what you are installing on the server.

Disadvantage

You don't have any control over what version of other packages a port will be installing. For example, if you need MySQL 5 and PHP5 installed, you install MySQL 5 from ports, them PHP5. Latest PHP5 from ports will not work with MySQL 5. It need MySQL 4.1 to work with... So port developer decide which version of MySQL i use on my server and not me.... I want MySQL 5, but php5 is not supporting it, have to wait for port developer to use the latest version.

I feel like i have to depend on some one known as port maintainer, if he is busy or feel like using old version, i have to use that.

Would like to know why others prefer FreeBSD over Linux.

Read more at

Image Gallery Feature added to ImageHost.BizHat.com

Today i have added Photo Gallery feature to BizHat.com Free Image Hosting.

http://imagehost.bizhat.com

Now users can get a link to Image Gallery with all images in a Folder. Hope users will like this feature, so i added link to Photo Gallery as 3rd link on "Get Link" page of every image. You can see an example Photo Gallery at

http://imagehost.bizhat.com/img_gallery.php/423/1587

Thursday, May 19, 2005

Setting HostName in Linux

Today i found many of the mails send from server12.netfreehost.com used for free web hosting bounced back with following error.

The original message was received at Mon, 16 May 2005 16:53:28 +0100
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----

(reason: 553 localhost.localdomain does not exist)

----- Transcript of session follows -----
... while talking to mail.vip.hr.:
>>> MAIL From: SIZE=2382
<<< 553 localhost.localdomain does not exist
501 5.6.0 Data format error


The mails are getting bounced because the hostname of the servers is set as

localhost.localdomain

To set the hostname, edit /etc/sysconfig/network

vi /etc/sysconfig/network

changed

NETWORKING=yes
HOSTNAME=localhost.localdomain


to

NETWORKING=yes
HOSTNAME=server12.netfreehost.com


And restarted service network

# service network restart

Now hostname is server12.netfreehost.com

# hostname
server12.netfreehost.com

Traffic of ImageHosting.BizHat.com on May 2005

After moving http://imagehost.bizhat.com to its own FreeBSD 5.4 dedicated server, the traffic have increased. First of all, even after moving this site from old server won't make any changes in traffic in old server, that is used for free web hosting.

On checking status on new server, it seems same as OLD server, that is both server pushing average 2 MBPS.

Here is the stats for second day from new dedicated server, only site hosted on that is http://imagehost.bizhat.com

Free Image Hosting by www.NetFreeHost.com

New Hosting Directory HostIndex.BizHat.com

We have started a new Web Hosting Directory at

http://hostindex.bizhat.com

If you have a web hosting related web site, get it listed on HostIndex.BizHat.com

Sunday, May 15, 2005

BizHat.com Image Host Site New Script

Last one week i was working on new image mangement script for

http://imagehost.bizhat.com

It started with a very simple image uploading script with no admin or user login features.

The new script have lot of features and i should say it is build specially to handle high traffic. This script uses only minimum MySQL queries to serve images.

Plan is to provide Free Image Hosting, so the script is build with out any bandwidth monitoring features. I can easily add bandwidth monitoring, but this will add up few MySQL queries for each image served. I do not want CPU time wasted for this , fancy feature.

As a Free Image Host, we need to serve lot of images, no limits, the more images it serves, more popular it become. So we don't have any bandwidth limit per user.

This script allow 3 type of linking

1. Hotlinking - users can hotlink hosted images on their web site, but the images are branded with "Hosted by ImageHost.BizHat.com" at bottom.

2. Thumbnail - Users can post thumbnail images on their site, blog or forums. On clicking the thumbnail, the full size image is shown. We show our ads on top and bottom of the image.

3. Direct Link to Image - a link to image, that user can share with others.

I am working on few more features like Image Gallery and some image mangement features.

Presently we have more than 1.3 GB of images uploaded by users. We have to delete images few times due to server problems. Now with the branding and advertising, we hope we can serve better, no need to delete images as it will help us also. Hope more are more users will be linking to thumbnail of images and sending viewers to full image (with ads) on our site.

ImageHost have will be moved to its own dedicated server within few days. New server with OS FreeBSD 5.4-R, 1 GB RAM, 120 GB HDD is ordered and will be ready in few days.

FreeBSD 5.4 is released few days back, Data Center agreed to provide latest version of FreeBSD with this server.

http://www.freebsd.org/releases/5.4R/announce.html

Monday, May 09, 2005

Internet on linux virtual machine

I am running Apache on VMWare virtual machine running Fedora. Host machine is Windows 2003. On Fedora, i installed samba, so i can share files between Linux and Windows Host machine.

Network is ok, but i could not get internet in the virtual machine. Today i spend some time with Google and found solution for this.

The reason i was not able to connect to net was becaue of the routing table.

[root@fedora root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.174.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default fwhwin 0.0.0.0 UG 0 0 0 eth0


As per network settings of VMWare, Gateway IP is 192.168.174.2

So i added it to the routing table by

[root@fedora root]# route add -net default gw 192.168.174.2

Now the routing table is

[root@fedora root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.174.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.174.2 0.0.0.0 UG 0 0 0 eth0
default fwhwin 0.0.0.0 UG 0 0 0 eth0


There is two default gateways, don't know its a problem, anyway i removed it with following command

[root@fedora root]# route del -net default gw fwhwin
[root@fedora root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.174.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.174.2 0.0.0.0 UG 0 0 0 eth0


I am able to ping to IP address of Google.

[root@fedora root]# ping 216.239.37.99
PING 216.239.37.99 (216.239.37.99) 56(84) bytes of data.
64 bytes from 216.239.37.99: icmp_seq=0 ttl=128 time=1764 ms
64 bytes from 216.239.37.99: icmp_seq=1 ttl=128 time=868 ms
64 bytes from 216.239.37.99: icmp_seq=2 ttl=128 time=737 ms
64 bytes from 216.239.37.99: icmp_seq=3 ttl=128 time=587 ms
64 bytes from 216.239.37.99: icmp_seq=4 ttl=128 time=597 ms
64 bytes from 216.239.37.99: icmp_seq=5 ttl=128 time=927 ms
64 bytes from 216.239.37.99: icmp_seq=6 ttl=128 time=617 ms

But i can't ping to google.com

[root@fedora root]# ping google.com
ping: unknown host google.com


Solved it by adding

nameservers 192.168.174.2

in /etc/resolv.conf

# cat /etc/resolv.conf
nameserver 192.168.174.2

on restarting service network, i found rote table getting resetted, so i edited

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

and added GATEWAY in that


[root@fedora network-scripts]# cat /etc/resolv.conf
nameserver 192.168.174.2
[root@fedora network-scripts]# cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.174.129
NETMASK=255.255.255.0
GATEWAY=192.168.174.2
[root@fedora network-scripts]#



Now i can access web sites from Fedora.