Suse Linux is similar to RPM based Linux distro such as RHEL but does not comes with yum command. How do I install a rpm file or packages such as Apache or PHP under Suse Enterprise / OpenSuse Linux?

It would be best if you used YaST (Yet another Setup Tool) or the zypper command/rpm command, in the openSUSE or Suse Enterprise Linux distribution to install the RPM file from the command-line. These days, zypper is recommended method. Hence, all developers and sysadmin should use the zypper command.

Installing RPM In SUSE Linux (SLES)

Simply use the following syntax to install rpm file as root user:

zypper install file.rpm
OR
rpm -ivh file.rpm
OR yast method still works on an older version of SLES but it is now DEPRECATED on the latest version:
yast -i file.rpm
OR
yast2 -i file.rpm
So what happens when you use the yast2 method? For example, here is how I try to install atop*.rpm using the yast2 method:

yast2 -i atop-2.8.1-bp155.1.6.x86_64.rpm
You will get the DEPRECATED method warning and it will tell you to use the zypper command:

DEPRECATED. Use zypper directly: zypper --non-interactive install atop-2.8.1-bp155.1.6.x86_64.rpm
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  atop

1 new package to install.
Overall download size: 192.6 KiB. Already cached: 0 B. After the operation,
additional 778.4 KiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: atop-2.8.1-bp155.1.6.x86_64 (Plain RPM files cache)
                                                        (1/1), 192.6 KiB    

Checking for file conflicts: .........................................[done]
(1/1) Installing: atop-2.8.1-bp155.1.6.x86_64 ........................[done]

Installing Binary Packages In SLES

The yum or up2date command can be used to install pakages from RHN or repos. The yast2/zypper command command can be used to install binary packages too as follows:

zypper install pkg1 pkg2
OR the use yas2 on an older version of SUSE which is no longer recommended:
yast2 -i packageName
yast2 -i apache2

yast2 -i php5 php5-curl php5-fastcgi php5-gd php5-mysql php5-openssl php5-pear php5-zlib

Install Packages Using TUI or GUI Tools In SLES

Just type yast or yast2 comamnd to start yast in TUI (text based user interface over ssh session) or GUI mode:

yast2 -i
OR

yast -i
You can now select and install all supported packages. You can use the same system to remove or delete packages.

Installing RPM Files Using KDE GUI

You can install an RPM file in KDE. First, browse to where the RPM is located. Next, right-click the RPM file. From the menu, select ACTIONS, and then INSTALL WITH YAST. You need supply the root password. Of course, you can just double click on the RPM file and it will allow you to install the same.

Summing up

To install an RPM file called foo.rpm on SUSE, you can use the following command as the root user:

zypper install foo.rpm
## OR ##

rpm -iv foo.rpm
To install RPM files, you can utilize the YaST graphical (GUI and text) utility. Follow these steps on an older version of SLES which is now DEPRECATED:

  1. open YaST/YaST2
  2. Go to the “Software” category, and click on the “Install or Remove Software” button.
  3. Next, click “Add” in the “Install Software” dialog and choose the RPM file you wish to install.
  4. Finally, click “Open” to initiate the installation process.

For more info see the rpm or zypper command manual page by typing the man command or help command:

man zypper
man rpm
man yast

man yast2

 

https://www.cyberciti.biz/faq/novell-sles-suse-installing-software-packages-rpm-files/