Linux Linux help

Installing Programs

1. How do I install Programs?

To install programs or software, you need to have administrator rights in most cases. You can install programs by either the Software Manager, inserting the CD or disc and run the installation, or download and install the program. If the software is archived, like a Zip file, you will need to open or extract the files to another folder on your hard disk and then run the installation program.

If the program to install is a RPM (Redhat Package Manager) package then use yum command with the install option with name of the package, to install it.
If the program is install is a .deb file then use DPKG (Debian package manager) tools with the -i option to install the package.
If the program can be installed using apt-get then use the install option with name of package to install the program.

If the program is direct from source, then you will need to extract the files, then compile and install the program. The standard method is via the command line and run .\configure, make and then make install commands. Read the INSTALL or README files with the source code for detailed instructions.

Programs are usually installed to the /usr/bin folder on Linux.You can locate a program using the which programname command.

2. How do I uninstall programs?

To remove a program from your hard disk, open the Software Manager tool, search for the program in question and select Remove.
If the program is installed using the RPM (Redhat Package Manager) use the yum command with the remove or erase option with name of the package, to uninstall it.
If the program is installed using the DPKG (Debian package manager) then use the -r option to remove the package.
If the program is installed using the apt or apt-get command, use the remove option to uninstall the package.
If the program is manually installed you can run make uninstall to remove it. If not see make -n install to see steps required to manually remove it or look in the install_manifest.txt file.

3. How do I uninstall or install a program as a User?

You need to logout and login as a user with administrator rights to install or remove software.
Alternatively, you will need to modify the sudoers configuration to give the user rights for the yum dpkg or apt-get commands.

4. How do I check for updates for my programs?

Most linux distributions can be updated from their own software distribution sites. To up date the operating system, libraries and applications, use the Update Manager tool.
It will download any updates it finds (click Refresh), and then all you have to do is select 'Install Updates' to apply the updates. A reboot is not always necessary.

If using the command line, you can use apt-get update to find any updates, then run apt-get install programname to check for new version for one program or run apt-get upgrade to apply all new updates.
For Red Hat or Centos, use the yum update command to update all packages.

Update Manager

5. How do I install a service?

Services are installed in the same way as programs. Unlike user applications, services run in the background. Services are controlled via a service called systemd which now most Linux's use.
Older versions of Linux and Unix use Upstart, or Init. Run 'ls /etc/init.d/' to view init scripts. To see them running you can use the following programs:

See this tutorial on configuring, enabling, and control services on Linux.
To quickly create a bash init script, see this sample service script page. For a systemd service see this tutorial.
If a service does not start then you need to check if the service and dependancies are fully installed and that the configuration files do not have syntax errors in them.
The log is in /var/log and the journalctl tool can be useful to trouble shoot issues with services.