Main Menu

friends

Latest articles

setting up a very simple firewall (Fedora)
03/08/2009 | mad mad mod

This article describes how to set up a very simple desktop-firewall on Linux (Fedora).  Step 1: make sure iptables is installed on your system:# rpm -qa | grep iptables
iptables-1.4.1.1-1.fc8&nbs [ ... ]


Find out to which RPM package a file belongs
27/10/2010 | mad mad mod

The command to find out to which RPM package a file belongs is:   # rpm -qf /path/to/myfilw   E.g. to find out to which package /etc/passwd belongs: # rpm -qf /etc/passwd setup-2.8.9-3.f [ ... ]


Other Articles
Facebook MySpace Twitter Digg Delicious Stumbleupon Google Bookmarks 

Designed by:
SiteGround web hosting Joomla Templates
Install PHP for Apache (Fedora 12) E-mail
sysadmin
This article describes how to install PHP for Apache on Linux (Fedora 12). 
 

Step 1: Install PHP

 

run the following command as root:



# yum install php


 

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.i686 0:5.3.2-1.fc12 set to be updated
--> Processing Dependency: php-cli = 5.3.2-1.fc12 for package: php-5.3.2-1.fc12.i686
--> Processing Dependency: php-common = 5.3.2-1.fc12 for package: php-5.3.2-1.fc12.i686
--> Running transaction check
---> Package php-cli.i686 0:5.3.2-1.fc12 set to be updated
---> Package php-common.i686 0:5.3.2-1.fc12 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================
Package Arch Version Repository Size
============================================================================================================================
Installing:
php i686 5.3.2-1.fc12 updates 1.1 M
Installing for dependencies:
php-cli i686 5.3.2-1.fc12 updates 2.2 M
php-common i686 5.3.2-1.fc12 updates 515 k

Transaction Summary
============================================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)

Total download size: 3.8 M
Is this ok [y/N]: y
 

Step 2: create a php page

 

go to the "html" directory (default is /var/www/html):

 

# cd /var/www/html/

 

and open a new file called "test.php"

# vi test.php

 

write the following PHP code into that file and save & close the file with ":wq"

 

<?php

Print "Hello, World! from php";

?>

 

 

Step 3: restart apache

 

 

# service httpd restart

 

Now open a browser window and go to "http://localhost/test.php" or "http://127.0.0.1/test.php" or whatever your URL is. 

 

SELinux

If You have SELinux enabled you have to make sure the security context of your new file is "httpd_sys_content_t". run "ls -laZ" to check the security context:

# ls -laZ /var/www/html/test.php
-rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t test.php

 

If it is NOT httpd_sys_content_t you can restore the context with restorecon:

 

# restorecon /var/www/html/test.php

 

 
 
Comments (2)
  • Anonymous
    :D
  • D.Muherjee  - mysql
    this page is good but should also include enabling mysql for fedora12
  • admin  - mysql
    http://www.madmadmod.com/sysadmin/53-install-mysql-for-apache-fedora-1 2.html

    cheers
    mod
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting