sudo dnf install httpd -y<\/pre>\nOnce installed, start and enable the service.<\/p>\n
sudo systemctl enable httpd && sudo systemctl start httpd<\/pre>\nCheck if the service is up and running:<\/p>\n
sudo systemctl status httpd<\/pre>\nYou should receive the following output:<\/p>\n
[root@host ~]# sudo systemctl status httpd\r\n\u25cf httpd.service - The Apache HTTP Server\r\n Loaded: loaded (\/usr\/lib\/systemd\/system\/httpd.service; enabled; vendor preset: disabled)\r\n Active: active (running) since Tue 2023-01-10 06:15:21 CST; 2 days ago\r\n Docs: man:httpd.service(8)\r\n Main PID: 555 (httpd)\r\n Status: \"Total requests: 200; Idle\/Busy workers 100\/0;Requests\/sec: 0.000988; Bytes served\/sec: 2 B\/sec\"\r\n Tasks: 278 (limit: 24796)\r\n Memory: 53.8M\r\n CPU: 3min 8.276s\r\n CGroup: \/system.slice\/httpd.service\r\n \u251c\u2500 555 \/usr\/sbin\/httpd -DFOREGROUND\r\n \u251c\u2500 569 \/usr\/sbin\/httpd -DFOREGROUND\r\n \u251c\u2500 570 \/usr\/sbin\/httpd -DFOREGROUND\r\n \u251c\u2500 571 \/usr\/sbin\/httpd -DFOREGROUND\r\n \u251c\u2500 572 \/usr\/sbin\/httpd -DFOREGROUND\r\n \u2514\u25001420 \/usr\/sbin\/httpd -DFOREGROUND\r\n\r\nJan 10 06:15:21 host.test.vps systemd[1]: Starting The Apache HTTP Server...\r\nJan 10 06:15:21 host.test.vps httpd[555]: Server configured, listening on: port 80\r\nJan 10 06:15:21 host.test.vps systemd[1]: Started The Apache HTTP Server.\r\n<\/pre>\nThe second of the LAMP stack will be the PHP8<\/b> with its extensions. Execute the following command to install the PHP8:<\/p>\nsudo dnf install php php-cli php-fpm php-curl php-mysqlnd php-gd php-readline php-mbstring php-apcu php-xml php-dom php-opcache php-zip php-intl php-common php-bcmath php-json -y<\/pre>\nOnce installed, check the installed PHP version by executing the php -v<\/b> on your command line. You should receive the following output:<\/p>\n[root@host ~]# php -v\r\nPHP 8.0.20 (cli) (built: Jun 8 2022 00:33:06) ( NTS gcc x86_64 )\r\nCopyright (c) The PHP Group\r\nZend Engine v4.0.20, Copyright (c) Zend Technologies\r\n with Zend OPcache v8.0.20, Copyright (c), by Zend Technologies\r\n<\/pre>\nThe final installation of the LAMP stack is the MySQL service. To install the MySQL server execute the following command:<\/p>\n
sudo dnf install mysql-server mysql -y<\/pre>\nStart and enable the mysqld.service with the following commands:<\/p>\n
sudo systemctl start mysqld && sudo systemctl enable mysqld<\/pre>\nCheck the status of the mysqld.service<\/p>\n
sudo systemctl status mysqld<\/pre>\nYou should receive the following output:<\/p>\n
[root@host ~]# sudo systemctl status mysqld\r\n\u25cf mysqld.service - MySQL 8.0 database server\r\n Loaded: loaded (\/usr\/lib\/systemd\/system\/mysqld.service; enabled; vendor preset: disabled)\r\n Active: active (running) since Thu 2023-01-12 14:35:00 CST; 4s ago\r\n Main PID: 3666 (mysqld)\r\n Status: \"Server is operational\"\r\n Tasks: 39 (limit: 24796)\r\n Memory: 456.4M\r\n CPU: 10.492s\r\n CGroup: \/system.slice\/mysqld.service\r\n \u2514\u25003666 \/usr\/libexec\/mysqld --basedir=\/usr\r\n\r\nJan 12 14:34:46 host.test.vps systemd[1]: Starting MySQL 8.0 database server...\r\nJan 12 14:34:46 host.test.vps mysql-prepare-db-dir[3584]: Initializing MySQL database\r\nJan 12 14:35:00 host.test.vps systemd[1]: Started MySQL 8.0 database server.\r\n<\/pre>\n