Open picatz opened 6 years ago
Search through available packages:
yum search PACKAGE_NAME
"yum search looks at the following metadata fields: name, summary, description, url."
You can list multiple terms and yum search will list relevant packages by term combination and relevance.
yum search PACKAGE_NAME PACKAGE_NAME ...
You can get more information about a package:
yum info PACKAGE_NAME
Install a package:
sudo yum install PACKAGE_NAME
View installed packages:
yum list installed
Remove a package:
sudo yum remove PACKAGE_NAME
Clear yum cache:
yum clean all
"During its normal use yum creates a cache of metadata and packages. This cache can take up a lot of space. The yum clean command allows you to clean up these files. All the files yum clean will act on are normally stored in /var/cache/yum."
yum search python rsync ssh
yum info rdiff-backup
sudo yum install rdiff-backup
sudo yum remove rdiff-backup
Sources: https://wiki.centos.org/PackageManagement/Yum http://yum.baseurl.org/wiki/YumCommands
start service - `sudo systemctl start service`
stop service - `sudo systemctl stop service`
restart service - `sudo systemctl reload-or-restart service`
sudo systemctl enable application.service
"This command creates a symoblic link from the system's copy of the service file (typically found in /lib/systemd/system or /etc/systemd/system) into the location on disk where systemd looks for autostart files (typically /etc/systemd/system/some_target.target.wants)"
sudo systemctl disable application.service
This removes the symbolic link that indicated the service should be started automatically.
systemctl status application
This will provide you with information like service state, PID, memory, the cgroup hierarchy, and the first few log lines.
You can also check specific states:
Active: systemctl is-active application
Failed: systemctl is-failed application
Enabled: systemctl is-enabled application
List Current Units: systemctl
or systemctl list-units
List All Units: systemctl list-units --all
List Units with a specific state: `systemctl list-units --all --state=active
List only service units: systemctl list-units --type=service
Sources and more information: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units https://en.wikipedia.org/wiki/Systemd
Like what package manager, how to start and stop services with systemd. Tips and tricks.