byteflick

Install cPanel on Linux Server

Sep 27th, 2023
2,755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. Subscribe my Youtube Channel and Support me
  2. https://youtube.com/@byteflick
  3.  
  4. Supported Operating System
  5. Cloudlinux 8
  6. AlmaLinux 8
  7. AlmaLinux 9
  8. Rocky Linux 8
  9. Rocky Linux 9
  10. Ubuntu 20.04 LTS
  11.  
  12. I am using the Ubuntu 20.04 operating system. The best and recommended Operating system for web hosters is Cloudlinux which is a paid operating system that also enhances the functionality of cPanel.
  13.  
  14. If you want to buy a Cloudlinux pro license at a cheap rate, then email me.
  15.  
  16. First, log into your server with any SSH client then update the packages and reboot the server.
  17.  
  18. [Ubuntu]
  19. sudo apt update -y && sudo apt upgrade -y && sudo reboot
  20.  
  21. [Cloudlinux/AlmaLinux/Rocky Linux]
  22. sudo yum update -y && sudo yum upgrade -y && sudo reboot
  23.  
  24. Execute the following command to change the hostname for all operating systems.
  25.  
  26. sudo hostnamectl set-hostname yourhostname
  27.  
  28. Now edit the hosts file and also change the hostname there.
  29.  
  30. [Ubuntu]
  31. sudo apt install nano -y
  32.  
  33. [Cloudlinux/AlmaLinux/Rocky Linux]
  34. sudo yum install nano -y
  35.  
  36. sudo nano /etc/hosts
  37.  
  38. Add the following lines at the end of the list.
  39.  
  40. 127.0.0.1 yourhostname
  41. serverip yourhostname
  42.  
  43. Press CTRL + X and press Y and press enter to save changes and exit the editor
  44.  
  45. Now we will disable the built-in firewall system and network manager to let the cpanel use their own firewall system.
  46.  
  47. [Ubuntu]
  48. sudo systemctl stop ufw && sudo systemctl disable ufw && sudo systemctl stop NetworkManager && sudo systemctl disable NetworkManager
  49.  
  50. [Cloudlinux/AlmaLinux/Rocky Linux]
  51. sudo systemctl stop firewalld && sudo systemctl disable firewalld && sudo systemctl stop NetworkManager && sudo systemctl disable NetworkManager
  52.  
  53. We will now disable the Security-Enhanced Linux or SELinux on the server.
  54.  
  55. In the Ubuntu operating system, SELinux is not installed and is disabled by default. If you are using Cloudlinux/AlmaLinux/Rocky Linux you have to disable the SELinux. You can find the instruction in the description.
  56.  
  57. sudo nano /etc/selinux/config
  58.  
  59. Change SELinux=enforcing
  60. To SELinux=disabled
  61.  
  62. Press CTRL + X and press Y and press enter to save changes and exit the nano editor
  63.  
  64. Now we will change the default operating state of the operating system according to cPanel requirements and reboot the server again.
  65.  
  66. [Ubuntu]
  67. sudo systemctl isolate multi-user.target && sudo systemctl enable multi-user.target && sudo systemctl set-default multi-user.target && sudo reboot
  68.  
  69. [Cloudlinux/AlmaLinux/Rocky Linux]
  70. sudo systemctl isolate multi-user.target && sudo systemctl enable multi-user.target && sudo systemctl set-default multi-user.target && sudo reboot
  71.  
  72. Now let's proceed to the installation of cPanel. Before proceeding you must have a valid cPanel license to complete the installation successfully.
  73.  
  74. If you want to buy a cPanel unlimited accounts license at a cheap rate you can contact me through email.
  75.  
  76. Now install the Perl and screen package and run the installation through the screen session.
  77.  
  78. [Ubuntu]
  79. sudo apt install screen perl -y
  80.  
  81. [Cloudlinux/AlmaLinux/Rocky Linux]
  82. sudo yum install screen perl -y
  83.  
  84. Install cPanel using a one-line command
  85.  
  86. screen -S cpanel
  87. cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
  88.  
  89. This process will take approximately 10 - 30 minutes depending on your server speed.
  90.  
  91. Now access your cPanel using the link provided in the installation logs and follow the on-screen instructions.
  92.  
  93. I will be right back after the license installation.
  94.  
  95. Congratulations! We have successfully installed the cPanel on the Linux server. So, that's all. I hope you have enjoyed my video. Do not forget to press the Like button. If you have not subscribed to my channel then please subscribe to my channel and hit the bell icon to get the update on my latest videos.
  96.  
  97. If you want videos on any other topic then comment below. We will try our best to help you.
Advertisement
Add Comment
Please, Sign In to add comment