PHP, or Hypertext Preprocessor, is a widely utilized, open-source server-side scripting language specifically designed for web development to create dynamic web pages. It can be embedded into HTML and is commonly associated with file extensions such as .php, .php4, or .php5. However, PHP is not included in a minimal installation of Fedora 16, necessitating manual installation.
This guide will walk you through the process of installing PHP on a Fedora 16 server. This tutorial assumes that you have set up a local yum repository using your DVDROM and have installed the minimal installation type of Fedora 16.
Installing PHP on Fedora 16
To install PHP on Fedora 16, you will need to run the yum command. This will install the basic PHP package, which includes php-cli and php-common. Here is the command you need to run:
[root@fedora16 ~]# yum install php -y
Upon running this command, the system will begin the installation process. It will resolve any dependencies and run a transaction check. The system will then install the PHP package, along with any necessary dependencies.
The installation process will look something like this:
Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package php.i686 0:5.3.10-1.fc16 will be installed --> Processing Dependency: php-common(x86-32) = 5.3.10-1.fc16 for package: php-5.3.10-1.fc16.i686 --> Processing Dependency: php-cli(x86-32) = 5.3.10-1.fc16 for package: php-5.3.10-1.fc16.i686 --> Running transaction check ---> Package php-cli.i686 0:5.3.10-1.fc16 will be installed --> Processing Dependency: libedit.so.0 for package: php-cli-5.3.10-1.fc16.i686 ---> Package php-common.i686 0:5.3.10-1.fc16 will be installed --> Running transaction check ---> Package libedit.i686 0:3.0-4.20110227cvs.fc16 will be installed --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================== Package Arch Version Repository Size ==================================================================================================== Installing: php i686 5.3.10-1.fc16 updates 2.3 M Installing for dependencies: libedit i686 3.0-4.20110227cvs.fc16 Fedora16-Repository 85 k php-cli i686 5.3.10-1.fc16 updates 2.2 M php-common i686 5.3.10-1.fc16 updates 501 k Transaction Summary ==================================================================================================== Install 4 Packages Total download size: 5.1 M Installed size: 16 M
Once the dependencies are resolved, the system will install the PHP package and its dependencies. The total download size will be around 5.1 MB, and the installed size will be around 16 MB.
The installation process will continue as follows:
Downloading Packages: (2/4): php-5.3.10-1.fc16.i686.rpm | 2.3 MB 00:27 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID a82ba4b7: NOKEY Public key for php-5.3.10-1.fc16.i686.rpm is not installed (3/4): php-cli-5.3.10-1.fc16.i686.rpm | 2.2 MB 00:35 (4/4): php-common-5.3.10-1.fc16.i686.rpm | 501 kB 00:06 ---------------------------------------------------------------------------------------------------- Total 73 kB/s | 5.1 MB 01:10 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386 Importing GPG key 0xA82BA4B7: Userid : Fedora (16)Package: fedora-release-16-1.noarch (@anaconda-0) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386 Running Transaction Check Running Transaction Test Transaction Test Succeeded Running Transaction Installing : php-common-5.3.10-1.fc16.i686 1/4 Installing : libedit-3.0-4.20110227cvs.fc16.i686 2/4 Installing : php-cli-5.3.10-1.fc16.i686 3/4 Installing : php-5.3.10-1.fc16.i686 4/4 Installed: php.i686 0:5.3.10-1.fc16 Dependency Installed: libedit.i686 0:3.0-4.20110227cvs.fc16 php-cli.i686 0:5.3.10-1.fc16 php-common.i686 0:5.3.10-1.fc16 Complete!
Upon completion, PHP should be successfully installed on your Fedora 16 server.
Commands Mentioned
- yum install php -y – This command installs PHP on your Fedora 16 server.
Conclusion
Installing PHP on Fedora 16 is a straightforward process that involves running a single command and allowing the system to resolve and install the necessary dependencies.
This guide has provided a step-by-step walkthrough of the process, making it easy for anyone to install PHP on their Fedora 16 server. Whether you’re a seasoned webmaster or a beginner, this guide should have provided you with the knowledge and confidence to install PHP on Fedora 16.
For more guides and tutorials on web servers, check out our articles on the top web servers, including Apache, Nginx, and LiteSpeed. If you’re interested in different types of hosting, we also have articles on dedicated server hosting, VPS server hosting, cloud hosting, and shared hosting.
FAQ
-
What is PHP?
PHP, or Hypertext Preprocessor, is a widely used, open-source server-side scripting language specifically designed for web development to produce dynamic web pages. It can be embedded into HTML.
-
Why isn’t PHP included in a minimal installation of Fedora 16?
A minimal installation of Fedora 16 includes only the most essential software and packages to run the system, and PHP is not among them. This allows the system to be lightweight and efficient.
-
What does the ‘yum install php -y’ command do?
The ‘yum install php -y’ command installs the PHP package on your Fedora 16 server. The ‘-y’ option automatically answers ‘yes’ to any prompts, allowing the installation to proceed without user intervention.
-
What are the dependencies for installing PHP on Fedora 16?
The dependencies for installing PHP on Fedora 16 include php-common and php-cli, as well as libedit. These packages are necessary for PHP to function correctly on the server.
-
What is the total size of the PHP installation on Fedora 16?
The total download size for installing PHP on Fedora 16 is around 5.1 MB, and the installed size is around 16 MB. This includes the PHP package itself and its dependencies.
1 Comment
i have installed PHP-5.3.13-1.fc15.i686 ,and apache started. But i cannot still run .php .
scripts are invalid and shows nothing on browser’s view.
conf files are default.
How should i modify these conf files to make php works?
TVM