Dave,
What you need is php, msql & apache.
You can install all the packages via using yum
First execute yum install php php-mysql httpd mysqlclient10 mysql-server
yum will resolve all dependences for you and probably will install some additional packages that you may need.
If you have some packages already installed yum will tell you !
After installation, you will have to start several services:
service httpd start service mysqld start
to test that your webserver is running you can use your local browser
httpd://localhost
the best way to test php is to put a phpinfo.php file in your webserver document root usually in /var/www/html/.
Do the following:
vi /var/www/html/phpinfo.php
insert in the first line:
<? phpinfo(); ?>
To test php do the following:
httpd://localhost/phpinfo.php
it will show you your php configuration.
Nassri
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Dave Gutteridge Sent: sexta-feira, 16 de Setembro de 2005 11:52 To: centos@centos.org Subject: [CentOS] Are PHP and MySQL running on my CentOS installation?
When I was installing CentOS, I noticed among the list of components that PHP and MySQL were available. I made sure they were selected because I develop a lot of web sites in PHP/MySQL, but I always do my testing on the server side. I thought it would be kind of cool if I could do the testing and development on my home machine.
Which is a long way of saying that I think I have PHP/MySQL on my machine, but have no idea what the heck to do with them. I mean, I can script PHP and write queries for MySQL, but don't know anything about their set up and installation.
I wrote a small test HTML page with basic head and body information,
and
simply this PHP in the body:
<?php echo 'hello world': ?>
And then opened it in FireFox. As expected, it didn't display
anything.
So I went to my trusty friend, Google, and asked about it. But it's
one
of those cases where people seem to assume that it's already
installed,
and if it's installed, it's already working. The PHP site itself says "We do not distribute UNIX/Linux binaries. Most Linux distributions
come
with PHP these days" and then not much else about running it.
Am I going to find myself in a whole new world of confusing settings
and
configurations if I try to get PHP working on my home machine?
Dave
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, 2005-09-16 at 12:11 +0100, ABOKHALAF, Nassri Abdellatif wrote:
Dave,
What you need is php, msql & apache.
You can install all the packages via using yum
First execute
yum install php php-mysql httpd mysqlclient10 mysql-server
yum will resolve all dependences for you and probably will install some additional packages that you may need.
If you have some packages already installed yum will tell you !
After installation, you will have to start several services:
service httpd start service mysqld start
to test that your webserver is running you can use your local browser
httpd://localhost
the best way to test php is to put a phpinfo.php file in your webserver document root usually in /var/www/html/.
Do the following:
vi /var/www/html/phpinfo.php
insert in the first line:
<? phpinfo(); ?>
To test php do the following:
httpd://localhost/phpinfo.php
it will show you your php configuration.
Also, make sure you are not running selinux
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Dave Gutteridge Sent: sexta-feira, 16 de Setembro de 2005 11:52 To: centos@centos.org Subject: [CentOS] Are PHP and MySQL running on my CentOS installation?
When I was installing CentOS, I noticed among the list of components that PHP and MySQL were available. I made sure they were selected because I develop a lot of web sites in PHP/MySQL, but I always do my testing on the server side. I thought it would be kind of cool if I could do the testing and development on my home machine.
Which is a long way of saying that I think I have PHP/MySQL on my machine, but have no idea what the heck to do with them. I mean, I can script PHP and write queries for MySQL, but don't know anything about their set up and installation.
I wrote a small test HTML page with basic head and body information,
and
simply this PHP in the body:
<?php echo 'hello world': ?>
And then opened it in FireFox. As expected, it didn't display
anything.
So I went to my trusty friend, Google, and asked about it. But it's
one
of those cases where people seem to assume that it's already
installed,
and if it's installed, it's already working. The PHP site itself says "We do not distribute UNIX/Linux binaries. Most Linux distributions
come
with PHP these days" and then not much else about running it.
Am I going to find myself in a whole new world of confusing settings
and
configurations if I try to get PHP working on my home machine?
On Fri, 2005-09-16 at 07:01 -0500, Johnny Hughes wrote:
On Fri, 2005-09-16 at 12:11 +0100, ABOKHALAF, Nassri Abdellatif wrote:
the best way to test php is to put a phpinfo.php file in your webserver document root usually in /var/www/html/.
Do the following:
vi /var/www/html/phpinfo.php
insert in the first line:
<? phpinfo(); ?>
To test php do the following:
httpd://localhost/phpinfo.php
it will show you your php configuration.
Also, make sure you are not running selinux
Do note that SELinux does *not* interfere with reading normal files from the standard location of /var/www/html (including running them through PHP). And there are options available in system-config-securitylevel for fine-tuning how SELinux deals with httpd.
Thank you for the helpful advice. I have not yet undertaken some of the steps recommended here, but I will soon and report back anything that requires further clarification.
But I did want to speak to this issue of whether or not this is an appropriate place to address these issues.
First, let me clarify that this issue is not how to run PHP or MySQL in general. It's that I thought I had installed these applications when I installed CentOS. To determine whether or not they are working is in part a matter of trying to find out how much I can assume about the CentOS installation process. Was the PHP application offered in the installer the full PHP service I need to run PHP scripts on my computer? I think this is at least, in some ways, related to CentOS, as it's CentOS which is the environment that has determined what version of PHP I'm running and what settings it has.
But further than that, when I was first looking for a Linux distribution, one of my criteria was trying to find one that had a large and helpful community of support. For the most part, this list and the CentOS community has met that need.
But I will have questions where, like in this instance, I am not so sure about the borders between the application and the operating system, and I need help clarifying that so that I can take my queries to the right place for the right reasons. I mean, I don't understand why questions I, and others, have had about installing and configuring (and even running) KDE, Gnome, Gpilot, YUM, and installing OpenOffice and other applications were answered here without comment about their suitability for this list, but how to install and configure PHP is deemed inappropriate.
I'm looking for a community that is looking to help me get into the world of Linux, via their distribution. If the CentOS community is not that kind of community, one that helps Newbies, then that would be a little sad as I've invested so much work in getting CentOS to meet my needs, and I've felt that overall the CentOS community has been very welcoming. But if this group, or it's moderators, do not have the patience to help a newbie who does not know why a YUM installation question is on topic but a PHP installation question isn't, please direct me to the community and or distribution that is.
Thank you.
Dave
On Sat, 2005-09-17 at 14:11 +0900, Dave Gutteridge wrote:
Thank you for the helpful advice. I have not yet undertaken some of the steps recommended here, but I will soon and report back anything that requires further clarification.
But I did want to speak to this issue of whether or not this is an appropriate place to address these issues.
First, let me clarify that this issue is not how to run PHP or MySQL in general. It's that I thought I had installed these applications when I installed CentOS. To determine whether or not they are working is in part a matter of trying to find out how much I can assume about the CentOS installation process. Was the PHP application offered in the installer the full PHP service I need to run PHP scripts on my computer? I think this is at least, in some ways, related to CentOS, as it's CentOS which is the environment that has determined what version of PHP I'm running and what settings it has.
But further than that, when I was first looking for a Linux distribution, one of my criteria was trying to find one that had a large and helpful community of support. For the most part, this list and the CentOS community has met that need.
But I will have questions where, like in this instance, I am not so sure about the borders between the application and the operating system, and I need help clarifying that so that I can take my queries to the right place for the right reasons. I mean, I don't understand why questions I, and others, have had about installing and configuring (and even running) KDE, Gnome, Gpilot, YUM, and installing OpenOffice and other applications were answered here without comment about their suitability for this list, but how to install and configure PHP is deemed inappropriate.
I'm looking for a community that is looking to help me get into the world of Linux, via their distribution. If the CentOS community is not that kind of community, one that helps Newbies, then that would be a little sad as I've invested so much work in getting CentOS to meet my needs, and I've felt that overall the CentOS community has been very welcoming. But if this group, or it's moderators, do not have the patience to help a newbie who does not know why a YUM installation question is on topic but a PHP installation question isn't, please direct me to the community and or distribution that is.
---- No - it was appropriate - you should feel free to ask away. I think Karanbir was a bit too jumpy from other threads this week.
All of the Red Hat lists are un-moderated and they work. There are no 'rules' as of this point - at least none published on the web site. At this point, there are no moderators and you should feel free to post your questions. Sometimes things get off-topic and that's not the worst thing.
You shouldn't have to configure php and apache at all if you put your files in /var/www/html. If you put them anywhere else, you undoubtedly would have to do some configuration (system-config-httpd) if necessary, edit /etc/httpd/conf.d/php.conf and if necessary...
http://fedora.redhat.com/docs/selinux-apache-fc3/
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux- guide/
Craig
On Sat, 17 Sep 2005, Dave Gutteridge wrote:
I'm looking for a community that is looking to help me get into the world of Linux, via their distribution. If the CentOS community is not that kind of community, one that helps Newbies, then that would be a little sad as I've invested so much work in getting CentOS to meet my needs, and I've felt that overall the CentOS community has been very welcoming. But if this group, or it's moderators, do not have the patience to help a newbie who does not know why a YUM installation question is on topic but a PHP installation question isn't, please direct me to the community and or distribution that is.
I would say be patient with the list. Most people here are helpful and friendly. There's just a bad run lately of people picking at tiny portions of posts and making them into off-topic personal pissing matches (including myself as a guilty party here). As a consequence the list has started to turn zero tolerance all of a sudden. I wouldn't take this as the norm.
If it gets to be too much (which I personally don't think it is, yet) Ubuntu and FreeBSD have fantastic user communities with very pragmattic users who just want to get stuff done. Ubuntu is a rough, but very high quality distribution. I run CentOS, even on my laptop, so I don't prefer Ubuntu. But my experience with it and the user community was very good.
Preston
On Sat, 2005-09-17 at 00:11, Dave Gutteridge wrote:
But I did want to speak to this issue of whether or not this is an appropriate place to address these issues.
Maybe... When someone suggests posting elsewhere it doesn't mean you aren't welcome here, it means that you'll get better answers from a list focused more specifically on the topic.
First, let me clarify that this issue is not how to run PHP or MySQL in general. It's that I thought I had installed these applications when I installed CentOS. To determine whether or not they are working is in part a matter of trying to find out how much I can assume about the CentOS installation process. Was the PHP application offered in the installer the full PHP service I need to run PHP scripts on my computer? I think this is at least, in some ways, related to CentOS, as it's CentOS which is the environment that has determined what version of PHP I'm running and what settings it has.
rpm -qa shows all installed packages rpm -q php shows the package version number yum info php more info yum search php includes available package not installed
But I will have questions where, like in this instance, I am not so sure about the borders between the application and the operating system, and I need help clarifying that so that I can take my queries to the right place for the right reasons. I mean, I don't understand why questions I, and others, have had about installing and configuring (and even running) KDE, Gnome, Gpilot, YUM, and installing OpenOffice and other applications were answered here without comment about their suitability for this list, but how to install and configure PHP is deemed inappropriate.
It wasn't clear that your question was about installing packages. Except for the subject line, it was more like 'this doesn't work'. No one could tell if you were even running apache with the file in the right place with the right name for php to process it. If you want help you have to be very specific about what you tried and how it failed, including any errors mentioned in the logs.
I'm looking for a community that is looking to help me get into the world of Linux, via their distribution. If the CentOS community is not that kind of community, one that helps Newbies, then that would be a little sad as I've invested so much work in getting CentOS to meet my needs, and I've felt that overall the CentOS community has been very welcoming. But if this group, or it's moderators, do not have the patience to help a newbie who does not know why a YUM installation question is on topic but a PHP installation question isn't, please direct me to the community and or distribution that is.
When you get down to questions about specific applications that have their own mailing list the advice to ask there is good simply because that's where you'll find the most expertise. But if someone here knows the answer they will probably reply.
On Sat, 2005-09-17 at 01:38 -0500, Les Mikesell wrote:
Maybe... When someone suggests posting elsewhere it doesn't mean you aren't welcome here, it means that you'll get better answers from a list focused more specifically on the topic.
Exactly ...
When a suggestion is made that you might find better answers on a separate list, that is not negative.
If you want to know how to configure postfix ... the postfix list is the place for that.
If you want to know how to configure ssh virtual hosts in apache .. the apache list is the place for that.
If you want to know how to configure CPanel on CentOS ... the CPanel lists are the place for that.
etc...
That doesn't mean you CAN'T ask here ... it means you SHOULD also ask there. ---------------------------------------------------------------------- We are trying to prevent comments to this list, like the couple we had already, saying that there are people not using CentOS because there are people here who want to flame and be assholes to each other.
Assholes will not be allowed to post to the lists anymore ... period.
If we decide you are an asshole, you will be prevented from posting to the list. If you don't like it ... too bad. I am getting sick and tired of people acting like babies, if you can't be a rational human being with some semblance of intelligence and manners to others, this is not the place for you.
Please just stop making smart-ass comments that you would not make to someone face to face in a professional work environment. It should not be that hard.
This part of the post ... like my other ones ... is not directed at any one individual, but as a general comment.
Good morning, Johnny...
On Saturday 17 September 2005 4:58 am, Johnny Hughes wrote:
[master snipper at work snipping madly away...]
Assholes will not be allowed to post to the lists anymore ... period.
If we decide you are an asshole, you will be prevented from posting to the list. If you don't like it ... too bad. I am getting sick and tired of people acting like babies, if you can't be a rational human being with some semblance of intelligence and manners to others, this is not the place for you.
I have avoided the temptation to post *anything* to this list because of the very problem(s) you have just noted, as the signal-to-noise ratio has been out of control since I joined the list a few weeks back. There are, as you have noted in recent messages, a number of highly-skilled and well-informed people here, eager to help and offer suggestions, but the vast percentage of messages end up in the byte bucket. Your results may differ, but I think not.
All I have to say from my perspective is BRAVO! You have my full but unqualified support. Let's get back to the business of making CentOS one of the best versions of Linux, and less time spent bickering like this was Usenet. 8-)
Dave
Dave Laird wrote:
Assholes will not be allowed to post to the lists anymore ... period.
If we decide you are an asshole, you will be prevented from posting to the list. If you don't like it ... too bad. I am getting sick and tired of people acting like babies, if you can't be a rational human being with some semblance of intelligence and manners to others, this is not the place for you.
I have avoided the temptation to post *anything* to this list because of the very problem(s) you have just noted, as the signal-to-noise ratio has been out of control since I joined the list a few weeks back. There are, as you have noted in recent messages, a number of highly-skilled and well-informed people here, eager to help and offer suggestions, but the vast percentage of messages end up in the byte bucket. Your results may differ, but I think not.
All I have to say from my perspective is BRAVO! You have my full but unqualified support. Let's get back to the business of making CentOS one of the best versions of Linux, and less time spent bickering like this was Usenet. 8-)
I agree completely. CentOS is the best thing since sliced bread. I've got a number of CentOS 3.X (and a few 4.x) systems in production and they basically just work, requiring a remarkably small amount of maintenance and admin intervention. If it wasn't for the occasional kernel update, most of the machines would have uptimes well in excess of a year. Also, the VAST majority of the people on this list are nice and considerate folks. If you're on the list, it doesn't take long to figure out who you personally don't find useful and it's easy to set up a simple email filter on your mail client. And that list is probably different for us all. 8-)
Is USENET still around? 8-) I gave up on carrying a feed when you basically needed a T3 just for the alt.binaries hierarchy...
Cheers,
----------------------------------------------------------------------
We are trying to prevent comments to this list, like the couple we had already, saying that there are people not using CentOS because there are people here who want to flame and be assholes to each other.
Assholes will not be allowed to post to the lists anymore ... period.
If we decide you are an asshole, you will be prevented from posting to the list. If you don't like it ... too bad. I am getting sick and tired of people acting like babies, if you can't be a rational human being with some semblance of intelligence and manners to others, this is not the place for you.
Please just stop making smart-ass comments that you would not make to someone face to face in a professional work environment. It should not be that hard.
This part of the post ... like my other ones ... is not directed at any one individual, but as a general comment.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
AMEN.......The Gods have spoken and we shall follow :-D
Steven
"On the side of the software box, in the 'System Requirements' section, it said 'Requires Windows or better'. So I installed Linux."
On 9/17/05, Steven Vishoot sir_funzone@yahoo.com wrote:
We are trying to prevent comments to this list, like the couple we had already, saying that there are people not using CentOS because there are people here who want to flame and be assholes to each other.
Assholes will not be allowed to post to the lists anymore ... period.
We all have a chance to learn from this interchange. As I said in a previous post, Linux, IMHO, is all about helping one another. A summary of the thread: question asked (innocent enough but without enough detail), direct on the money responses, a take your business elsewhere response (even if that was not what was intended) , and then a lot of heated interchanges.
It's all a matter of tone. There's a big diffeence (at least for new users to Linux and CentOS) between: "Go ask your question on another list - we don't care" and "I think you might try this ... and, by the way, you might find more help on this topic on the ... list." I would hope to see more of the latter responses.
Don't feed the assholes, and don't treat anyone who asks an innocent question like an asshole.
On Sat, 2005-09-17 at 06:58 -0500, Johnny Hughes wrote:
We are trying to prevent comments to this list, like the couple we had already, saying that there are people not using CentOS because there are people here who want to flame and be assholes to each other.
Assholes will not be allowed to post to the lists anymore ... period.
If we decide you are an asshole, you will be prevented from posting to the list. If you don't like it ... too bad. I am getting sick and tired of people acting like babies, if you can't be a rational human being with some semblance of intelligence and manners to others, this is not the place for you.
Please just stop making smart-ass comments that you would not make to someone face to face in a professional work environment. It should not be that hard.
This part of the post ... like my other ones ... is not directed at any one individual, but as a general comment.
---- I appreciate the intent of this.
I hope that you are going to publish this as list guidelines somewhere as it does represent an arbitrary measuring stick.
I'm not certain that I've seen any comments that wouldn't have been made in a professional work environment so far on this list - except for the fact that I've never seen management make references to assholes.
What we are talking about is the subjectivity of tone - and probably most specifically, the tone embodied in some of Bryan's postings and the reaction thereto which escalated the exchanges to a level that became grating.
Craig
As the original poster, I've decided to abandon this thread.
This thread has not only went into discussions of posting policy, but also inspired someone to start sending emails to everyone from the list using CC - a practise I would like to make sure I am completely disassociated from.
I would hope to never be a part of a thread or discussion which leads to such abuses of list membership.
Also, let me add that I am very sorry if I do not provide enough complete information to get the answers I need. Please understand that I am not trying to be terse or obtuse, but if I omit details it's because I don't know which details to add. I am very much a newbie, and I don't mind being told to RTFM if someone can tell me where in the FM to R.
I hope I will continue to receive the same level of helpful advice that I have seen on this list up until now.
Thank you for taking the time to read my postings.
Dave