{"id":3563,"date":"2025-09-05T05:53:23","date_gmt":"2025-09-05T05:53:23","guid":{"rendered":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?p=3563"},"modified":"2025-09-05T05:53:24","modified_gmt":"2025-09-05T05:53:24","slug":"install-cpanel-in-linux-server","status":"publish","type":"post","link":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html","title":{"rendered":"Guide to Install cPanel in a Linux Server"},"content":{"rendered":"\n<p>Managing a Linux server without a control panel can be confusing for beginners. Tasks like creating websites, managing email accounts, setting up databases, or configuring DNS often require complex command-line commands. Many beginners get stuck because they don\u2019t know how to handle these server operations efficiently.<\/p>\n\n\n\n<p>Installing cPanel solves these problems by providing a graphical interface that simplifies server management. With cPanel, you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create and manage websites in a few clicks<\/li>\n\n\n\n<li>Set up email accounts without command-line knowledge<\/li>\n\n\n\n<li>Manage databases like MySQL easily<\/li>\n\n\n\n<li>Secure your server and monitor resources conveniently<\/li>\n<\/ul>\n\n\n\n<p>In this guide, we will walk you through the step-by-step installation of cPanel on a Linux server, so even if you are new to server management, you can have a fully functional hosting environment ready in under an hour.<\/p>\n\n\n\n<p><hr><p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html\"><strong>How to Configure DNS on Linux?<\/strong><\/a><\/p><hr><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What are the Prerequisites?<\/strong><\/h2>\n\n\n\n<p>Before installing cPanel, ensure your server meets the following requirements:<\/p>\n\n\n\n<p><strong>\u2794 Supported OS: <\/strong>CentOS 7\/8, AlmaLinux 8, or Rocky Linux 8 (64-bit recommended).<\/p>\n\n\n\n<p><strong>\u2794 Server Resources:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Minimum 2GB RAM or more recommended<\/li>\n\n\n\n<li>Minimum 20 GB disk space<\/li>\n<\/ul>\n\n\n\n<p><strong>\u2794 Root Access:<\/strong> You must have root or sudo privileges to install cPanel.<\/p>\n\n\n\n<p><strong>\u2794 Fresh Server:<\/strong> cPanel must be installed on a fresh server. Existing software or packages may cause conflicts.<\/p>\n\n\n\n<p><strong>\u2794 Static IP:<\/strong> Ensure your server has a static IP address.<\/p>\n\n\n\n<p><strong>\u2794 Minimal Installation:<\/strong> Use a minimal or base Linux installation without a GUI for best performance.<\/p>\n\n\n\n<p><hr><p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/431\/check-port-open-or-not-in-linux.html\"><strong>How to Check Whether Port is Open or Not in Linux?<\/strong><\/a><\/p><hr><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Steps to Install cPanel in a Linux Server<\/strong><\/h2>\n\n\n\n<p>\u2794 Log in to your server using SSH as the root user. You can do this using a terminal<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>ssh root@your-server-ip<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Replace <strong>your-server-ip<\/strong> with your server\u2019s IP address. Enter your root password when prompted.<\/p>\n\n\n\n<p>\u2794 Set a fully qualified domain name (FQDN) as your server hostname.<\/p>\n\n\n\n<p><strong>For example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>hostnamectl set-hostname server.yourdomain.com<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Verify the hostname:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>hostname<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 You have to make sure your server is updated with the latest packages:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>yum update -y<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This ensures smooth installation and prevents conflicts.<\/p>\n\n\n\n<p>\u2794 The next step is optional but recommended: disabling Network Manager and Firewalld to prevent installation issues.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>systemctl stop NetworkManager<\/strong><br><strong>systemctl disable NetworkManager<\/strong><br><strong>systemctl stop firewalld<\/strong><br><strong>systemctl disable firewalld<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 Enable iptables if required:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>systemctl start iptables<\/strong><br><strong>systemctl enable iptables<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 It\u2019s time to install <strong>\u2018Perl\u2019 \u2018curl\u2019 <\/strong>as cPanel requires it to run properly<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>yum install perl curl -y<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>To download &amp; run the cPanel installation script, cPanel provides an automated installation script. Use the following commands:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>cd \/home<\/strong><br><strong>curl -o latest -L https:\/\/securedownloads.cpanel.net\/latest<\/strong><br><strong>sh latest<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The installation process typically takes 30\u201360 minutes, depending on your server&#8217;s resources. Also, during installation, your server may reboot or services may restart.<\/p>\n\n\n\n<p>\u2794 Once installation is complete, access WHM using your browser:<\/p>\n\n\n\n<p><strong>https:\/\/your-server-ip:2087<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <strong>root <\/strong>as the username.<\/li>\n\n\n\n<li>Enter your server root password.<\/li>\n\n\n\n<li>You will see the WHM setup wizard.<\/li>\n<\/ul>\n\n\n\n<p>\u2794 To complete the initial WHM setup, do the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Accept the License Agreement.<\/li>\n\n\n\n<li>Enter your contact email.<\/li>\n\n\n\n<li>Configure nameservers (e.g., ns1.yourdomain.com and ns2.yourdomain.com).<\/li>\n\n\n\n<li>Complete basic security and settings.<\/li>\n<\/ul>\n\n\n\n<p>Once done, your cPanel server is ready to host websites. Now, you can create your first cPanel account.<\/p>\n\n\n\n<p><hr><p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/429\/install-rpm-files-on-linux.html\"><strong>How to Install RPM files on Different Linux Distributions?<\/strong><\/a><\/p><hr><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Tips for Beginners<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always keep your server up to date to avoid vulnerabilities.<\/li>\n\n\n\n<li>Regularly take backups using cPanel\u2019s backup tools.<\/li>\n\n\n\n<li>Use strong passwords for all cPanel accounts.<\/li>\n\n\n\n<li>Monitor server resources to avoid downtime.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Installing cPanel on a Linux server transforms a standard server into a fully functional web hosting platform, making website, email, and database management easier, even for beginners.&nbsp;<\/p>\n\n\n\n<p>By following the steps outlined in this guide, you ensure a secure, optimized, and properly configured server environment.<\/p>\n\n\n\n<p>Remember, the key to a smooth experience is using a fresh, minimal Linux installation, keeping your system up to date, and following best practices for security. Once cPanel is installed, your server is ready to host websites reliably, whether for personal projects, business, or clients.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Managing a Linux server without a control panel can be confusing for beginners. Tasks like creating websites, managing email accounts, setting up databases, or configuring DNS often require complex command-line commands. Many beginners get stuck because they don\u2019t know how to handle these server operations efficiently. Installing cPanel solves these problems by providing a graphical [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-3563","post","type-post","status-publish","format-standard","hentry","category-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install cPanel in a Linux Server?<\/title>\n<meta name=\"description\" content=\"Learn how to install cPanel on a Linux server step by step with our detailed guide that covers prerequisites, installation, WHM setup, and best practices.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install cPanel in a Linux Server?\" \/>\n<meta property=\"og:description\" content=\"Learn how to install cPanel on a Linux server step by step with our detailed guide that covers prerequisites, installation, WHM setup, and best practices.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html\" \/>\n<meta property=\"og:site_name\" content=\"Host IT Smart Knowledge base\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-05T05:53:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-05T05:53:24+00:00\" \/>\n<meta name=\"author\" content=\"Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html\",\"name\":\"How to Install cPanel in a Linux Server?\",\"isPartOf\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website\"},\"datePublished\":\"2025-09-05T05:53:23+00:00\",\"dateModified\":\"2025-09-05T05:53:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108\"},\"description\":\"Learn how to install cPanel on a Linux server step by step with our detailed guide that covers prerequisites, installation, WHM setup, and best practices.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/\",\"name\":\"Host IT Smart Knowledge base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108\",\"name\":\"Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g\",\"caption\":\"Admin\"},\"sameAs\":[\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/\"],\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install cPanel in a Linux Server?","description":"Learn how to install cPanel on a Linux server step by step with our detailed guide that covers prerequisites, installation, WHM setup, and best practices.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html","og_locale":"en_US","og_type":"article","og_title":"How to Install cPanel in a Linux Server?","og_description":"Learn how to install cPanel on a Linux server step by step with our detailed guide that covers prerequisites, installation, WHM setup, and best practices.","og_url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html","og_site_name":"Host IT Smart Knowledge base","article_published_time":"2025-09-05T05:53:23+00:00","article_modified_time":"2025-09-05T05:53:24+00:00","author":"Admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html","name":"How to Install cPanel in a Linux Server?","isPartOf":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website"},"datePublished":"2025-09-05T05:53:23+00:00","dateModified":"2025-09-05T05:53:24+00:00","author":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108"},"description":"Learn how to install cPanel on a Linux server step by step with our detailed guide that covers prerequisites, installation, WHM setup, and best practices.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/467\/install-cpanel-in-linux-server.html"]}]},{"@type":"WebSite","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/","name":"Host IT Smart Knowledge base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108","name":"Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g","caption":"Admin"},"sameAs":["https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/"],"url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/3563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/comments?post=3563"}],"version-history":[{"count":3,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/3563\/revisions"}],"predecessor-version":[{"id":3571,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/3563\/revisions\/3571"}],"wp:attachment":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/media?parent=3563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/categories?post=3563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/tags?post=3563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}