I believed you can check with "rpm -q <packagename>" command.
If not installed, you can do "yum install <packagename". In your case, it would be "yum install apache2".
If you need further reading for how to use yum and stuff, check out here
Hi , I have installed Linux FC3 On my system(I have installed it complete).
Is apache and php installed by default.I don't know how to run a php script on it. I would apreciate any help.
![]()
I believed you can check with "rpm -q <packagename>" command.
If not installed, you can do "yum install <packagename". In your case, it would be "yum install apache2".
If you need further reading for how to use yum and stuff, check out here
I know jack **** about php to be honest but to find installed software you need to do the following:
rpm -qa | grep apache
rpm -qa | php
That bar is the pipe symbol, and is very hady in Linux. On my keyboard it is next to the bracket key (a shift + \ ).
Alternatively, I would see if yumex runs on FC3 (should) and use that as a rather decent yum gui. And get yum setup too, that is a must.
They usually are.Originally Posted by omidkamangar
you run a php script by typing "php" at the command prompt![]()
Actually you will usually follow that with the name of your script, like:
php index.php
Most php scripts are designed to output html code essentially so you can quickly check if index.php is doing what you want by doing the following:
php index.php > index.html
which will write the output to index.html (and *overwrite* any existing index.html file - be careful). You can then open index.html in your favourite browser to see if it looks the way you expect, eg:
firefox index.html
That's how I test my php scripts before uploading them to the webhosting servers.
Of course, it is probably best to set up your own apache & php servers on your localhost to test the whole thing live on your local machine but I haven't done this so can't help you there.
James
Bookmarks