How to install software packages on CentOS?
To install a software package in CentOS, you can use the yum command. The following are the steps to install a software package.
- Open the terminal window and log in with root privileges or use the sudo command to perform the operation.
- Search for the software package you want to install using the “yum search” command. For example, if you want to install the Apache web server, you can use the following command to search:
- Search for Apache using yum.
- Once you have found the necessary software package, use the yum install command to install the package. For example, you can install the Apache web server using the following command:
- Install httpd using yum.
- Confirm the installation prompts and enter “y” to confirm the installation process.
- After installation is complete, you can use systemctl to start and manage the newly installed software packages. For example, to start the Apache web server, you can use the following command:
- Start the httpd service using systemctl.
- To automatically start a software package during system boot, the ‘systemctl enable’ command can be used. For example, to automatically start the Apache web server during system boot, the following command can be used:
- Enable the httpd service using systemctl.
By following the above steps, you can successfully install software packages in CentOS and carry out the corresponding configuration and management tasks.