Using the Linux Binary Distributions

This page provides important information for users of the Ice binary distributions on Linux platforms. You can obtain these distributions at the ZeroC web site.

On this page:

Overview of the Ice Binary Distributions for Linux

DEB Packages

ZeroC provides the following DEB packages for Debian and Ubuntu:

PackageDescription
zeroc-ice-all-devMeta package that installs all development packages
zeroc-ice-all-runtimeMeta package that installs all run-time packages, servers and utilities
libzeroc-ice-devC++ header files and libraries
libzeroc-ice3.7-javaIce for Java JAR files
libzeroc-ice3.7C++ run-time libraries
libzeroc-icestorm3.7IceStorm service for IceBox C++
php-zeroc-icePHP extension and run-time files
python-zeroc-icePython 2 extension and run-time files
python3-zeroc-icePython 3 extension and run-time files
zeroc-glacier2Glacier2 service
zeroc-iceboxIceBox server for C++
zeroc-icebridgeIceBridge service
zeroc-ice-compilersSlice compilers, such as slice2cpp, slice2java and slice2php
zeroc-icegridIceGrid service
zeroc-icegridguiIceGrid GUI application
zeroc-icepatch2IcePatch2 service

zeroc-ice-slice

Slice files
zeroc-ice-utilsUtilities necessary for administering an Ice installation

RPM Packages

ZeroC provides the following RPMs for Amazon Linux, Red Hat Enterprise Linux and SUSE Linux Enterprise Server:

RPMDescription
ice-all-develMeta package that installs all development packages
ice-all-runtimeMeta package that installs all run-time packages, servers and utilities
glacier2Glacier2 service
iceboxIceBox server for C++
icebridgeIceBridge service
icegridIceGrid service
icegridguiIceGrid GUI application
icepatch2IcePatch2 executable
ice-compilersSlice compilers, such as slice2cpp, slice2java and slice2py

ice-slice

Slice files
ice-utilsUtilities necessary for administering an Ice installation
libice-c++-develC++ header files and symbolic links to the C++ run-time libraries
libice3.7-c++C++ run-time libraries
libicestorm3.7IceStorm service
php-icePHP extension and run-time files
python-icePython 2 extension and run-time files (all distributions except RHEL 8)
python2-icePython 2 extension and run-time files (RHEL 8 only)
python3-icePython 3 extension and run-time files (Amazon Linux 2 and RHEL 8 only)

ZeroC also supplies RPMs for the following third-party packages:

RPM

Description

lmdb

Admin tools for LMDB (statically linked)

lmdb-devel

Header file and static library for LMDB

mcpp-devel

Static library for the MCPP C++ preprocessor

The RPM distribution no longer includes an RPM with the Ice for Java JAR files. See Building Ice Application in Java or more information.


 

Bi-Arch Support on RHEL 7

On RHEL 7, all of the Ice packages listed above are provided for the x86_64 architecture, along with a limited subset of packages for the i686 architecture. The subset includes C++ run-time and development libraries, along with 32-bit versions of the IceBox server and IceStorm service. The 32-bit IceBox package installs the executables as icebox32 (for the IceBox services built with the C++98 mapping) and icebox32++11 (for IceBox services built with the C++11 mapping).

For development purposes, you will still need to install the 64-bit development kit packages: the 32-bit development kit packages complement these 64-bit packages.

Installing the Linux Distributions

This section describes how to install Ice binary packages for all of the supported Linux platforms.

Installing Ice on Debian

Follow the instructions below to install Ice 3.7 on Debian using the packages from ZeroC repositories.

1. Install ZeroC's key to avoid warnings with unsigned packages:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv B6391CB2CFBA643D

2. Add the Ice repository to your system (-s is optional and enables the source repo):

Debian 9
sudo apt-add-repository -s "deb http://zeroc.com/download/ice/3.7/debian9 stable main"
Debian 10
sudo apt-add-repository -s "deb http://zeroc.com/download/ice/3.7/debian10 stable main"
Debian 11
sudo apt-add-repository -s "deb http://zeroc.com/download/ice/3.7/debian11 stable main"
Debian 12
sudo apt-add-repository -s "deb http://zeroc.com/download/ice/3.7/debian12 stable main"


3. Update the package list and install:

sudo apt-get update
sudo apt-get install zeroc-ice-all-runtime zeroc-ice-all-dev

Refer to the package summary if you would like to install fewer packages.

4. Install the source package (optional):

apt-get source zeroc-ice

Debian 9 (Stretch) includes the Ice 3.6.3 packages. 

Debian 10 (Buster) includes the Ice 3.7.2 packages.

Debian 11 (Bullseye) includes the Ice 3.7.5 packages.

Debian 12 (Bookworm) includes the Ice 3.7.8 packages.

If you would rather install these Ice packages included in Universe, skip the instructions above and use the following command:

sudo apt-get install zeroc-ice-all-runtime zeroc-ice-all-dev

Installing Ice on Ubuntu

Follow the instructions below to install Ice 3.7 on Ubuntu. ZeroC provide Ice 3.7 packages for Ubuntu Xenial (16.04), Ubuntu Bionic (18.04), Ubuntu Focal (20.04), and Ubuntu Jammy (22.04).

1. Install ZeroC's key to avoid warnings with unsigned packages:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv B6391CB2CFBA643D

2. Add the Ice repository to your system (-s is optional and enables the source repo):

sudo apt-add-repository -s "deb http://zeroc.com/download/Ice/3.7/ubuntu`lsb_release -rs` stable main"

3. Update the package list and install:

sudo apt-get update
sudo apt-get install zeroc-ice-all-runtime zeroc-ice-all-dev

Refer to the package summary if you would like to install fewer packages.

4. Install the source package (optional):

apt-get source zeroc-ice

Ubuntu 16.04 (Xenial)'s universe includes the Ice 3.5.1 packages

Ubuntu 18.04 (Bionic)'s universe includes the Ice 3.7.0 packages.

Ubuntu 20.04 (Focal)'s universe includes the Ice 3.7.3 packages.

Ubuntu 22.04 (Jammy)'s universe includes the Ice 3.7.6 packages.

If you would rather install these Ice 3.7 packages included in Universe, skip the instructions above and use the following command:

sudo apt-get install zeroc-ice-all-runtime zeroc-ice-all-dev

Installing Ice on Amazon Linux

Follow the instructions below to install Ice on Amazon Linux 2 (amzn2):

1. Add the Ice repositories to your Amazon Linux system: 

sudo yum install https://zeroc.com/download/ice/3.7/amzn2/ice-repo-3.7.amzn2.noarch.rpm

2. Install Ice:

sudo yum install ice-all-runtime ice-all-devel

Refer to the package summary if you would like to install fewer packages.

The EC2 documentation provides more information about installing packages on Amazon Linux.

Installing Ice on Red Hat Enterprise Linux 8 or 9

Follow the instructions below to install Ice on RHEL 8 or 9:

1. Add the Ice repositories to your system: 

EL8
sudo dnf install https://zeroc.com/download/ice/3.7/el8/ice-repo-3.7.el8.noarch.rpm
EL9
sudo dnf install https://zeroc.com/download/ice/3.7/el9/ice-repo-3.7.el9.noarch.rpm

2. Install Ice:

Install
 sudo dnf install ice-all-runtime ice-all-devel


Refer to the package summary if you would like to install fewer packages.

Installing Ice on Red Hat Enterprise Linux 7

Follow the instructions below to install Ice on RHEL 7:

1. Add the Ice repositories to your system: 

EL7
sudo yum install https://zeroc.com/download/ice/3.7/el7/ice-repo-3.7.el7.noarch.rpm

2. Install Ice:

Install
 sudo yum install ice-all-runtime ice-all-devel


Refer to the package summary if you would like to install fewer packages.

Installing Ice on SUSE Linux Enterprise Server 12

Follow the instructions below to install Ice on SLES 12:

1. Add the Ice repositories to your system and import the public key: 

wget https://zeroc.com/download/ice/3.7/sles12/zeroc-ice3.7.repo
sudo zypper addrepo zeroc-ice3.7.repo
sudo sudo rpm --import https://zeroc.com/download/GPG-KEY-zeroc-release-B6391CB2CFBA643D

2. Install Ice:

sudo zypper install ice-all-runtime ice-all-devel

Refer to the package summary if you would like to install fewer packages.

Setting Up your Linux Environment to Use Ice

After installing Ice, read the relevant language-specific sections below to learn how to configure your environment and start programming with Ice.

C++

When compiling and linking Ice for C++ programs, you must pass the -pthread option. A typical compile command would look like this:

c++ -c -std=c++11 -DICE_CPP11_MAPPING -pthread myprogram.cpp
c++ -c -pthread myprogram.cpp

If you specify a non-default C++ compilation mode for your application with the -std option, you may need to rebuild Ice for C++98 from source. See Known Issues and Platform Notes for more information.

C++11 and C++98 in the tabs above correspond to the Ice C++ mapping you're using.

When linking a program you must link with at least the Ice library. A typical link command would look like this:

c++ -std=c++11 -o myprogram myprogram.o -pthread -lIce++11
c++ -o myprogram myprogram.o -pthread -lIce

Additional libraries are necessary if you are using an Ice service such as IceGrid or Glacier2.

PHP

The Ice extension for PHP is loaded automatically when the interpreter loads the contents of the file /etc/php.d/ice.ini (on Red Hat Enterprise Linux and Amazon Linux) or /etc/php5/conf.d/ice.ini (on SUSE Linux Enterprise Server and Ubuntu). This file contains the line shown below:

extension=ice.so

You can modify this file to include additional configuration directives.

At run time, the PHP interpreter requires the Ice shared libraries.

You can verify that the Ice extension is installed properly by examining the output of the php -m command, or by calling the phpinfo() function from a script.

Your application will also need to include at least some of the Ice for PHP run-time source files (installed in /usr/share/php on RHEL, Amazon Linux, and Ubuntu, and in /usr/share/php5 on SLES). This installation directory is included in PHP's default include path, which you can verify by executing the following command:

php -i | grep include_path

If the installation directory is listed, no further action is necessary to make the run-time source files available to your application. Otherwise, you can modify the include_path setting in php.ini to add the installation directory:

include_path = /usr/share/php:...

Another option is to modify the include path from within your script prior to including any Ice run-time file:

ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/usr/share/php');
require 'Ice.php'; // Load the core Ice run time definitions.

SELinux Notes (for Red Hat Enterprise Linux users)

SELinux augments the traditional Unix permissions with a number of new features. In particular, SELinux can prevent the httpd daemon from opening network connections and reading files without the proper SELinux types.

If you suspect that your PHP application does not work due to SELinux restrictions, we recommend that you first try it with SELinux disabled. As root, run:

setenforce 0

to disable SELinux until the next reboot of your computer.

If you want to run httpd with the Ice extension and SELinux enabled, you must do the following:

  1. Allow httpd to open network connections:

    setsebool httpd_can_network_connect=1
    

    You can add the -P option to make this setting persistent across reboots.
     

  2. Make sure any .ice file used by your PHP scripts can be read by httpd. The enclosing directory also needs to be accessible. For example:

    chcon -R -t httpd_sys_content_t /opt/MyApp/slice

Using the Sample Programs on Linux

Sample programs for all programming languages are available in a separate ice-demos GitHub repository. Simply clone this repository:

git clone -b 3.7 https://github.com/zeroc-ice/ice-demos.git
cd ice-demos

Starting IceGrid GUI on Linux

You can launch IceGrid GUI with the icegridgui command. IceGrid GUI is a Java-based application.

Startup Scripts for IceGrid and Glacier2 Services

All distributions include the following service configuration files:

  • /etc/icegridregistry.conf
  • /etc/icegridnode.conf
  • /etc/glacier2router.conf

Distributions which use sysvinit or upstart contain the following sample scripts:

  • /etc/init.d/icegridregistry 
  • /etc/init.d/icegridnode 
  • /etc/init.d/glacier2router 

Distributions which use systemd contain the following services:

  • icegridregistry.service
  • icegridnode.service
  • glacier2router.service

The installation also creates a user account and group for running these services (account ice and group ice), and data directories for icegridregistry and icegridnode (/var/lib/ice/icegrid/registry and /var/lib/ice/icegrid/node1).

By default, all these services are off at all runlevels. You need to manually switch on one or more runlevels, as shown below:

#
# On systems using svsvinit, configure the icegridregistry to start at the
# default run levels:
#
sudo chkconfig icegridregistry on
 
#
# On systems using systemd, start icegridregistry with the multi-user target
#
sudo systemctl enable icegridregistry.service

Before doing so, please review the script itself and its associated configuration file.