4) Install PHP
Use the below command to install PHP. PHP initially called Personal Home Page
, now it is called as Hypertext Preprocessor
. PHP is a open-source software which is designed for web development purpose. It is used for server-side scripting language as well as general-purpose programming language.
[Install php Module]
$ sudo dnf install php php-mysql php-pdo php-gd php-mbstring php-common php-mcrypt php-gettext php-curl php-cli
Create test php file to check whether php is working with apache or not.
[Creating php info file] $ sudo nano /var/www/html/phpinfo.php <?php phpinfo(); ?> [Restart apache service] $ sudo systemctl restart httpd.service
Open your web browser and navigate to http://localhost/index.php or http://your-server-ip-address/index.php or http://127.0.0.1/index.php
The firewall might need to be restarted after running the commands in step 2a – I know my setup required it.
$sudo systemctl reload firewalld
Doug,
Yes, we have updated the article according that.
Very detailed, yet easy to follow and concise. Thanks for taking the time to put this together. It helped me to get LAMP up and running quickly so I can learn the languages of web development and how to set up WordPress and other CMS sites.
Chris,
Welcome