<chapter id="gdgif"><title>Administering and Running Applications in <literal>lx</literal> Branded Zones (Tasks)</title><highlights><para>This chapter contains material on running applications in an <literal>lx</literal> branded
zone.</para>
</highlights><sect1 id="gdrqv"><title>About Maintaining a Supported Configuration</title><para>When
you installed a zone with a supported CentOS or Red Hat Enterprise Linux distribution,
you created a supported zone. If you add packages from different versions
to this zone, it is possible to create a branded zone that cannot be supported.</para>
</sect1><sect1 id="gdrpx"><title>Upgrading the Distribution and Adding Packages</title><task id="gdvro"><title>How to Upgrade a CentOS 3.<replaceable>x</replaceable> Distribution</title><tasksummary><para>You must be
the zone administrator in the <literal>lx</literal> branded zone to perform
this procedure.</para>
</tasksummary><procedure remap="single-step"><step><para>Upgrade a CentOS 3.<replaceable>x</replaceable> distribution to
a different version by using <literal>yum</literal> <literal>upgrade</literal> or <literal>up2date</literal>.</para><para>For instructions, see the documentation available
at <ulink url="http://www.centos.org" type="url">http://www.centos.org</ulink>.</para>
</step>
</procedure>
</task><task id="gdrrc"><title>How to Upgrade a Red Hat 3.<replaceable>x</replaceable> Distribution</title><tasksummary><para>You must
be the zone administrator in the <literal>lx</literal> branded zone to perform
this procedure.</para>
</tasksummary><procedure remap="single-step"><step><para>Update a Red Hat Enterprise Linux 3.<replaceable>x</replaceable> distribution
to a different version by using  <literal>up2date</literal>.</para><para>For
instructions, see the documentation available at <ulink url="http://www.redhat.com" type="url">http://www.redhat.com</ulink>.</para>
</step>
</procedure>
</task><task id="gdrtc"><title>How to Upgrade a Package</title><tasksummary><para>You must be the zone
administrator in the <literal>lx</literal> branded zone to perform this procedure.</para>
</tasksummary><procedure remap="single-step"><step><para>To update a package, use one of the following methods.</para><stepalternatives><step><para><userinput>yum update <replaceable>package_name</replaceable></userinput></para>
</step><step><para><userinput>rpm -U <replaceable>package_name</replaceable></userinput></para>
</step>
</stepalternatives>
</step>
</procedure><taskrelated-custom><title>Using <literal>yum</literal> and <literal>rpm</literal></title><itemizedlist><para><literal>yum</literal>:</para><listitem><para>The document <citetitle>Software Management with Yum</citetitle> includes
a chapter on installing software from an isolated package. See <ulink url="http://fedora.redhat.com/docs/yum" type="url"></ulink>.</para>
</listitem><listitem><para><citerefentry><refentrytitle>yum.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para>
</listitem><listitem><para><citerefentry><refentrytitle>yum</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
</listitem>
</itemizedlist><itemizedlist><para><literal>rpm</literal>:</para><listitem><para>See <citetitle>How do I install or upgrade an RPM package?</citetitle> at <ulink url="http://kbase.redhat.com/faq/FAQ_35_198.shtm" type="url"></ulink>.</para>
</listitem><listitem><para><citerefentry><refentrytitle>rpm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
</listitem>
</itemizedlist>
</taskrelated-custom>
</task>
</sect1><sect1 id="gdquy"><title>How to Install an Application in an <literal>lx</literal> Branded
Zone</title><para>Applications
are installed as they are on a Linux system, by mounting the CD and running
the installation program. This section covers a typical application installation
in an <literal>lx</literal> branded zone.</para><tip><para>If you know you will be using CDs or DVDs to install applications
in an <literal>lx</literal> branded zone, add read-only access to CD or DVD
media in the global zone when you initially configure the branded zone. See
step 7 in <olink targetptr="gdqtn" remap="internal">How to Install MATLAB 7.2 Using CDs</olink>.</para>
</tip><sect2 id="gdrlv"><title>About MATLAB</title><para>MATLAB is a high-level language and interactive environment that enables
you to perform computationally intensive tasks quickly. The product was developed
by The MathWorks. See <ulink url="http://www.mathworks.com" type="url"></ulink> for
more information.</para>
</sect2><task id="gdqtn"><title>How to Install MATLAB 7.2 Using CDs</title><procedure><step><para>Obtain the MATLAB 7.2 CDs .</para><para>There are three CDs in
the MATLAB/Simulink package. Only discs 1 and 3 are needed for a simple MATLAB
installation.</para>
</step><step><para>Create and install an <literal>lx</literal> branded zone as described
in <olink targetptr="gdbji" remap="internal">How to Configure, Verify, and Commit the lx Branded
Zone</olink> and <olink targetptr="gdbhu" remap="internal">Installing and Booting lx Branded
Zones</olink>.</para>
</step><step><para>If the Volume Management file system is not running in the global
zone, start it.</para><screen>global# <userinput>svcadm volfs enable</userinput></screen>
</step><step><para>Insert the media.</para>
</step><step><para>Check for media in the drive.</para><screen>global# <userinput>volcheck</userinput></screen>
</step><step><para>Test whether the CD is automounted.</para><screen>global# <userinput>ls /cdrom</userinput></screen><para>You will see a display similar to the following:</para><screen>cdrom   cdrom1   mathworks_2006a1</screen>
</step><step><para>Loopback mount the file system with the options <literal>ro,nodevices</literal> (read-only and no devices) in the non-global zone.</para><screen>global# <userinput>zonecfg -z lx-zone</userinput>
zonecfg:lx-zone> <userinput>add fs</userinput>
zonecfg:lx-zone:fs> <userinput>set dir=/cdrom</userinput>
zonecfg:lx-zone:fs> <userinput>set special=/cdrom</userinput>
zonecfg:lx-zone:fs> <userinput>set type=lofs</userinput>
zonecfg:lx-zone:fs> <userinput>add options [ro,nodevices]</userinput>
zonecfg:lx-zone:fs> <userinput>end</userinput>
zonecfg:lx-zone> <userinput>commit</userinput>
zonecfg:lx-zone> <userinput>exit</userinput></screen>
</step><step><para>Reboot the non-global zone.</para><screen>global# <userinput>zoneadm -z lx-zone reboot</userinput></screen>
</step><step><para>Use the <command>zoneadm</command> <command>list</command> command
with the <option>v</option> option to verify the status.</para><screen>global# <userinput>zoneadm list -v</userinput></screen><para>You will see a display that is similar to the following:</para><screen>ID  NAME     STATUS       PATH                           BRAND      IP
 0  global   running      /                              native     shared
 1  lx-zone  running      /export/home/lx-zone           lx         shared</screen>
</step><step><para>Log in to the <literal>lx</literal> zone.</para><screen>global# <userinput>zlogin lx-zone</userinput></screen>
</step><step><para>Verify the CD-ROM mount.</para><screen>lx-zone# <userinput>ls /cdrom</userinput></screen><para>You will see a display similar to this:</para><screen>cdrom   cdrom1   mathworks_2006a1</screen>
</step><step><para>Create the license file as described in the MATLAB documentation.</para>
</step><step><para>Install the product as described in the product installation guide.</para><screen>lx-zone# <userinput>/mnt/install</userinput></screen>
</step><step><para>Exit the zone.</para><screen>lx-zone# <userinput>exit</userinput></screen><tip><para>You might want to retain the <literal>/cdrom</literal> file system
in your non-global zone. The mount will always reflect the current contents
of the CD-ROM drive, or an empty directory if the drive is empty.</para>
</tip>
</step><step><para>(Optional) If you want to remove the <literal>/cdrom</literal> file
system from the non-global zone, use the following procedure.</para><screen>global# <userinput>zonecfg -z lx-zone</userinput>
zonecfg:lx-zone> <userinput>remove fs dir=/cdrom</userinput>
zonecfg:lx-zone> <userinput>commit</userinput>
zonecfg:lx-zone> <userinput>exit</userinput></screen>
</step>
</procedure>
</task><task id="gdrth"><title>How to Install MATLAB 7.2 Using ISO Images</title><taskprerequisites><para> Note that this method consumes considerable disk space.</para>
</taskprerequisites><procedure><step><para>Obtain the MATLAB 7.2 CDs .</para><para>There are three CDs in
the MATLAB/Simulink package. Only discs 1 and 3 are needed for a simple MATLAB
installation.</para>
</step><step><para>Create and install an <literal>lx</literal> branded zone as described
in <olink targetptr="gdbji" remap="internal">How to Configure, Verify, and Commit the lx Branded
Zone</olink> and <olink targetptr="gdbhu" remap="internal">Installing and Booting lx Branded
Zones</olink>.</para>
</step><step><para>Copy the data from each CD to a <literal>.iso</literal> file.</para><screen>global# <userinput>/usr/bin/dd if=/dev/rdsk/c1d0s2 of=disk1.iso</userinput></screen><para>This copies the data from the first CD to the file <literal>disk1.iso</literal>.
Repeat, using a different file name such as <literal>disk3.iso</literal>,
for the third CD.</para>
</step><step><para>From the global zone, lofi-mount the first <literal>.iso</literal> file
in the <literal>lx</literal> zone.</para><screen>global# <userinput>lofiadm -a /zpool/local/disk1.iso</userinput>
global# <userinput>mount -F hsfs /dev/lofi/1 /zones/lx-zone/root/mnt</userinput></screen>
</step><step><para>Log in to the <literal>lx</literal> zone.</para><screen>global# <userinput>zlogin lx-zone</userinput></screen>
</step><step><para>Use X forwarding to redirect the display to your desktop:</para><screen>lx-zone# <userinput>ssh -X root@lx-zone</userinput></screen>
</step><step><para>Create the license file as described in the MATLAB documentation.</para>
</step><step><para>Install the product as described in the product installation guide.</para><screen>lx-zone# <userinput>/mnt/install</userinput></screen>
</step><step><para>When prompted to insert CD 3, go back to the global zone terminal
window and mount <literal>disk3.iso</literal>file in place of the first.</para><screen>global# <userinput>umount /zones/lx-zone/root/mnt</userinput>
	global# <userinput>lofiadm -d /dev/lofi/1</userinput>
	global# <userinput>lofiadm -a /zpool/local/disk3.iso</userinput>
	global# <userinput>mount -F hsfs /dev/lofi/1 /zones/lx-zone/root/mnt</userinput></screen><para>The installation will finish.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="gdrme"><title>Backing Up <literal>lx</literal> Branded Zones</title><para>For information on zone backup, see <olink targetptr="gbrho" remap="internal">About Backing
Up a Solaris System With Zones Installed</olink>, <olink targetptr="gbrhi" remap="internal">Determining
What to Back Up in Non-Global Zones</olink>, <olink targetptr="gbrko" remap="internal">Backing
Up a Solaris System With Installed Zones</olink>, <olink targetptr="gbrip" remap="internal">About
Restoring Non-Global Zones</olink>, and <olink targetptr="gbrmv" remap="internal">Restoring
a Non-Global Zone</olink>.</para>
</sect1><sect1 id="gdrmt"><title>Features That Are Not Supported in an <literal>lx</literal> Branded
Zone</title><para>The exclusive-IP network configuration is not supported in an <literal>lx</literal> branded
zone. Only the shared-IP network configuration is supported.</para><para>The <command>chroot</command> command is not supported in a Linux zone.
 If used on a process, that process would no longer be able to see the Solaris
libraries it needs to run.</para><para>Although you can configure and install <literal>lx</literal> branded
zones on a Solaris Trusted Extensions system that has labels enabled,
you cannot boot <literal>lx</literal> branded zones on this system configuration.</para><para>You cannot add local Linux file systems using the <literal>fs</literal> resource
property of the <command>zonecfg</command> command.</para>
</sect1>
</chapter>