{"id":2697,"date":"2023-09-23T20:27:26","date_gmt":"2024-01-18T17:53:06","guid":{"rendered":""},"modified":"2025-02-02T00:46:19","modified_gmt":"2025-02-01T23:46:19","slug":"how-to-install-drupal-on-alma-linux-9","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-drupal-on-alma-linux-9\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 Drupal on Alma Linux 9"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<section>\n<p>Drupal is a powerful content management system (CMS) that allows you to build dynamic websites with ease. If you&#8217;re using Alma Linux 9, this guide will walk you through the steps to install Drupal. Whether you&#8217;re running Alma Linux on your local machine or on a <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a>, the process is straightforward.<\/p>\n<h2>Prerequisites<\/h2>\n<p>Before we start, ensure that you have the following prerequisites ready:<\/p>\n<ul>\n<li>Access to a server running Alma Linux 9 (it can be a local server or a ).<\/li>\n<li>Sudo privileges.<\/li>\n<li>A LAMP stack installed (Linux, Apache, MySQL\/MariaDB, and PHP).<\/li>\n<\/ul>\n<h2>Step 1: Update Your Server<\/h2>\n<p>First, make sure your server is up to date by running the following command:<\/p>\n<pre><code>sudo dnf update<\/code><\/pre>\n<p>This ensures that your system has the latest security patches and software updates. It is an important step whether you&#8217;re using Alma Linux on a local machine or a <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a>.<\/p>\n<h2>Step 2: Install Apache, MariaDB, and PHP<\/h2>\n<p>If you don&#8217;t have the LAMP stack installed, you&#8217;ll need to install Apache, MariaDB, and PHP. Run the following commands to set them up:<\/p>\n<pre><code>\r\n# Install Apache\r\nsudo dnf install httpd\r\n\r\n# Install MariaDB\r\nsudo dnf install mariadb-server mariadb\r\n\r\n# Install PHP and required modules\r\nsudo dnf install php php-cli php-mysqlnd php-xml php-gd php-zip php-json\r\n        <\/code><\/pre>\n<p>After installing, start and enable both Apache and MariaDB services:<\/p>\n<pre><code>\r\nsudo systemctl start httpd\r\nsudo systemctl enable httpd\r\n\r\nsudo systemctl start mariadb\r\nsudo systemctl enable mariadb\r\n        <\/code><\/pre>\n<h2>Step 3: Secure MariaDB<\/h2>\n<p>Once MariaDB is installed, secure the database by running the following script:<\/p>\n<pre><code>sudo mysql_secure_installation<\/code><\/pre>\n<p>You&#8217;ll be prompted to set a root password, remove anonymous users, disallow root login remotely, and other security measures.<\/p>\n<h2>Step 4: Create a Database for Drupal<\/h2>\n<p>Now, log into MariaDB to create a database for Drupal:<\/p>\n<pre><code>mysql -u root -p<\/code><\/pre>\n<p>Once logged in, create a new database and user, and grant all privileges:<\/p>\n<pre><code>\r\nCREATE DATABASE drupal;\r\nCREATE USER 'drupaluser'@'localhost' IDENTIFIED BY 'strongpassword';\r\nGRANT ALL PRIVILEGES ON drupal.* TO 'drupaluser'@'localhost';\r\nFLUSH PRIVILEGES;\r\nEXIT;\r\n        <\/code><\/pre>\n<h2>Step 5: Download and Install Drupal<\/h2>\n<p>Now, go to the Apache web directory and download Drupal:<\/p>\n<pre><code>\r\ncd \/var\/www\/html\r\nsudo dnf install wget\r\nsudo wget https:\/\/www.drupal.org\/download-latest\/tar.gz\r\nsudo tar -xzvf tar.gz\r\nsudo mv drupal-x.x.x\/* .\r\n        <\/code><\/pre>\n<p>Make sure to replace <code>drupal-x.x.x<\/code> with the actual version number. After extracting, change ownership of the files:<\/p>\n<pre><code>sudo chown -R apache:apache \/var\/www\/html<\/code><\/pre>\n<h2>Step 6: Configure Apache for Drupal<\/h2>\n<p>Create a new virtual host file for Drupal:<\/p>\n<pre><code>sudo nano \/etc\/httpd\/conf.d\/drupal.conf<\/code><\/pre>\n<p>Add the following configuration:<\/p>\n<pre><code>\r\n\r\n    ServerAdmin admin@yourdomain.com\r\n    DocumentRoot \/var\/www\/html\r\n    ServerName yourdomain.com\r\n\r\n    \r\n        AllowOverride All\r\n    \r\n\r\n    ErrorLog \/var\/log\/httpd\/drupal-error.log\r\n    CustomLog \/var\/log\/httpd\/drupal-access.log combined\r\n\r\n        <\/code><\/pre>\n<p>Save and exit the file, then restart Apache:<\/p>\n<pre><code>sudo systemctl restart httpd<\/code><\/pre>\n<h2>Step 7: Complete the Drupal Installation via Web Browser<\/h2>\n<p>Now, open your browser and go to your server&#8217;s IP address or domain name. You should see the Drupal installation page. Follow the on-screen instructions to complete the setup, entering the database details you created earlier.<\/p>\n<h2>Conclusion<\/h2>\n<p>Installing Drupal on Alma Linux 9 is a fairly simple process if you follow these steps. Whether you&#8217;re setting it up on a local machine or a <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a>, you should have your Drupal site up and running in no time. For those looking to host Drupal on a powerful  server, consider visiting netcloud24.com for reliable VPS hosting solutions.<\/p>\n<\/section>\n<footer>\n<p>For more tutorials and VPS server solutions, visit <a href=\"https:\/\/ie.netcloud24.com\">netcloud24.com<\/a>.<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 Drupal is a powerful content management system (CMS) that allows you to build dynamic websites with ease. If you&#8217;re using Alma Linux 9, this guide will\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-2697","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=2697"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2697\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=2697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=2697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=2697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}