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
889
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
889
> 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
889
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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top