Welcome to the Linux Foundation Forum!

What to use


Due to limitations of my server host, I am looking to build my own server. I am looking to build a fully functional server that is MySQL 5.1 and PHP 5.3 capable.

I also need an unlimited # of sub domains as well as emails... not sure if that is a problem if I have my own server? I have played around with a little for personal use but haven't really got the hang of it yet. Is one Linux better that the other? Do I need more than 1 piece of software? Please if anyone has any i input I would appreciate it greatly.

Oh yeah, if there is anything that I left out please include it also.



  • gomer
    gomer Posts: 158
    Wow, that's not a small question.

    First, you ought to pick a distribution you want to use for your server. My 3 recomendations would be Ubuntu Server, Debian, or CentOS (if you prefer RPM).

    Then you need to pick a web server. I would suggest Apache since you seem to want to use PHP. You'll want to look into the difference between apache 1 and apache 2 depending ont he ammount of static content you expect to have.

    It seems you already chose a Data Base.

    It also sounds like you to put mail on the same box. This gets tricky. How much mail functionality are you looking at providing? If you want an SMTP server, sendmail, postfix, and exim are some options, just to name a few. Then you might want to consider a POP3 server and / or an IMAP server. You also need to decide what kind of mail boxes you want. do you want users to be virtual, or will all email boxes have an entry in /etc/password? Gonna provide LDAP / an address book / directory? If you are going to have lots of mail boxes in the file system, then you'll have to take your choice of file system into careful consideration.

    Spam filtering? AntiVirus for email? Other scripting engines / languages for web users? How about FTP access? etc. etc,

    I don't mean to disuade you from trying to do this yourself, but if you are trully as inexperienced as you say, then this might a bit to chew off at once. You have a lot of reading and a lot of decision making ahead of you.
  • TheRhino
    Thanks Adam, I realize that it is going to be hard getting this figured out and then up and running. But you know what they say, "Nothing worth while ever comes easy", my business partner and I have put a lot of time and effort into this to get to where we are. We are starting to enlist some help as well to which will make things go a bit easier.

    Our basic need in a nut shell is that when a customer registers they will receive there own "page" much like a social networking site. On this page, the members will be able to change there own templates manage the content that they want to post/hide. We will be paying members to a "advertising commission" and tracking everything for them in the back end. The idea is that they publish a deal and whenever someone purchases from that link the publisher gets paid $x.xx depending on the item/markup. When all is set and done...(never actually done lol) we will have a fully functioning site with little need to shop/socialize/entertain/etc... anywhere else (hey if your gonna dream, dream big right ;-))

    As far as mail goes would be nice to have the sky, the trees, the oceans and even the moon but for now a minimum of an internal email/messaging system will suffice. With virus and spam filtering. Good news is that at present time it doesn't look like there will be an immediate need. Find out more Friday.

    Anyway, sorry it took so long to get back to you. My computer had crashed (mobo toasted) and the parts came in to rebuild. Worked on it during off hours as also currently work full time. But it's quick yee hawwwww
  • orcephrye

    Ok shawn so this setup of yours. Do you already have the app side of this "in the mixx" so to speak, So you just need a server to stick it on? Or rather you/partner/someone is going to be programing this and you have laid out the specifications that you have because said person requested that?

    You also mentioned that "Due to limitations of my server host" you had to get your own box. Have you tried asking other hosting providers? Not that I dont want you to run linux or work with Linux or setup your own server but there are lots of options. I work at one particular hosting company and wont make any suggestions as to appear bias and such. But I know of several places that follow those specifications you ask without any problems.

    That and if you are diving head first into a new exciting entrepreneurship on the vast plans of e-commerce I highly recommend a company that has an experienced caring staff of fanatical techs that understand and back your needs.

    Moving along though. If that is a road already traveled and you are dead set on setting this up yourself then more power to u!

    Some things to think about. First off one server can have a near limitless about of sub-domains. I been on servers were you had to pipe httpd -S output to less which is annoy cuz you have to redirect the.. never mind. That shouldn't be an issue. But if your site is a interactive as you say it will be then it would probably be best to have more then one server. It be nice to have a test environment just on one PC.. But its my experience to split up the tasks to different servers. Especially the Database. The IO alone is a killer and you will need to have backups run which will kill your CPU/IOwait if you just have a single box. So think in the feature about setting up more then just one. (ignore memory per httpd thread) But thats down the road.

    For now you probably just want a cozy box to test your site at first. Honestly thats not that hard. I would install CentOS. (I might be biased here but there is a lot of articles regarding CentOS as a server. Its really designed to be a server and do what you want to do with it.)

    Once you install it. (Easier then windows in my opinion. Just click next a lot. (Hell i am installing a copy while righting this) )After is up just install mysql httpd php and dovecot. From there you can ask questions on the forms and read up on each service. Honestly the biggest amount of work will be setting up your mail the way you want it. And for the love of all things holy dont use sendmail. I mean sure why not right? NO! Just say NO! (please dont hate me. I just dont like sendmail)

    Sorry if i sound odd. I am probably more confusing then helpful. But Linux is a great platform to start a business off of. Mainly because its free. But also because its easily scalable and in the right hands a lot can be done with the simplest of tools. Good luck!!!
  • gomer
    gomer Posts: 158
    Hmmm ... Yah, it sounds like you are really aiming high here. while your application is in the development and alpha and beta states, you might be able to get away with a single box, but Rye is definitely right, you should consider more than one mahcine and delegation of roles / duties between them.

    I feel I should warn you that you need to think about security from the very beginning. Especially if you are going to be either directly processing payments, or at least brokering the transactions. If any personaly identifiable data or financial data is going to be stored in your application, or handled / processed by your application, you will at the bare minimum have some regulatory concerns to keep in mind.

    As for the "unlimitted number of subdomains", this is trivial if you control your own DNS (BIND is still the gold standard) and the web server. You can fairly trvially automate the process of creating new records in DNS along with creating new virtual hosts in your web server.

    As far as messaging goes, if your only concern is "internal" messaging, with no *real* email interface, that should be simple enough to implement via your database and integrate directly into the web app. DB based mail storage is often preferable, too, if messages tend to be distributed to multiple users, since you won't have to store multiple coppies of the same message, but rather just provide links in the DB (e.g. join tables). If you do want to integrate real email, then it's simple enough to "weld" that onto the existing internal / web app framework. Implmenting virus checking and spam filtering on an internal mail system might be trickier, if the messages never hit an "external" MTA, but it's not impossible I would still look at the APIs for ClamAV and SpamAssassin, if I were you.

    Really, though, if there's anything I can tell you, it's to focuss on building your app securely from the ground up. ALWAYS sanitize your user input, do not use user input to directly build SQL querries, always expect unexepected input and detroy it / throw vague errors (to the user, log usefull error on the server), never try to implement your own encryption, that bears repeating: NEVER try to implment your own encryption - use an accepted / tested / proven standard.

    and, good luck. :)


Upcoming Training