trying to build a nice nginx + php +mysql (+ mail?) server

hi there,

as the title says, i'm trying to set up a nginx+php+mysql server to host a few low-traffic sites and maybe mail for them. thing is i'm fairly new to the whole server thing, so i have questions, lots of them. i decided on centos being a regular fedora user and have right now a linode running nicely, secured and with a mysql server on it, nothing more.

now comes the tricky part, i want nginx + php + xcache but i'm not sure on how i should proceed. i've read a lot of tutorials and it seems like i sould install php from yum and then add nginx from source, then xcache from source also and configure and that's it… is that so?

what about the apache server (httpd) that gets installed as a dependency of php? if i set it not to run, will it affect my system in any way?

how about updating nginx?

what about the mail part, is there some kind of definitive guide on getting a mail server running for several domains?

all and any help is appreciated :)

11 Replies

If they're low-traffic just run apache ;), it's in every package manager so it is updated. It'll run just fine on a Linode 360. With CentOS, the main downside may be that you get php 5.1.6 instead of php 5.2. Ubuntu would have more packages–it has nginx too, but it's an older version than the current.

Really, I would stick with your distribution's packages. It's all tested together, it's super easy to install and update, and chances are there is documentation.

If you do compile anything from source just sign up for that software's announcement list so you know when there is a bugfix or update.

For mail, exim and postfix are good and you can get tutorials for either. I've used courier-imap a bunch for POP3/IMAP service.

If you have room on your linode for a different profile and disk images--try Ubuntu. Switching is pretty easy and the versions of things will feel more like Fedora compared with CentOS.

Edit: You don't need to run httpd. Just chkconfig httpd off, and configure nginx appropriately.

thanks for the tips, i'm interested in nginx because even though they're low traffic, there's still a bunch of them i want to run, plus i like learning new stuf,f i've worked with apache before.

i don't like ubuntu, it feels slower and the whole permissions system is kinda weird, plus i have my centos running nicely so far.

about httpd, i figured not running it was as simple as with any other service, but i meant config files, directories, etc. that's the part i'm not sure about.

i'm not new to linux, by the way, i've been using several distros for a while, but i en going back to fedora every time. plus the fedora forum is excellent :P

i have php from yum + xcache from source working, now on to nginx.

i'm definitely writing something about this install after, for people like me not sure about what they're doing. :P

seems to be working fine, thanks to epel. http://www.cyberciti.biz/faq/rhel-fedor … ginx-php5/">http://www.cyberciti.biz/faq/rhel-fedora-install-configure-nginx-php5/

Great, sorry if I was trying to oversimplify on you!

nah, don't worry, as i said: any help is appreciated. :)

what did you end up doing for the mail server ?

@oliver:

what did you end up doing for the mail server ?

4 months later i still don't know what i'll do with email. probably just go lazy and redirect all mail to dreamhost. funnily enough email is the only thing i've never had problems with on DH.

@contraculto:

4 months later i still don't know what i'll do with email.
You can consider Google Apps (the standard edition is free for up to 50 logins, if I recall).

@jed:

You can consider Google Apps (the standard edition is free for up to 50 logins, if I recall).

i am well aware of google apps (we use it at work) but i don't like google, and try to stay as far from it as i can. my ideal solution would be setting up my own mail server, but i have no idea how to and i need reliability. maybe some day…

There are a bunch of options. What kind of mailserver + pop3/imap or webmail + security, etc are you looking for?

Trying searching on http://www.howtoforge.com/ and see if you find any server you like.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct