LINUX Package Cheatsheet
GUI Package management tools are neat and nice to use. My opinion is that generally GUI on the Linux boxes are a security and performance problem. IT people that are managing their Linux boxes usually use the command line for the every day tasks. Good practice in this is ok when a user has a broken down X session and cannot establish a GUI interface to his/hers box.
First encounter is a simple installation and removal of single and multiple packages. Yum also checks for dependencies and installs them automatically. Here are some simple bash commands:
yum install package1
yum remove package1
yum install package1 package2 package3
yum remove package1 package2 package3
To update a installed package with a new version:
yum update package1
To fetch via online repos and list all the updates for installed packages:
yum list updates
To update the whole system:
yum update
Package searching, two options, if the name is known and if it is not:
yum list package1
yum search packa*
yum search *ackage1
YUM also provides us with a group install of package group with dependencies:
yum groupinstall "FTP Server"
I would also like to introduce the RPM, a powerful package manager for Centos, Redhat and Fedora. This package manager is much faster.
The syntax is similar to the yum, with some small parameter configs. Here is a sample of installation a mozilla mail package on a linux server:
rpm -ivh mozilla-mail-1.7.5-17.i586.rpm
We can list all the rpm packages install and save them to a list in a textual file:
rpm -qa | tee package.txt
To erase a package we can use a simple rpm syntax:
rpm -ev package1
The Aptitude is the package manager for Debian-based Linux distributions including Ubuntu server. Aptitude uses pretty much the same commands as apt-get. It's not a good idea to use both- either use aptitude or apt-get exclusively, or your dependencies will get confused.
Simple starting commands for installing, reinstalling and removing packages:
aptitude install package1
aptitude reinstall package1
aptitude remove package1
aptitude remove --purge package1
The upgrade commands include cache, distro and release upgrade:
aptitude update
aptitude upgrade
aptitude dist-upgrade
Now we could take a look at Software Repositories that we can define as storage locations from where packages can be downloaded and installed. They can be remote and local. We can take a look on the information location where the repositories are configured.
In the past, many Linux programs were distributed as source code, which a user would build into the required program or set of programs, along with the required man pages, configuration files, and so on. Nowadays, most Linux distributors use prebuilt programs or sets of programs called packages, which ship ready for installation on that distribution.
These prebuilt and ready for installation packages are very useful in administering many Linux servers.
Feel free to comment.
No comments:
Post a Comment