BCE-O535 Linux and Shell Programming

0 of 30 lessons complete (0%)

Module 4 Software Management

Installing and Running Packages

Topic 3: Installing and Running Packages

Installing Packages

Using Package Managers:

  • Package managers like yum or dnf on CentOS are the preferred way to install packages.
sudo yum install <package-name>

Resolving Dependencies:

  • The package manager automatically resolves and installs any dependencies required by the package.

Removing Packages

Proper Package Removal:

  • To remove a package, use the package manager.
sudo yum remove <package-name>

Handling Dependencies:

  • The package manager will also handle dependencies during removal, ensuring that no other packages are affected.

Upgrading Packages

Updating to Newer Versions:

  • To update a package to a newer version, use the package manager.
sudo yum update <package-name>

Managing Conflicts:

  • The package manager will handle conflicts between packages, ensuring that the system remains stable.

Package Verification

Checking Package Integrity:

  • You can verify the integrity of installed packages.
rpm -V <package-name>

Verifying Signatures:

  • Package managers often verify package signatures to ensure they haven’t been tampered with.
sudo yum install <package-name>

Managing Services

Starting and Stopping Services:

  • Use systemctl to start or stop services.
sudo systemctl start <service-name> sudo systemctl stop <service-name>

Enabling Services at Boot:

  • To enable a service to start at boot.
sudo systemctl enable <service-name>

Assignments and Practical Exercises

  1. Installing Packages:
    • Practice installing packages using yum or dnf. They’ll be provided with a list of packages to install, and they’ll need to resolve any dependencies.
  2. Removing Packages:
    • Practice removing packages using the package manager. They’ll also need to ensure that dependencies are handled properly.
  3. Upgrading Packages:
    • Upgrade a specific package to the latest version. Use the package manager to perform the upgrade.
  4. Package Verification:
    • Verify the integrity of an installed package and check its signature to ensure it hasn’t been tampered with.
  5. Managing Services:
    • Practice starting, stopping, and enabling services using systemctl. They’ll work with both system services and any custom services they may have set up.

These assignments and exercises will provide hands-on experience in installing, removing, and managing packages, as well as working with services on a Unix system.