Easy LAMP install / Is there such a thing?
Moderators: snarkout, Patrick, dann
- mowestusa
- Posts: 298
- Joined: Mon Apr 04, 2005 10:27 pm
- Location: Farm Fields of Wheat and Corn
- Contact:
Easy LAMP install / Is there such a thing?
With all of the slick distros that we have that come preconfigured to play DVD's, flash, and mp3s, I would think that someone in the Linux world would have come up with a slick way to get LAMP up an running. Perhaps, I'm just missing this, and it already exists. If so, let me know. I would love to have a LAMP ready so I could easily set up "eyeOS" or "wordpress" to try out for my hobby website.
I have some spare boxes with 500mhz processors, 128megs of ram or more, and empty hard drives. I would love to have a 15-30 minute install that would give me an easy to use LAMP server. Here are my requirements:
1. Apache, PHP, MYSQL, up and running and configured to work together.
- I've tried doing this on a Kanotix install. Getting Apache up an running static websites was a breeze. A simple "apt-get install apache" and it was autoconfigured and serving up webpages without issue.
- However a simple "apt-get install php" doesn't give you PHP up and running on apache. You need to decide between php4 or 5. You need to apt-get modules for apache1 or 2. You need to edit some config files too. (At least this is the conclusion I have drawn from my research.)
- A simple "apt-get install mysql" also doesn't get the job done. It would be nice if a configuration script would get things working with apache and connect to PHP and perhaps a simple web interface like phpmyadmin would be auto configured and ready to go.
2. A simple web interface for mysql and other server settings preset up and installed. I'm a newbie, and I don't know how to set up mysql from the commandline, phpmyadmin offers a "gui" option, but once again I need PHP working with Apache first to get that working right. Why can't we have something up and working right after the install so I can simply: http://192.160.1.106/LAMPadmin to remotely administer the box that is connected to my home network.
- I know there are tools to do that, but once again it takes some hand configuration to get everything working.
Since Linux rules in the server market, I would think that it should be an easy matter for someone to assemble a distro to give us a quick server preconfigured and presetup to serve webpages and php programs so that we can easily experament with these tools at home on a spare box. Or we could easily set up a webserver on our home DSL or Cable to serve up our personal blog or eyeOS or maybe a calendar program. However, when I look at Distrowatch I find lots of desktop centered distros, or server distros that meant for the enterprise server and not the little guy like me. Like I said I might be wrong about this. I may just not know where to look.
Right now I'm running Kanotix and I've just installed Slackware. So I'm starting to work through a couple of LAMP how-to's for Debian and Slackware, but if there is an easier way, I'm open to suggestion. My main goal is to get the chance to test out eyeOS and wordpress and some php calendars that I would like to add to my currently running static website. Maybe, I'm just to old or too time limited (since Linux is more of a hobby and not part of my job) to get into this stuff.
mowestusa
I have some spare boxes with 500mhz processors, 128megs of ram or more, and empty hard drives. I would love to have a 15-30 minute install that would give me an easy to use LAMP server. Here are my requirements:
1. Apache, PHP, MYSQL, up and running and configured to work together.
- I've tried doing this on a Kanotix install. Getting Apache up an running static websites was a breeze. A simple "apt-get install apache" and it was autoconfigured and serving up webpages without issue.
- However a simple "apt-get install php" doesn't give you PHP up and running on apache. You need to decide between php4 or 5. You need to apt-get modules for apache1 or 2. You need to edit some config files too. (At least this is the conclusion I have drawn from my research.)
- A simple "apt-get install mysql" also doesn't get the job done. It would be nice if a configuration script would get things working with apache and connect to PHP and perhaps a simple web interface like phpmyadmin would be auto configured and ready to go.
2. A simple web interface for mysql and other server settings preset up and installed. I'm a newbie, and I don't know how to set up mysql from the commandline, phpmyadmin offers a "gui" option, but once again I need PHP working with Apache first to get that working right. Why can't we have something up and working right after the install so I can simply: http://192.160.1.106/LAMPadmin to remotely administer the box that is connected to my home network.
- I know there are tools to do that, but once again it takes some hand configuration to get everything working.
Since Linux rules in the server market, I would think that it should be an easy matter for someone to assemble a distro to give us a quick server preconfigured and presetup to serve webpages and php programs so that we can easily experament with these tools at home on a spare box. Or we could easily set up a webserver on our home DSL or Cable to serve up our personal blog or eyeOS or maybe a calendar program. However, when I look at Distrowatch I find lots of desktop centered distros, or server distros that meant for the enterprise server and not the little guy like me. Like I said I might be wrong about this. I may just not know where to look.
Right now I'm running Kanotix and I've just installed Slackware. So I'm starting to work through a couple of LAMP how-to's for Debian and Slackware, but if there is an easier way, I'm open to suggestion. My main goal is to get the chance to test out eyeOS and wordpress and some php calendars that I would like to add to my currently running static website. Maybe, I'm just to old or too time limited (since Linux is more of a hobby and not part of my job) to get into this stuff.
mowestusa
Two possibilities:
XAMPP: http://www.apachefriends.org/en/xampp.html - a prepackaged set of LAMP packages
SLAMPP: http://slampp.abangadek.com/wiki/wikka. ... a=HomePage - Slackware based LAMP live CD.
I have always set up my LAMP servers manually, so I have not tried either of these options, but I have heard good things about both.
XAMPP: http://www.apachefriends.org/en/xampp.html - a prepackaged set of LAMP packages
SLAMPP: http://slampp.abangadek.com/wiki/wikka. ... a=HomePage - Slackware based LAMP live CD.
I have always set up my LAMP servers manually, so I have not tried either of these options, but I have heard good things about both.
Chess Griffin
Actually, Slackware already has LAMP installed (long as you did the default install). All that remains is that you turn it all on. As I recall, all that you need do to get that accomplished is uncomment the php modules in your apache conf and restart apache, then su to the mysql user and run mysql_install_db. Lastly check to make sure that your /etc/rc.d/rc.mysql has permissions to start when the box starts and you should be set to go!Chess wrote:Two possibilities:
XAMPP: http://www.apachefriends.org/en/xampp.html - a prepackaged set of LAMP packages
SLAMPP: http://slampp.abangadek.com/wiki/wikka. ... a=HomePage - Slackware based LAMP live CD.
I have always set up my LAMP servers manually, so I have not tried either of these options, but I have heard good things about both.
-Linc Fessenden
In the Beginning there was nothing, which exploded - Yeah right...
In the Beginning there was nothing, which exploded - Yeah right...
Two more ideas:
ClarkConnect and SME Server. They are both Linux distros that have been created to act as home servers, with various modules you can plug in. ClarkConnect has a paid commercial version, but they also have a free community version (called the "Home" version I believe)
http://www.clarkconnect.com
SME Server is similar.
http://smeserver.sourceforge.net/HomePage
Finally, if you decide to go your own route and install LAMP manually, you can also install webmin which is a GUI tool to administer the server.
http://www.webmin.com/
Good luck!
ClarkConnect and SME Server. They are both Linux distros that have been created to act as home servers, with various modules you can plug in. ClarkConnect has a paid commercial version, but they also have a free community version (called the "Home" version I believe)
http://www.clarkconnect.com
SME Server is similar.
http://smeserver.sourceforge.net/HomePage
Finally, if you decide to go your own route and install LAMP manually, you can also install webmin which is a GUI tool to administer the server.
http://www.webmin.com/
Good luck!
Last edited by Chess on Tue Jan 31, 2006 3:36 pm, edited 1 time in total.
Chess Griffin
Well, true. My home server runs on straight up Slackware. The other ideas might be a touch easier for some folks to get up and running, however.Linc wrote:Actually, Slackware already has LAMP installed (long as you did the default install). All that remains is that you turn it all on.
Chess Griffin
- mowestusa
- Posts: 298
- Joined: Mon Apr 04, 2005 10:27 pm
- Location: Farm Fields of Wheat and Corn
- Contact:
Linc wrote,
Linuxquestions.org Link
I will have to try your ideas Linc. I believe during the install I set the mysql server, and apache server to start up on boot. So those should be working I would think.
mowestusa
Actually, I did do a default install. It seems as if the instructions I found at Linuxquestions.org make it out to be harder than that:Actually, Slackware already has LAMP installed (long as you did the default install). All that remains is that you turn it all on. As I recall, all that you need do to get that accomplished is uncomment the php modules in your apache conf and restart apache, then su to the mysql user and run mysql_install_db. Lastly check to make sure that your /etc/rc.d/rc.mysql has permissions to start when the box starts and you should be set to go!
Linuxquestions.org Link
I will have to try your ideas Linc. I believe during the install I set the mysql server, and apache server to start up on boot. So those should be working I would think.
mowestusa
Here are some instructions I typed up on my website on getting mysql going in Slackware if you decide to go that way:
http://www.chessgriffin.com/journal/mysql-in-slackware
As Linc mentioned, it really isn't all that hard to get LAMP going in Slackware, but it does take some manual editing of config files, at least at first. Once it's set up, you can install webmin if you want and administer from the GUI.
http://www.chessgriffin.com/journal/mysql-in-slackware
As Linc mentioned, it really isn't all that hard to get LAMP going in Slackware, but it does take some manual editing of config files, at least at first. Once it's set up, you can install webmin if you want and administer from the GUI.
Chess Griffin
I've got apache running on my server box (on Fedora). Once that was working, I got Perl CGI working. Now I'm getting into MySQL, which I also found pretty easy to install.
None of this was dead simple to get configured properly and securely. There are lots of loopholes, decisions to make and things that can go wrong. There is no such thing as an "out of the box" LAMP system that works, is already configured and is secure.
I'm glad I know how to configure apache, and what security choices I've made. Same with Perl/PHP and MySQL. These are complex pieces of software that are easy to exploit if not configured properly and updated regularly.
A LAMP server on a home LAN that doesn't face the internet is fun to play with. I wouldn't advise anyone to put such a system on the net without knowing how to configre it, detect intrusion, and secure it.
None of this was dead simple to get configured properly and securely. There are lots of loopholes, decisions to make and things that can go wrong. There is no such thing as an "out of the box" LAMP system that works, is already configured and is secure.
I'm glad I know how to configure apache, and what security choices I've made. Same with Perl/PHP and MySQL. These are complex pieces of software that are easy to exploit if not configured properly and updated regularly.
A LAMP server on a home LAN that doesn't face the internet is fun to play with. I wouldn't advise anyone to put such a system on the net without knowing how to configre it, detect intrusion, and secure it.
- mowestusa
- Posts: 298
- Joined: Mon Apr 04, 2005 10:27 pm
- Location: Farm Fields of Wheat and Corn
- Contact:
Gomer makes some good points.
Now with your gained knowledge, what security problems could come from running a stock apache, php, mysql install on a home network?
What would be safer about running a website on a hosted site, where it could be running on IIS with Windows admins who are scared to even look at the commandline?
Also since by design Linux is more secure than Windows, is it also possible to have a LAMP set up that is out of the box more secure so these security problems would not be an issue?
Thanks for the warning and the info Gomer, that was a great post.
mowestusa
Now with your gained knowledge, what security problems could come from running a stock apache, php, mysql install on a home network?
What would be safer about running a website on a hosted site, where it could be running on IIS with Windows admins who are scared to even look at the commandline?
Also since by design Linux is more secure than Windows, is it also possible to have a LAMP set up that is out of the box more secure so these security problems would not be an issue?
Thanks for the warning and the info Gomer, that was a great post.
mowestusa
I installed apache on my server, forwarded port 80, and within a day I was getting hit with scripts looking for known PHP exploits. Any script or PHP page that takes input from a user and does something on the server with that input (a form that takes an E-mail address and sends a reply to a user for example) can potentially be exploited to compromise the machine or gain information that will make cracking the machine easier. I know MySQL can be easy to exploit, too, but I haven't learned about that yet.mowestusa wrote:Now with your gained knowledge, what security problems could come from running a stock apache, php, mysql install on a home network?
Apache can be configured so that if there's no index.html in a directory the server will send a listing of a directory and let you browse all files on the server. Not very secure. It's also important to lock down scripts so that all scripts must be in a specified directory, or must have a specific extension or both. Otherwise someone could call a script and instead of running the script, have the code display in the browser.
Although it's a few years old, there is some good basic security info in this FAQ. http://www.w3.org/Security/Faq/www-security-faq.html
If the only option you have is getting a hosted site on a Windows box, you may be out of luck. Of course on a hosted site, security problems are someone else's headache.mowestusa wrote:What would be safer about running a website on a hosted site, where it could be running on IIS with Windows admins who are scared to even look at the commandline?
My host http://www.1and1.com runs Linux and has plans for as low as $3 a month (that's less than a pack of cigarettes, if you're not familiar with dollars). There you have the advantage of leaning on someone else to secure the system, and can watch how they do things to learn.
Running a home server is lots of fun, and if there's no sensitive data on the machine there's not much to loose. If you get haxx0red, you can just close the firewall, reinstall and try again. If you watch the logs daily, you can really learn a lot. I've got logwatch on my server that includes httpd errors in it's daily mails. I certainly don't want to scare anyone away because you can't learn if you don't play, but it's important to know the risks you're taking.
In addition to locking down your box and using an intrusion detection system like snort, I would also consider your hardware set up. For example, I would definitely not run your public webserver on a box that is on your LAN. If you can, put the webserver on a dedicated machine that is outside your LAN, such as in a DMZ or something along those lines. I have a zywall 5 router that has a true hardware DMZ and my webserver sits there in the DMZ, outside my LAN. You can also use something like smoothwall on a box with 3 NIC's to create a separated LAN and DMZ.
Just another thought.
Just another thought.
Chess Griffin
Seems a tad paranoid for a home user unless you're really running a publicly available server with lots of traffic. The only hits I see besides the intended users are port scan/script kiddie type automated attacks that don't get anywhere.Chess wrote:In addition to locking down your box and using an intrusion detection system like snort, I would also consider your hardware set up. For example, I would definitely not run your public webserver on a box that is on your LAN. If you can, put the webserver on a dedicated machine that is outside your LAN, such as in a DMZ or something along those lines. I have a zywall 5 router that has a true hardware DMZ and my webserver sits there in the DMZ, outside my LAN. You can also use something like smoothwall on a box with 3 NIC's to create a separated LAN and DMZ.
Just another thought.
If someone gets into the machine, they still have to crack any other machine on the LAN to do anything malicious. I keep separate root passwords on all machines, and the only way to connect to any other machine on the LAN is through ssh with a password.
A DMZ is good advice, as a server is an attack vector, but I'm betting no one is serious enough to crack 2 Linux machines just to get to my podcast collection. It's a risk I'm willing to take.
When you guys are DMZing your home networks, how do you go about doing it? Are you subnetting your private IP space and just placing any internet accessible boxes on a different subnet from your general use LAN? I always wonder what people mean by DMZ when they have a single public IP to play with.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson
--Spider Robinson