LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I know that apache, MySql, PHP, phpMyAdmin is Installed (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-know-that-apache-mysql-php-phpmyadmin-is-installed-142318/)

AskMe 02-04-2004 03:27 PM

How do I know that apache, MySql, PHP, phpMyAdmin is Installed
 
How do I know that I have Installed Apache, PHP and MySql successfully and it is running well. Does phpMyAdmin comes with Red Hat 9 CD I mean together with MySql and Apache.
I am new user to LINUX.

david_ross 02-04-2004 03:36 PM

AFAIK phpMyAdmin isn't part of the installation you can get it from:
http://www.phpmyadmin.net

To see if your services are running:
ps -ef | grep -e "httpd\|mysql"

To see if php is working create a file called "phpinfo.php" in your DocumentRoot containing
Code:

<?php phpinfo(); ?>
then try to access it in your browser via your web server. If php is installed you will get an html page with a purple banner.

AskMe 02-04-2004 03:46 PM

I see the following, But still I cannot see PHP anywhere...
Do I have to write any php file and run it, then how?

This is what I see, when I run above command.............................................................................................
root 2215 1 0 04:59 ? 00:00:00 /usr/sbin/httpd
apache 2236 2215 0 04:59 ? 00:00:00 [httpd]
apache 2237 2215 0 04:59 ? 00:00:00 [httpd]
apache 2238 2215 0 04:59 ? 00:00:00 [httpd]
apache 2239 2215 0 04:59 ? 00:00:00 [httpd]
apache 2240 2215 0 04:59 ? 00:00:00 [httpd]
apache 2241 2215 0 04:59 ? 00:00:00 [httpd]
apache 2242 2215 0 04:59 ? 00:00:00 [httpd]
apache 2243 2215 0 04:59 ? 00:00:00 [httpd]
root 2852 1 0 05:02 ? 00:00:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf
mysql 2877 2852 0 05:02 ? 00:00:00 [mysqld]
engineer 2888 2542 0 05:03 pts/1 00:00:00 mysql
engineer 2976 2948 0 05:43 pts/2 00:00:00 grep -e httpd\|mysql

david_ross 02-04-2004 03:56 PM

Both apache and mysql seem to be running ok.

Quote:

Originally posted by AskMe
I see the following, But still I cannot see PHP anywhere...
Do I have to write any php file and run it, then how?

Quote:

Originally posted by david_ross
To see if php is working create a file called "phpinfo.php" in your DocumentRoot containing
Code:

<?php phpinfo(); ?>
then try to access it in your browser via your web server. If php is installed you will get an html page with a purple banner.


AskMe 02-04-2004 04:10 PM

Document root? Which directory is it. Is it my home directory? Do I have to log as root to run any php files?

deidre 02-04-2004 04:15 PM

DocumentRoot:
The directory out of which you will serve your
documents. By default, all requests are taken from this directory, but
symbolic links and aliases may be used to point to other locations.

david_ross 02-04-2004 04:16 PM

The document root will be defined in httpd.conf:
grep DocumentRoot /path/to/httpd.conf

_KDF 02-04-2004 05:27 PM

find you httpd.conf

# updatedb
# locate httpd.conf

then open httpd.conf with your favourite editor (we will say emacs :) )

# emacs httpd.conf

locate documentroot=/some/path in the conf file, that is the directory where you will place the next file.

ctrl + x then ctrl + c to exit emacs

then cd to wherever your document root is now

# emacs phpinfo.php

and type <?php phpinfo(); ?> into it.

then

ctrl + x
ctrl + s
ctrl + x
ctrl + c

now open your browser and type http//yourip/phpinfo.php and you should see a whole bunch of stuff, if you do php is installed.


All times are GMT -5. The time now is 03:10 AM.