FreeBSD Server Administration

May 16, 2005

Be a Professional or Get a Professional?

After rented two unmanaged FreeBSD servers, I have been always wondering what's the best choice for me, does it make sense to learn how to administer a server? Isn't it better to hire someone to do all these stuff for me? Thus, the servers are more secure, and I can spend more time on the websites rather than thinking about the hosting all the time.

I also swayed between Linux and FreeBSD for a while, I like FreeBSD in many ways, but it has a big drawback - little documentation, almost everything needs extensive search on the Internet. Linux has a much bigger user base and enough tutorials on almost every subject.

My Linux VPS was hacked last month, fortunately I only host one website on it and nothing lost. I do most things with WebHost Manager and CPanel on it, as a result, I can do little research to find out how the hacker broke in. My ISP tried to fix the problems, several important programs damaged during the process, they restored the whole system form backup (they backup the whole system daily).

After the FreeBSD server working, I spent little time on learning FreeBSD, probably I'm tired of studying new stuff. The Linux hack and email spam incidents taught me a lesson: either to be a real professional - hard but convenient, or to hire someone - easy but inconvenient, convenient as well as easy solution doesn't exist at all.

Improving FreeBSD knowledge will be my first priority task from now on.

Posted by FreeBSD Newbie at 07:54 AM | Comments (2)

March 24, 2005

Benchmark Testing

You can use UnixBench to test your server's benchmark, and compare with other's results.

Run the following commands to make the test:
# wget http://members.dslextreme.com/users/andylee/unixbench-4.1.0-wht.tar.gz
# gunzip -dvc unixbench-4.1.0-wht.tar.gz | tar xvf -
# cd unixbench-4.1.0-wht
# make
# ./Run


I just ordered a new server from LayeredTech, the configuraion is:
• Intel Pentium 4 2.8GHz
• 2 x 80GB IDE Hard Drive
• 1024MB RAM
• Bandwidth: 1000GB
• IP Addresses: 8 (5 usable)
• Private VLAN
• Number Of Servers: 1
• Basic Resource Monitoring
• FreeBSD, OpenBSD, Linux, Windows*
• 100% Self Managed and Dedicated

Here is the benchmark results:
Start Benchmark Run: Thu Mar 24 16:36:50 UTC 2005
4:36PM up 13:40, 2 users, load averages: 0.00, 0.00, 0.00
End Benchmark Run: Thu Mar 24 16:48:16 UTC 2005
4:48PM up 13:52, 2 users, load averages: 14.43, 5.50, 2.55
INDEX VALUES
TEST BASELINE RESULT INDEX
Dhrystone 2 using register variables 376783.7 4555272.9 120.9
Double-Precision Whetstone 83.1 791.2 95.2
Execl Throughput.2 188.3 1015 53.9
File Copy 1024 bufsize 2000 maxblocks 2672.0 6528.0 24.4
File Copy 256 bufsize 500 maxblocks 1077.0 9023.0 83.8
File Read 4096 bufsize 8000 maxblocks 15382.0 327449.0 212.9
Pipe Throughput 111814.6 609332.3 54.5
Pipe-based Context Switching 15448.6 93890.7 60.8
Process Creation 569.3 4076.8 71.6
Shell Scripts (8 concurrent) 44.8 296.8 66.2
System Call Overhead 114433.5 377500.3 33.0
FINAL SCORE 67.8    

My first server got about 60, similar servers on the above thread got more than 100, I'm very disappointed at the result.

Posted by FreeBSD Newbie at 05:41 PM | Comments (0)

March 12, 2005

FreeBSD and Linux

This is an interesting thread from FreeBSD mailing list, I have nothing against Linux, actually I know both too little to have my own opinions.

> Aperez wrote:
> I read an interview of Linus Torvald made by Linux Magazine. In that
> interview Linus mentioned the following:
>
> "On the other hand, no, Linux does not have that stupid notion of
> having totally separate kernel development for different issues. If
> you want a secure BSD, you get OpenBSD; if you want a usable BSD, you
> get FreeBSD; and if you want BSD on other architectures, you get
> NetBSD. That___s just idiotic, to have different teams worry about
> different things."
>
> I dont want to critize what Linus stated above. However, I find a very
> valid point when he says that every BSD version team is woking in
> different directions.

The important detail, I guess, that makes Linus wrong or at least not entirely
correct in making this statement is that the three BSD-derived systems he
mentions are different systems altogether. They are *NOT* different sets of
packages collected and distributed around the same kernel.

The same can be said about Linux distributions; some times even more so. One
cannot compare any version of Slackware Linux vs. Redhat Linux vs. Mandrake
vs. SuSE vs. Gentoo vs. Ubuntu vs. the Linux distribution "de jour". At any
given point in time, one can find Linux distributions that come with kernel
version 2.2, others with 2.4, a third group coming with some minor release of
2.6.x, etc.

Having said that, I don't see why Linux can be considered as "one system".
Even if it were, I don't see why four different systems (FreeBSD, NetBSD,
OpenBSD and Dragonfly BSD) are bad because they are not "one system". Not to
mention, that this is partly wrong because the BSD systems -- the internals of
their kernels put aside for a while -- have a great deal of similarities
between then; many more than any randomly chosen set of Linux distributions.

What Linus fails to see when he makes comments like the one above are some
very crucial points:

- A "system" is not just its kernel.

- Linux "systems" have a lot more differences than he implies.

- The BSD systems, when seen as a whole and not just as a kernel, have
many more similarities among them than any set of at least two
different Linux systems.

> My question is this:
> Why not all three teams work together for just one BSD version?

They do, in fact. A lot more than Linus implies. They just use their
different BSD systems to develop the things they most like.

Very often, what new features developed on one BSD system is ported or copied
over to other BSD systems. Bug fixes that are made on one of the BSDs are
many times fixed in a short time in other BSDs too.

> At the moment there are three groups of developers and users working
> in the same issues. I think if we should all work together and create
> well rounded BSD version for us users and corporate clients. Imagine a
> BSD version that is portable (NetBSD), that is very secured (OpenBSD)
> and that is a good Destop solution (FreeBSD).

Diversity is not bad. Linus is just wrong in stating that the BSDs are
somehow silly for not making the One, True BSD(TM)(C)(R).

- Giorgos

Posted by FreeBSD Newbie at 11:46 PM | Comments (0)

January 05, 2005

Server Is Ready

I got my server information yesterday, haven't worked on it much. The first impression - I'm lost. Most Linux commands don't work, which are default on my VPS, such as wget, command suggestion (pressing Tab), etc.

The OS is FreeBSD, LayeredTech doesn't support Red Hat, don't know how much different they are.

I'm going to play around in a FreeBSD IRC, get the idea what's the first step :-).

By the way, my VPS works great now.

Posted by FreeBSD Newbie at 01:04 AM | Comments (0)

January 02, 2005

New Unmanaged Server

I ordered a 100% self-managed server from layeredtech yesterday, here is the server configuration:

• AMD XP2400
• 80GB IDE Hard Drive
• 1GB DDR RAM
• Bandwidth: 1000GB
• IP Addresses: 8 (5 usable)
• Private VLAN
• Basic Resource Monitoring
• FreeBSD, OpenBSD, Linux, Windows*
• 100% Self Managed and Dedicated

No control panel, no backup plan, I think a self-managed server will force me to learn how things work, it's better than fully managed server from this point of view.

I plan to blog everything I do on the new server. Now waiting for my login details.

Posted by FreeBSD Newbie at 02:31 AM | Comments (0)

November 18, 2004

Network Problem

ServInt experienced 6 hours down time due to fiber cut yesterday, it's quite frustrating. Besides losing orders, I'm more concerned about the possible search engine ranking. Google was doing a deep crawl on one of my websites before the server was down - which I have been waiting for days, I have no idea how Google deals with this, will it arrange the deep crawl next day or till weeks later?

But anyway, the problem was solved quickly, I think 6 hours for a fiber cut problem is not long. According to ServInt's post-outage email, the CEO has got Deutsche Telecom as another fiber provider, this will solve the single link problem.

Here is a picture of the fiber cut spot, I feel much better when I saw it :-).
fibercut.jpg

VoIP & VPN

Posted by FreeBSD Newbie at 05:33 PM | Comments (0)

November 03, 2004

About This Blog

I started building my websites since 2001 and only used shared hosting until last week. As the websites growing, I feel a strong need of a dedicated server. Shared web hosting is very limited in many aspects, such as disk space, traffic volumn and shell access, the last one is most important to me.

After looking around for a while - mainly on WebHostingTalk.com, I got three option to get my own server:
1. A fully managed dedicated server (ex. theplanet.com), but it is too expensive for me at the moment.

2. An unmanaged dedicated server. There are some really cheap options (under $70/month), e.g. 15minuteservers.com, iPowerWeb.com, etc. But you have to take care of everything yourself, such as system upgrade, backup, security, etc. After I considered it very carefully and decided not to go for it, at least before I have reasonable Linux knowledge.

3. VPS, this is my final decision, VPS stands for virtual private server, I never heard of this word before. Basically it's a server running like a dedicated server, but you are actually sharing with other people, for more information about VPS, please visit my VPS provider's website: ServInt.com.

I ordered my VPS last week and started transferring all my websits. It's really hard for a Linux newbie like me, I feel lost in most time, Fortunately ServInt has very fast support and a private VPS forum to ask all my dumb questions :-). Now all my sites have been up and running, although I still have a lot of things to do. During this time, I came across with many question as well as some nice tips, which urges me to write everything down to make my life easier in the future.

My background:
I'm a Java programmer with little Linux knowledge, especially on administration part. should I blame my nice system administrator colleagues :-)? They always setup a very convenient environment for us developers, when I need to do something on our server, normally all I have to do is running a shell script to get everything done.

If you are also a Linux newbie, I hope this blog is a little useful to you; If you are an expert, that's great, any comment on my posts is much appreciated.

Posted by FreeBSD Newbie at 08:22 AM | Comments (3)