Being slightly familiar with BSD, I'm trying to get my feet wet with Linux, and was wondering if anyone can suggest a good walkthrough of setting up a CentOS server with Apache, PHP, and MySQL...
I realize there are step-by-step guides of the sort "copy-this-line- paste-into-terminal-and-hit-enter", but I'd like to understand what's going on when I issue a single wget command and numerous packages and libraries start downloading.... Specifically:
1. Is there a "right" way to install software on Linux in general, an CentOS in particular? For example, the Package Manager on CentOS 5.2 allows you to install certain software, but often not the latest version. So if I go download MySQL 5.0.67 from the web, how do I install it and make it play nice with the rest of the system? Ditto for PHP 5.2.6. And once installed (either by the Package Manager -- and by the way, why are the apps it lists so out of date?), what's the best way to update PHP and MySQL? Is it simply a matter of downloading the binaries again and overwriting the existing install? On Mac OS X, such downloads come as .pkg files that seem to take care of so many details without requiring a trip to the command line.
2. Where should software, such as PHP, MySQL, Apache2, be installed? / usr/bin ?
3. Is it a bad idea to install some software from the command-line via wget, some software from the graphical Package Manager, and some software from the the web? What I mean is, so far it seems like Linux manages the list of installed packages, and I just wonder if I'm screwing things up this way.
Anyway, sorry for the ramble, just looking for some guidance. Thanks.
...Rene
- Is there a "right" way to install software on Linux in general, an
CentOS in particular? For example, the Package Manager on CentOS 5.2 allows you to install certain software, but often not the latest version. So if I go download MySQL 5.0.67 from the web, how do I install it and make it play nice with the rest of the system? Ditto for PHP 5.2.6. And once installed (either by the Package Manager -- and by the way, why are the apps it lists so out of date?), what's the best way to update PHP and MySQL? Is it simply a matter of downloading the binaries again and overwriting the existing install? On Mac OS X, such downloads come as .pkg files that seem to take care of so many details without requiring a trip to the command line.
- Where should software, such as PHP, MySQL, Apache2, be installed?
/usr/bin ?
- Is it a bad idea to install some software from the command-line via
wget, some software from the graphical Package Manager, and some software from the the web? What I mean is, so far it seems like Linux manages the list of installed packages, and I just wonder if I'm screwing things up this way.
The recommended way to install software is using a yum or at least rpm. The further you stray from core CentOS packages installed the CentOS way, the more likely you will get stuck with a broken system that this list or the forums will find difficult to support. That said, there are some good repos out there including dag.wieers.com and EPEL.
The versions used in CentOS are derived directly from the upstream product. This is an enterprise distro after all, stability is valued more highly that being on the bleeding edge. But yes, old versions of PHP and PostgreSQL can be problematic when something like the latest Drupal (7) requires PHP5.2, and PostgreSQL 8.3 is way better than 8.1. It is possible to upgrade these but not possible to describe how to do it here. Google can help.
Software should be installed wherever the RPM wants to put it. It is all about maintaining a stable, reliable system in a known state.
Rene Fournier wrote:
Being slightly familiar with BSD, I'm trying to get my feet wet with Linux, and was wondering if anyone can suggest a good walkthrough of setting up a CentOS server with Apache, PHP, and MySQL...
yum install httpd php php-mysql mysql-server
Et voilà.
- Is there a "right" way to install software on Linux in general, an
CentOS in particular?
Normally you use yum for doing so. http://centos.org/docs/5/html/yum should contain enough info.
For example, the Package Manager on CentOS 5.2 allows you to install certain software, but often not the latest version. So if I go download MySQL 5.0.67 from the web, how do I install it and make it play nice with the rest of the system? Ditto for PHP 5.2.6.
You can't except if you build these also as RPMs. And rebuild every other RPM which depends on those against the newly built RPMs.
And once installed (either by the Package Manager -- and by the way, why are the apps it lists so out of date?), what's the best way to update PHP and MySQL?
CentOS is not and never was about the latest and greatest. CentOS is about having a stable set of packages which do *not* change over the lifetime of the product (with a few exceptions). Security fixes are backported into these versions. More info about that can be found on http://wiki.centos.org/
Is it simply a matter of downloading the binaries again and overwriting the existing install?
No, because those will get overwritten on updates.
On Mac OS X, such downloads come as .pkg files that seem to take care of so many details without requiring a trip to the command line.
Same for RPM.
- Where should software, such as PHP, MySQL, Apache2, be installed? /
usr/bin ?
/usr/bin only when installed by the package manager. /usr/local/bin for selfcompiled packages, /opt/ for binary packages. man hier(7)
- Is it a bad idea to install some software from the command-line via
wget, some software from the graphical Package Manager, and some software from the the web? What I mean is, so far it seems like Linux manages the list of installed packages, and I just wonder if I'm screwing things up this way.
Yes. Bad idea and it *will* screw up your system. Read up on CentOS and try to understand why we ship exactly that set of packages contained in any of the 4 available CentOS versions. If you find that not having the newest software available, CentOS might not be the correct distribution for you.
If you want to have a stable set of packages supported for seven years(!), then stay with CentOS. Mixing CentOS packages and "stuff from the web" will not help with that.
Ralph
On 11-Oct-08, at 2:16 PM, Ralph Angenendt wrote:
- Is it a bad idea to install some software from the command-line
via wget, some software from the graphical Package Manager, and some software from the the web? What I mean is, so far it seems like Linux manages the list of installed packages, and I just wonder if I'm screwing things up this way.
Yes. Bad idea and it *will* screw up your system. Read up on CentOS and try to understand why we ship exactly that set of packages contained in any of the 4 available CentOS versions. If you find that not having the newest software available, CentOS might not be the correct distribution for you.
If you want to have a stable set of packages supported for seven years(!), then stay with CentOS. Mixing CentOS packages and "stuff from the web" will not help with that.
Thanks a lot for the explanation (and to admin also). Everything you say makes sense, and I will look at using YUM for adding the software I need.
...Rene
Ralph Angenendt <> scribbled on Saturday, October 11, 2008 2:16 PM:
Rene Fournier wrote:
Being slightly familiar with BSD, I'm trying to get my feet wet with Linux, and was wondering if anyone can suggest a good walkthrough of setting up a CentOS server with Apache, PHP, and MySQL...
I recently discovered howtoforge.com. Great site I think. The below might be of interest for your specific case.
Quick 'n' Easy LAMP Server For CentOS/RHEL: http://www.howtoforge.com/quick-n-easy-lamp-server-centos-rhel
The Perfect Server - CentOS 5.2 x86_64: http://www.howtoforge.com/perfect-server-centos-5.2-x86_64
The Perfect Server - CentOS 5.2: http://www.howtoforge.com/perfect-server-centos-5.2
HTH.
/S
Rene Fournier wrote:
From: Rene Fournier m5@renefournier.com Subject: [CentOS] Good [L]AMP tutorial for CentOS 5.2 ? To: centos@centos.org Date: Saturday, October 11, 2008, 9:22 AM Being slightly familiar with BSD, I'm trying to get my feet wet with Linux, and was wondering if anyone can suggest a good walkthrough of setting up a CentOS server with Apache, PHP, and MySQL...
I realize there are step-by-step guides of the sort "copy-this-line- paste-into-terminal-and-hit-enter", but I'd like to understand what's going on when I issue a single wget command and numerous packages and libraries start downloading.... Specifically:
Getting LAMP on Linux is easy unless you use a distro where you need to compile everything.
This is a quick one http://www.howtoforge.com/quick-n-easy-lamp-server-centos-rhel
phpMyadmin and Webmin do not come with CentOS but come in rpm form though phpMyadmin has a horrible security record.
Spike.
Rene Fournier a écrit :
Being slightly familiar with BSD, I'm trying to get my feet wet with Linux, and was wondering if anyone can suggest a good walkthrough of setting up a CentOS server with Apache, PHP, and MySQL...
I realize there are step-by-step guides of the sort "copy-this-line-paste-into-terminal-and-hit-enter", but I'd like to understand what's going on when I issue a single wget command and numerous packages and libraries start downloading.... Specifically:
Check out my (french) website http://www.microlinux.fr. The "Documentation" section contains detailed instructions for setting up MySQL, Apache and PHP. Everything is based on CentOS 5.
Cheers,
Niki Kovacs