If you want to install Magento 2.4.2 on CentOS with cPanel, please refer to install Magento 2.4.2 on cPanel for more details.
You can install Magento CMS through Softaculous one-click installer or via manual installation. This tutorial will assist you in installing Magento manually by following the steps listed below –
1. Download the latest Magento installation package from the Magento website.
Please note that you should download the Magento package as a registered member.
2. Upload the Magento installation package on your web hosting space through cPanel File Manager or an FTP client.
If you want to install Magento in the main domain, such as http://example.com, extract the Magento package in the public_html directory. If you wish to access the Magento store from a subdirectory such as http://example.com/store, extract the Magento package in the public_html/store directory.
3. Create a MySQL database and user from cPanel.
Note database details because you will have to use them during Magento installation.
So far, we believe that you have extracted the Magento package in the public_html folder and created the MySQL database and username.
4. Browse your website at http://example.com; this will open Magento Installation Wizard.
5. Accept the terms and conditions and click on the Continue button.
6. Select your choice of Timezone, Locale, and Currency and press the Continue button.
7. Enter the database details we created in the previous step.
Enter the Database Name, User Name, and User Password. Keep other options unchanged and check the Skip Base URL validation before the next step.
8. Then, click the Continue button to proceed.
9. Enter your personal information and Magento store admin login details.
10. Enter your encryption key or leave it blank.
Magento uses this key to encrypt passwords, credit cards, etc. If this field is left empty, the system will create an encryption key for you and display it on the next page.
11. Click on the Continue button.
12. The You're All Set window will appear; write down your encryption key from this screen.