Go Back   HTMLCenter Web Development Forums > Web Design and Development > Servers

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 01-25-2005, 04:48 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
Looking To Set Up A Server

I'm toying with the idea of setting up our own server for the company for which I work, and I'm just curious about some things at the moment.

First of all, how many people in these boards actually run their own servers?
Secondly, I'm planning on going with Linux as the operating system, but I'm not sure what Linux build would be the best choice. We wouldn't be looking to have any software on the server machine, except for the networking and server software. So, I'd really be looking for a fairly bare-bones build of Linux, but it would also have to be somewhat user-friendly, as I am just now diving into Linux.
Thirdly, what type of hardware should I put in? I'm not looking to skimp on anything, so if you recommend something that costs some money, it's not a big deal. We're already paying more than we should for Internet access and hosting, and that requires us to have a separate machine for serving up intranet documents. If we were to come up with a somewhat permanent solution that would allow us to server Internet and Intranet documents, it wouldn't matter if it cost some extra money in the short-run, as it would save some money, and a lot of headaches in the future.
Next, I've heard reference to two different methods of setting up server harddrives. I've heard of striping and I've heard of mirroring. What would you recommend? We would be serving our own intranet mostly, and would only be using our Internet server to serve up a small website and to serve our email needs.

I understand that it's most likely necessary to set up a dedicated T1 in order to run a professional server, and I'm looking into that. I also understand that we're probably looking at spending over $1000 setting up the computer.

Here are some of the details on what we'd be doing:
We would need to set up SMTP and POP clients so that we could serve our own email needs. We already own two domain names, so we would be looking to integrate our two domain names into our email and web-space needs. Our email can take up anywhere between 20 and 80 megs at any given time.
We would need to set up something to serve HTML, Perl and PHP documents to the Internet. Our web space requirements for public documents would be minimal. At the moment, I believe our web site takes up about 250-500 kilobytes. I would say that ten megs would be more than we would ever need.
We would need to set up an Intranet server to serve our network computers within our office. At this point, the majority of our computers are running Windows XP Pro. One or two might be running Win98 or WinME. The triky part (at least in my mind) would be making these documents available, upon request with a verified username and password, to people outside of the office, so that we could access our documents from somewhere other than the office, but so they wouldn't be publicly accessible.

So, anybody with comments or suggestions, please feel free to post. Like I said, I am toying with the idea at the moment, but I would really like it if people shared their feelings, experiences, and any literature or advice on the subject.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote

  #2 (permalink)  
Old 01-26-2005, 01:39 PM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
Well, it always depends.

I run servers for others and I can't see any "real" advantage of running a server for your email and website local to you. The line is too expensive, that's just the main concern. I would rather find a local datacenter and colocate the server there. Operating system on a web and mailserver, I would suggest FreeBSD (which we run for HTMLCenter, btw). Ports work really nice. Apache (web), vsftpd (FTP server) and Postfix are setup really easily.

Hardware-wise, a Celeron, 256 MB RAM and maybe a small RAID system will work. You can skip the RAID too, but I am thinking email is somewhat critical.

If you need a HOWTO for a webserver setup, check this out, I recently added a HOWTO for FreeBSD setup:
http://www.ladse.de/index.php/Documentation

Regarding your fileserver, you don't really need much here to get started. I would suggest buying a Celeron, 512 MB RAM and a RAID system (RAID 1 maybe, or RAID 1+5) for basic security of the files hosted.

Raid 1 does the mirroring, while Raid 5 has an extra parity HDD. For Raid 1 you need minum of 2 harddrives. So for example, 2x 160 GB hdd gives you 160 GB to use, the other 160 GB are kept as a mirror. As for Raid 5, you need a minimum of three HDD. Two can be used for data and the third is used in case one of the two being used breaks. So you can recover data.

Raid 5 takes longer to recover - in general. But Raids are like science. I'd suggest a read on tomshardware.com to find out about Raid controllers.

For the operating system you will just need a basic BSD or Linux install, I would suggest FreeBSD again, or if you want Linux, Debian, to you. Debian is quite stable and has a big community of supporters.
Redhat and SuSE are not my choice, they are rather bad examples for what you can do to Linux. Other BSDs are OpenBSD, NetBSD and DragonFlyBSD.

When you have FreeBSD or Debian running, you would need to install Samba. Which works really well with your Windows PC (client-side). Through Samba you will be able to create shares for your users where they can save their files. As for remote access, I would suggest to setup a small VPN (the fileserver can handle that as well), to have your road warriors become part of the network and then they can access their shares (Samba) just fine, without any bigger security issues and so on.

By the way, I am available for contract work.
hehehehe...

Hope this helps,
Till
Reply With Quote
  #3 (permalink)  
Old 01-26-2005, 02:05 PM
Registered User
 
Join Date: Jan 2005
Posts: 16
Call DELL, they are pretty good with servers. I know many people who bought from them in the past and they are still very happy with what they got. Another one good with hardware is HP. Try them. Maybe get offers from both and make them compete or whatever.
Reply With Quote
  #4 (permalink)  
Old 01-30-2005, 09:34 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
Thanks for all of the advice. I'm going to take all of it into consideration.

To get accustomed to the way things work, I had already installed SuSE 9.1 on my home computer, and attempted to set up apache and various other services. I've got apache2 installed, along with apache-mod_perl, apache-mod_php, phpMyAdmin, and quite a few other things. However, when I start up apache2, and then direct my browser to http://localhost/phpMyAdmin (or anywhere else on localhost, for that matter), my broswer acts like it's going to load for a split second, and then I just get a blank page (if I start from a blank page. If I try to go there while I'm on an existing page on the web, that page will stay up on my screen instead of loading the page I'm trying to load).

I just tried doing the same thing in Konqueror, and I got an error saying:
Quote:
An error occurred while loading http://localhost/phpMyAdmin:

Connection to host localhost is broken
Does anyone have any thoughts on what I might have done wrong? I'm searching around the web right now to see if I find anything, but I'm not having a lot of luck at the moment.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #5 (permalink)  
Old 01-30-2005, 09:42 AM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
The webserver is running? Get on a shell, and have a look...

Code:
ps aux|grep httpd
If you get nothing, besides the "ps aux|..."-command, you should start Apache with:

Code:
apachectl start
(Instead of "start" consider doing "configtest" too, just to make sure. Also, have a look at your error_log, probably somewhere in /var/log/.)

SuSE is bad. It will spoil the experience, Linux/Unix is really cool, but SuSE is really a bad example of how to screw it up. Especially when you run a server it's of no use, maybe suitable for a desktop.
Reply With Quote
  #6 (permalink)  
Old 01-30-2005, 07:58 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
Thanks. I'll try that when I log back into Linux.

I already had SuSE installed before you posted your comments about it. I actually installed it about two or three weeks ago. I installed it for two reasons: 1) To ease slowly into Linux so that I could learn how commands work without having to rely solely on them, so that I could eventually set up a Linux/Unix server. 2) To give myself a viable alternative to Windows, because, frankly, I'm extremely tired of just about everything Microsoft. So, for me, SuSE is actually pretty nice. When I set up a real server, I'll probably go with something else.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #7 (permalink)  
Old 01-30-2005, 09:15 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
I just checked the error log. It seems that the following error is being generated whenever I try to access http://localhost/

Code:
[Sun Jan 30 21:05:08 2005] [notice] child pid 4273 exit signal Segmentation fault (11)
I ran the console command that you suggested, and it did in fact return some results. It does appear that Apache2 is running, it's just not running properly for some reason.

I've googled and found two articles referring to that segmentation fault. One of them timed out, but the other one said something about errors in glibc that had been fixed in a newer version, so I'm updating my glibc to see if that fixes the problem.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #8 (permalink)  
Old 01-31-2005, 06:08 PM
Registered User
 
Join Date: Jan 2005
Posts: 16
Any more specific errors?

Also, have you had the chance to run, "apachectl configtest"? Might show you what is borked.
Reply With Quote
  #9 (permalink)  
Old 01-31-2005, 08:19 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
I haven't got it resolved yet, and I haven't got any more specific errors, either.

I have found a little more info, though. I've found out that it will allow me to view the indexes of my public html directories, but once I click on an actual file, it quits working. In other words, I can surf to http://localhost/~cgrymala and it will show me that I have a file called info.php (something I put together based on a tutorial on setting up apache) and a directory called yabbfiles (I've placed the non-perl files from YaBB in there to test some things out). I can click on yabbfiles, and it opens up to show me the contents of that directory. However, if I click on one of the gif images that's in there, then I get the localhost connection broken error. When I check the error log, it shows a series of about 10-20 segmentation faults.

I'll keep searching.

I'm curious - if you have a newer version of libapr installed than the version of apache, could that possibly cause this problem? I downloaded a lot of rpm's to install things, but then happened upon apt. apt seems to install apache2.4.9, but I think my libapr is from v2.5.2. I'm not positive, but it seems that way (when I tried to install something using apt, it referred to the fact that my package required libapr 2.4.9, but I had libapr 2.5.2 installed.

EDIT - I forgot to mention - I did try apachectl configtest, and it kept telling me command not found, so I finally figured out that I really needed to try apache2ctl configtest and it simply returned "Syntax OK"
__________________
I hate Internet Explorer! Anyone with me?

Last edited by curtiss : 01-31-2005 at 08:41 PM.
Reply With Quote
  #10 (permalink)  
Old 02-01-2005, 01:43 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
I just wanted to let you guys know - I finally got it working.

I uninstalled everything I could find that had to do with apache, and then used synaptic to re-install all of them together. It appears to be working now. Thanks for all of the advice.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #11 (permalink)  
Old 02-02-2005, 10:14 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
Heh. I had just about everything working for a little while. My perl seems to be working fine (although setting up permissions through SuSE is a lot different than setting up permissions through an FTP client, so it took me quite a while to figure out how to get things working). My web server is working well for regular html pages. However, my PHP and mySQL seem to be kind of screwed up. I think PHP is working okay, but my mySQL server keeps stopping itself as soon as I start it, so I can't connect to any databases. I am able to start the server, as I get a "OK" message when I start it up, but it immediately stops itself afterward. Has anybody encountered anything like this before? I'm thinking of uninstalling the entire server again, and starting over from scratch, but I just want to see if anyone else has experienced anything similar in the past.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #12 (permalink)  
Old 02-03-2005, 07:36 AM
tthurgo's Avatar
Moderator
 
Join Date: Jan 2002
Location: Lebanon, PA
Posts: 357
Hey Curtiss!

You need to enable the start log in MySQL to see the error.
http://dev.mysql.com/doc/mysql/en/log-files.html

Tom
__________________
Tom Thurgo
my future is coming on
Reply With Quote
  #13 (permalink)  
Old 02-03-2005, 11:37 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
Thanks for all of the help guys. I think I finally got everything up and running properly.

I ended up removing everything, and re-installing it again. I'm not sure what the problem was, but once I re-installed everything, it still wouldn't start up. I ended up updating the permissions for my folders (although, I'm 99% certain they were correct when it wasn't working before the re-install), and that got things working most of the way. Then, I was having trouble changing the password for my mySQL users, because I kept getting read-only errors. I did a little searching, and found out that I was getting that because I had manipulated some files while the mySQL server was running, which, apparently, is a big no-no. I stopped the server, removed all of my mySQL tables by hand, ran mysql_install_db again (this time, with the server not running), started the mySQL server back up again, and then was able to change (actually set) the passwords without any trouble.

I now have a working phpBB installation on my computer, I am working on getting YaBB set up (although, setting the permissions properly for YaBB within SuSE is an absolute nightmare), and then will begin working with HTML, SHTML, and PHP.

In case you're curious - the reason I've installed phpBB, and will be installing YaBB on my computer is: I am an admin at a few YaBB boards and two phpBB boards, and I would really like to be able to manipulate the boards, and play with various hacks, etc. without having to do so on the live installation.

Who knows - maybe I'll try my hand at installing an Invision or vBulletin set up as well, just to see how they differ.

Thanks again for all of the help. I am so grateful to everyone for helping me out, and I will hopefully be able to take my newfound knowledge to the next level once I convince my boss that we should set up a server within the office.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #14 (permalink)  
Old 02-03-2005, 02:57 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,399
OK. New problem -

I tested out my SHTML pages to see if they would work correctly. First, they were simply interpreted as txt pages. It showed me the code that was supposed to be in the file, something like this:
Code:
<HTML>
<HEAD>
<TITLE>DCHelp - Official DCHelp News</TITLE>
<META name="description" content="">
<META name="keywords" content="">
<META name="generator" content="CuteHTML">

<!--#include virtual="./DCTop.shtml"-->

<!--#include virtual="/cgi-bin/yabb/YaBB.pl?board=news;action=news"-->

<!--#include virtual="./blank_right.html"-->

<!--#include virtual="./DCBottom.shtml"-->

</BODY>
</HTML>
Then, I searched the web and found some info on setting up SSI through my httpd.conf file. I added Options +Include, and then added two more lines about adding shtml files. Now, when I navigate to the SHTML pages, the SSI calls are not working. For the page above, I get a completely blank page.

I've checked my error log and found the following info that seems to be pertinent:
Code:
[Thu Feb 03 14:00:14 2005] [warn] [client 127.0.0.1] mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed
[Thu Feb 03 14:29:42 2005] [warn] child process 4194 still did not exit, sending a SIGTERM
[Thu Feb 03 14:29:42 2005] [notice] caught SIGTERM, shutting down
[Thu Feb 03 14:31:34 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Feb 03 14:31:34 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
What am I doing wrong? I've seen info telling me I need mod_include, but I haven't been able to find it in any of my update packages. Is mod_include a separate module that needs to be installed, or is it something that should have been in my apache2 package. Please help.

EDIT - I just wanted to add: I tried PHP includes, and they are working just fine. It's just SSI that doesn't seem to be working.
__________________
I hate Internet Explorer! Anyone with me?

Last edited by curtiss : 02-03-2005 at 03:12 PM.
Reply With Quote
  #15 (permalink)  
Old 02-04-2005, 06:49 AM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
I think mod_include is distributed with Apache. Check your httpd.conf if it is commented out (with a leading #). If so, remove the # and do an Apache graceful on the shell.

I don't see your confusion with permissions. You hop on a shell and chmod to whatever you need. For example, chmod +x to make a file executable. Also have a look at chown and chgrp., and their designated man pages.

Cheers,
Till

P.S.
Want to put your steps in a small tutorial?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 04:37 AM.

 
KickApps
Clicky Web Analytics


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter