Configuring a Server?

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I'm looking to create a local server now that my computer is running properly.

I've decided to do this on a VM (since I can't really run two operating systems at once), and with that comes resource limitations, so I'm looking for a lightweight, but powerful distro of Linux (GUI isn't needed, but preferred) that I can install the actual server (Definitely not Apache. I've heard it's not too good on resources), a database (probably MySQL), FTP and email, and anything else I might need (PHP, APE, etc), while staying under the 256MB RAM limit I'll have to enforce (until I can get off my ass and buy new 2GB / 4GB RAM cards. :/).

So is anyone able to help me with this? I've never done anything quite like it, so any sort of information would be incredibly helpful.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
This is basically what we do for TH. :) Though we have a bit more RAM available. :p
I use CentOS for the OS. (http://centos.org/)
Lighttpd for the webserver. (http://www.lighttpd.net/)
MySQL obviously for databases. (http://dev.mysql.com/downloads/mysql/5.1.html)
And PHP is required for vB as well. (http://php.net/)

If you're living under a 256 MB limit for memory, don't use a GUI. That would be suicide. CentOS's GUI is called Gnome, and will chomp RAM if you try using it. As it is, you could setup a reasonably robust install with 256 MB of RAM and the software mentioned above. I usually compile all software manually so I can install each thing with the options and directories that I want, though MySQL can usually be found in Linux's package manager called Yum (Yellow Dog Updater, Modified). Compiling manually takes a bit more work, but gives you all the power of customization.

One important thing is that you be willing to learn how to administrate from the shell if you're not running a GUI. It's basically like Windows command prompt except that's all. :p I have come to enjoy using it so I can help if you want to learn how it works. Anyway, I hope this is somewhat informative. Good luck! :)
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Awesome, thanks for the links! Downloading everything now. :D
One question though: Where would be the best place to learn all the commands? (I know the basics (cd and chmod, for example), but I'm guessing that's not quite as many as I should know.)
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
Like Ghan said: CentOS.
Although I do believe you should still go for LAMP (Linux, Apache, MySQL, PHP).

Reasons:
  • You're a beginner and there's a ton of support online for LAMP
  • Apache is by far the best webserver ever known to mankind (biased, but it's true)
  • It comes quite 'safe' out of the box. Seeing as you don't know advanced commands, this may be best for your PC's safety
  • Installing/running/configuring it is easy as pie
 

tooltiperror

Super Moderator
Reaction score
231
ArchLinux is a completely valid alternative for a server, and pacman is a cooler command.

Code:
pacman -s Apache
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Okay, finally was able to download CentOS and try to install it, but it seems to be GUI-only.

What should I do? (also, I'm having a look at ArchLinux, just in case. :D)
 

tooltiperror

Super Moderator
Reaction score
231
ArchLinux would be so much easier. Install it, and run this command:

Code:
 $ pacman -S apache php php-apache mysql
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> but it seems to be GUI-only

I've only ever installed it myself on the console with its GUI, but you can deselect the GUI when configuring the install.

> ArchLinux would be so much easier.

ArchLinux is much smaller than CentOS. The idea behind it is lightweight and simplicity. I've never used it myself, but I get the impression that most things much be installed by the user. CentOS is the most popular Linux distribution of all of them and is based on Red Hat. It's purely a matter of preference individually as to which one you prefer to work with.

> Install it, and run this command:

I beg to differ that this is any easier - if you select the "Server" option during CentOS install, it will install all of those for you automatically - they will run when the server first boots, in fact.
 

tooltiperror

Super Moderator
Reaction score
231
Of course, but running a tiny command (what, four or so arguments?) and checking off boxes are similar in difficulty or simplicity or easy-ocity.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
I've never used Nginx, but I've heard good things about it. Can't go wrong there. :)
I would not know how to setup Nginx to use PHP, however. You'd have to read the documentation.
 

Samuraid

Advisor
Reaction score
81
If you do a default install of CentOS with a GUI (GNOME/KDE/XFCE), it will default to booting into run-level 5, which is the graphical desktop.

What you want (for a server) is to boot into run-level 3, which is the multi-user shell, essentially the command prompt.

You can configure the server to boot into run-level 3 by default by editing the file /etc/inittab as root.
Find the line the looks like this:
Code:
id:5:initdefault:
and change to this:
Code:
id:3:initdefault:

On next reboot, the server will start at the shell. If you want to start the graphical desktop at any time, just run this at the shell:
Code:
startx

As for webservers, nginx and lighttpd are both excellent choices for low-memory, fast web servers.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top