my dog learned polymorphism*
The moose likes Linux / UNIX and the fly likes Linux home server setup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Linux home server setup" Watch "Linux home server setup" New topic
Author

Linux home server setup

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Guys,

I have been developing a web application for the last few months and I would now like to get it live in the next couple of months. For the very same purpose, I have been looking for some hosting providers and as I was looking for it, I thought to myself why not do it self. Following is what I have arrived at:

For the software:



For the hardware:


I'm convinced with the Ubuntu 10.10 server but really have no clue if a normal Desktop would be suitable for hosting something or do I need to go for a server hardware and if yes which one should be considered?

As always suggestions needed.

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10248
    
    8

Disclaimer 1: I do not have any personal experience in hosting on my own server
Disclaimer 2: I am lazy!

If I was in your place, I would approach several hosting services and enquire about their hardware and infrastructure.
That would give me an idea of the setup I might require.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

for the security:
http://www.dzone.com/links/r/securing_an_ubuntu_server.html

Also, consider putting it in a DMZ in your home environment if your router supports it. You need to treat the machine as 'untrusted'
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Maneesh Godbole wrote:Disclaimer 1: I do not have any personal experience in hosting on my own server
Disclaimer 2: I am lazy!

If I was in your place, I would approach several hosting services and enquire about their hardware and infrastructure.
That would give me an idea of the setup I might require.


I'm doing this just to gain experience and knowledge in this area. All these years we have been developing apps and left with little or no knowledge on how the end might look like. I thought to myself why not know this as well. It feel this knowledge will definitely add value to my current skill set and I could speak even more confidently when working with different teams (Config Management, Sys Administrators etc.,). This is just one more step forward to becoming a software architect. Oh! wait a minute... Software Architect.... but what does he has got to do with hardware selection and OS selection and system administration. Ist es nicht für ein Software Architekt Scheißegal? (Does it care a shit for a Software Architect). Oh, but for me yes. I need to learn this and I feel interested to know much more.

Guys,

Thanks for your posts. But do you think if the hardware configuration what I mentioned looks like a server configuration (with just one server in the farm) or is that more like a desktop pc?
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

The hardware specs that I have mentioned above would have the following:



Would the 4 GB RAM suit all this?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

the hardware depends on what you intend to do with it and what sort of traffic you expect.
eg at a previous employer we had a hosted half rack, most were high spec 1RU and 2RU servers, the last was a low spec 'oddball' mini-tower lying on its side.
The oddball machine was there to host the apps and sites that didn't belong on the main machines and remained as a minitower since it was too hard to migrate many of the legacy systems it held.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Servers barely need VGA vidio, use the onboard video. Go cheap. At current RAM prices, get 8GB and use a 64 bit version of Ubuntu or Debian. I run Debian on my servers and Ubuntu on my desktops and laptops. I like the fact that Debian does not do releases every six months to support some new video card, camera other thing that have nothing to do with servers.

Ubuntu is derived from Debian. If you install Debian with the GUI (which I recommend for folks just starting out running a server) the GUI is the same. Same package installer, etc.

Its easy, nearly trivial to have MySql and its tools installed for free on either Debian or Ubuntu. I would not do Oracle until someone paid me serious money to do so.

Its unclear if you are doing this for development/education/personal use, or if you plan to make it a public server on the open Internet. If you want it to be public, you really should get a fixed IP address from your ISP, which can cost $50 or more extra per month. You can do things like dyndns, but that's not how professional servers are setup.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Good points, and I'd look at a RAID solution that supported boosted disk IO and was still stable if a disk failed
eg LVM + RAID 0 such as http://www.gagme.com/greg/linux/raid-lvm.php
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Pat Farrell wrote:Servers barely need VGA vidio, use the onboard video. Go cheap. At current RAM prices, get 8GB and use a 64 bit version of Ubuntu or Debian. I run Debian on my servers and Ubuntu on my desktops and laptops. I like the fact that Debian does not do releases every six months to support some new video card, camera other thing that have nothing to do with servers.

Ubuntu is derived from Debian. If you install Debian with the GUI (which I recommend for folks just starting out running a server) the GUI is the same. Same package installer, etc.

Its easy, nearly trivial to have MySql and its tools installed for free on either Debian or Ubuntu. I would not do Oracle until someone paid me serious money to do so.

Its unclear if you are doing this for development/education/personal use, or if you plan to make it a public server on the open Internet. If you want it to be public, you really should get a fixed IP address from your ISP, which can cost $50 or more extra per month. You can do things like dyndns, but that's not how professional servers are setup.


I did not quite understand by the ".... fixed IP address from my ISP"

The app that I'm building will just have some articles written by professionals. It will have a template to create new articles on the fly and make them searchable instantly. The website is purely for educational purposes and for me to learn new technologies through implementation of them in my web application.

I have planned to set up my home server first. Then contact a domain name seller and purchase a domain name. But then comes the question on how to map this domain name to the IP address of my home server??? If this mapping would require monthly costs, then I would not go for it. I'm not quite aware of this. Does this mapping cost huge money per month?? (for me even 10 Euros a month is a huge investment in this front)
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

A domain name gets turned into an IP, and it is the IP that the client needs in order to connect to your site.
The easiest way is to make sure you have a static (unchanging) IP address and when you add your domain name to a naming server it always returns the same IP.
dyndns (you'll need to go look it up) allows you to have an IP that changes but as Pat says it is not the preferred solution. (in the opinion of myself and others)
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8866
    
    8

Check the terms of service for your ISP. "Business" hosting will have an uptime guarantee. "Consumer" connections don't. Consumer TOS's usually explicitly forbids hosting and have a statement that says the ISP can disconnect you for any reason. Many consumer connections, like DSL, have larger download throughput than upload, which is the reverse you want if you are serving data.
I host my personal web site from home with a DNS name mapped via DDNS. If I were going to go commercial, I'd look at business-grade hosting at an ISP. There's enough to worry about. Let the ISP worry about the server and the connectivity.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Joe Ess wrote: Many consumer connections, like DSL, have larger download throughput than upload, which is the reverse you want if you are serving data.


I did not quite get this. I will set up my Linux box and connect it to my internet connection. Did you mean to say that after this once users start accessing my app, the consumer connections (like the one that I have at home) will not be suitable for medium to heavy traffic?
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Joe,

You are still not being clear. If you want folks in your house to access a server in your house, there are no problems. If you want the world to access your website/application, then you need a public DNS name to resolve to your server.

The public accesses your server using your ISP link. Same link you use to surf the web, get email, do video downloads, etc. It will work both ways, technically, no problem.

But most people have a "consumer" agreement with their ISP. And most of these prohibit you from offering server access to the open internet. So there is at least a legal issue. In addition, most consumer links to their ISP are asymetric, they are much faster downloading from Google or NetFlix then they are at uploading. When people in the world use your site, you are uploading to them, they are downloading from you. You may run into serious network bandwidth/speed issue. Again, it will all work technically, but if you are limited, the user experience will be bad or even unacceptable.

In addition, nearly all ISPs have either a bandwidth cap, or a limit to the number of gigabytes of data you can push through in a month. And once you are doing lots of gigiabytes, as you move into terabytes, every ISP has limits or ways to charge you more money. For a major service, the bandwidth cost is the major budget item, even more than engineers and artists.

Each time someone posts an answer, you appear to take part of it and go off in another topic. You need to focus and ask more complete questions.

Yes, you can run the standard LAMP stack on nearly any PC. Yes, you can install a database, Java engine, HTTP daemon, etc. And you can do all of this with no real cost.

Yes, you can make that server be available on the global internet.

If its just your grandmother pulling down photos of your kids, you are done. If you are doing a commercial startup, you may have more. If you are a successful commercial service, there is tons more.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9349
    
    2

Now I get the real big picture of it. I guess I would better let it off to a hosting provider.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Linux home server setup