Author Topic: Wish to set up a LAMP server - where to begin, please?  (Read 2608 times)

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Wish to set up a LAMP server - where to begin, please?
« on: February 08, 2010, 12:04:06 PM »
During the weekend past, I arrived at the notion of setting up a LAMP server.  It's work-related; the intent is to establish a private forum for our field technicians to enter their service experiences and fixes in, for future reference.

The problem is that I have no experience whatsoever, and I'm not very linux-proficient.  I managed to get as far as setting up a box for it, installing the task-lamp metapackage bundle, and downloading the Simple Machines Forum installation script - but what should be next?  I have no idea of how to run said installation script, nor of how to configure everything - so, I thought to ask here next, to see whether anyone may know of some good 'beginner's' links.  I have Googled for same, but did not find anything simple enough... could anyone offer a suggestion, please?

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Wish to set up a LAMP server - where to begin, please?
« Reply #1 on: February 08, 2010, 12:32:15 PM »
Hi Vc,

nice task you've got there :-)

First off, if you are in a hurry with this project you will need to buy expertise from outside.

The task here is a very nice way to get to learn Linux, you just need time to understand the tasks and patience to do it right and secure.

LAMP stands for Linux, Apache, Mysql and Php - you will have a Lamp server if these components are installed.

Next I'll recommend your tasks to be (only proceed when one task is 100% done):
1. Set up physical server in a firewalled DMZ zone.
2. Set up Apache webserver and make sure you can connect to it from outside your firewall. You should disconnect the outside access again until launch.
3. Install the forum software and configure it. You will need to read up on the website/google/literature whatever to get this task done
4.  Make a backup setup for your data
5. Create the documentation on your setup
6. Open for outside access - create user accounts to the forum and such - education/creation of manuals

good luck :-)

cheers,
MBantz




« Last Edit: February 08, 2010, 12:34:05 PM by MBantz »

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: Wish to set up a LAMP server - where to begin, please?
« Reply #2 on: February 08, 2010, 01:33:45 PM »
Hi Vc,

nice task you've got there :-)

First off, if you are in a hurry with this project you will need to buy expertise from outside.

Thank you, MBantz.

Buying 'outside' expertise really isn't an option, and the whole notion is not at all crucial... I'm simply curious; wondering what it takes to do it, and if the procedure is simple enough for me to be able to accomplish in the first place.  It needn't be anything complex or fancy at all, actually - a very simple forum style should do it.

Next I'll recommend your tasks to be (only proceed when one task is 100% done):
1. Set up physical server in a firewalled DMZ zone.

I'm currently running IPCop on an old Pentium Pro box as a router - so; accordingly, I would have to add another NIC to that machine in order to set up a DMZ port, correct?  Or could I just add a small 4-port hub to the cable modem and simply run the lamp server in parallel, instead?  The latter course would be easier.


2. Set up Apache webserver and make sure you can connect to it from outside your firewall. You should disconnect the outside access again until launch.

That's the bit I was encountering some difficulty with.  I've never set up an Apache server previously, and basically know next to nothing about it.  I was searching for some sort of illustrated 'step-by-step' guide for setting such up.

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: Wish to set up a LAMP server - where to begin, please?
« Reply #3 on: February 08, 2010, 02:53:10 PM »
Have you looked on their site?  I haven't played with Apache in years but when I did, I found their documentation very helpful in setting up services and explaining what the different .conf files do.
http://httpd.apache.org/docs/

As for the rest of the LAMP.... Never played with any of it except Apache.
« Last Edit: February 08, 2010, 02:54:51 PM by Joble »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Rudge

  • Hero Member
  • *****
  • Posts: 9676
  • I'm Just A Dog.
Re: Wish to set up a LAMP server - where to begin, please?
« Reply #4 on: February 08, 2010, 02:57:21 PM »
Joble's suggestion is the way I figured it out.

If this is just for fun, I would recommend www.no-ip.com for your DNS name. Free service and they have always been great for my needs. 


-If you wish to make an apple pie from scratch, you must first invent the universe-  Carl Sagan

Offline vc

  • Hero Member
  • *****
  • Posts: 519
Re: Wish to set up a LAMP server - where to begin, please?
« Reply #5 on: February 08, 2010, 03:16:12 PM »
Joble's suggestion is the way I figured it out.

If this is just for fun, I would recommend www.no-ip.com for your DNS name. Free service and they have always been great for my needs.  


Well, there's one part of the rub.  I was hoping to do it as simply as possible, and not make any use of DNS at all - a standard 32-digit IP address would suffice, but all the 'guides' I've come across so far seem to assume that I must set up some sort of DNS, and so they don't explain how to do it on a more basic level.

I wish it could be as easy as installing some sort of forum app; something very simple and self-contained, with barely any setup required - but I've not yet seen such either, alas.  The only forum software I've looked into so far is this very Simple Machines Forum one; however, it assumes that one already has a configured LAMP server to install it upon.  I have no idea if it would run properly with anything simpler than Apache, or if there are simpler forum apps available elsewhere.

At any rate, I do thank you both, regardless - and tonight I shall endeavour to read through some of the Apache documentation that Joble has suggested.
« Last Edit: February 08, 2010, 03:18:30 PM by vc »

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5333
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Wish to set up a LAMP server - where to begin, please?
« Reply #6 on: February 08, 2010, 09:16:28 PM »
Joble's suggestion is the way I figured it out.

If this is just for fun, I would recommend www.no-ip.com for your DNS name. Free service and they have always been great for my needs.  


Well, there's one part of the rub.  I was hoping to do it as simply as possible, and not make any use of DNS at all - a standard 32-digit IP address would suffice, but all the 'guides' I've come across so far seem to assume that I must set up some sort of DNS, and so they don't explain how to do it on a more basic level.


Just how were you planning on doing this with out DNS? Do you have a static IP address?

Quote
I wish it could be as easy as installing some sort of forum app; something very simple and self-contained, with barely any setup required - but I've not yet seen such either, alas.  The only forum software I've looked into so far is this very Simple Machines Forum one; however, it assumes that one already has a configured LAMP server to install it upon.  I have no idea if it would run properly with anything simpler than Apache,


What does the SMF software say that it needs to work?  

Quote
or if there are simpler forum apps available elsewhere.

At any rate, I do thank you both, regardless - and tonight I shall endeavor to read through some of the Apache documentation that Joble has suggested.


All in all Apache is not hard at all to install a get to run.  After you installed the task-lamp from synaptic did you try to see if apache was working at all?  In you web browser, on the machine that is suppose to be running the web server,  type in  http://localhost  if it is running and listening it will respond with a display of "It work's"  If you see that than congratulation Apache is working. If you do not see that or get some sort of error, make sure that Apache is running.  In a console window as root type

service httpd start

if you see the following
[root@laptop dwmoar]# service httpd start
Starting httpd:              OK

Great!  

If you see [root@laptop dwmoar]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Don't panic! it still started Apache but could not figure out the servers FQDN, because you don't have one, so it using the loopback IP (localhost) for running.

We can fix it by editing the following file as root

/etc/httpd/conf/http.conf

look for the ServerName line

# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName 192.168.10.117    <----- This is what you will need to change
**** NOTE **** DO NOT use some made up FQDN for the ServerName

Remove the # that is in front of ServerName
In mine above I used my local IP address as seen above

When you have made your changes, save the file.  It a terminal window as root enter in the following

service httpd restart

you should see something as follows

[root@laptop conf]# service httpd restart
Shutting down httpd:                 [  OK ]
Starting httpd:                          [  OK  ]

Your web server is now running as it should be.
« Last Edit: February 08, 2010, 09:18:08 PM by YouCanToo »




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Wish to set up a LAMP server - where to begin, please?
« Reply #7 on: February 09, 2010, 04:24:08 AM »
This might be of interest to you

http://belproject.org/

It uses an out of date version of PCLOS but should give you an idea of what is required and how it all works.

It would surely give you a starting point with a working install from where you could set up a similar install using the newer version of PCLOS. As you know it is not possible to update the older version using the repository, so that is a limitation.

Nonetheless it should be a good indication of what is needed, and there is some very good info in their Wiki.

http://belproject.org/mwiki/index.php?title=General_Docs


regards.
« Last Edit: February 09, 2010, 04:27:36 AM by JohnBoy »