Solaris 10 : Installing packages/Patches/ Applications in zones

 

In the global zone view the SMCsudo and SMCtop packages:

  1. cd /export/home/student/zones

pkginfo -d sudo-1.6.8p4-sol10-zones-sparc-local
application SMCsudo sudo
#
pkginfo -d top-3.5.1-sol10-zones-sparc-local
application SMCtop top
#

Notice the “false” setting for SUNW_PKG_ALLZONES variable:

pkgparam -d sudo-1.6.8p4-sol10-zones-sparc-local SMCsudo SUNW_PKG_ALLZONES
false
#
pkgparam -d top-3.5.1-sol10-zones-sparc-local SMCtop SUNW_PKG_ALLZONES
false
#

 

 


Install the SMCtop package in the global zone using the -G option:

pkgadd -d top-3.5.1-sol10-zones-sparc-local -G

Choose option 1 to install the SMCtop package.
Choose “y” to confirm creating the /opt/local directory for the global zone.

Install the SMCsudo package in the global zone without the -G option:

pkgadd -d sudo-1.6.8p4-sol10-zones-sparc-local

Choose option 1 to install the SMCsudo package.
Choose “y” to confirm creating the /opt/local directory for the global zone.
Choose “y” to confirm creating the /opt/local directory for zone1.
Choose “y” to confirm creating the /opt/local directory for zone2.

Login to zone1 to view the behavior of using -G option:

# zlogin zone1

pkginfo SMCtop
ERROR: information for “SMCtop” was not found

pkginfo SMCsudo
application SMCsudo sudo

Login to zone2 to view the behavior of using the -G option:
#zlogin zone2

pkginfo SMCtop
ERROR: information for “SMCtop” was not found

pkginfo SMCsudo
application SMCsudo sudo

Configuring Applications within Zones

Global zone ip: 192.168.201.21
zone1 ip: 192.168.201.121
zone2 ip: 192.168.201.221

Login to zone1

# zlogin zone1
# cd /etc/apache

Copy the httpd.conf-example to httdpd.conf

# cp httpd.conf-example httpd.conf

 

Edit the httpd.conf file using vi to modify the following entry:

ServerName 127.0.0.1

 

The new entry will contain zone1’s IP address:

ServerName 192.168.201.121

 

Start the Apache web server:

#/etc/init.d/apache start
httpd starting.

Ensure http processes are started:

#pgrep -l httpd
6573 httpd
6568 httpd
6572 httpd
6569 httpd

Ensure there is communication to the Apache Web Server:

#/usr/sfw/bin/wget http://192.168.201.121
–08:51:46– http://192.168.201.121/
=> `index.html’
Connecting to 192.168.201.121:80… connected.
HTTP request sent, awaiting response… 200 OK

You cannot verify a working web server by connecting to the global zone or another non global zone

#/usr/sfw/bin/wget http://192.168.201.21
–08:54:43– http://192.168.201.21/
=> `index.html’
Connecting to 192.168.201.21:80… failed: Connection timed out

#/usr/sfw/bin/wget http://192.168.201.221

–09:06:24– http://192.168.201.221/
=> `index.html’
Connecting to 192.168.201.221:80… failed: Connection refused.

Also, notice the Apache web server is private to zone1:

# zlogin zone2

# pgrep -l httpd

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

3 Responses

  1. Ajay Sahu says:

    How to   know when the last time server was patched with a patch?and now updated patch for that [patch?please revert.thanx in advance..

  2. Yogesh Raheja says:

    @Ajay, To check when you have installed any particular patch you need to go to /var/sadm/patch and do ls -lrt it will give you the datew when the patch has been applied to your system. eg: bash-3.00$ uname -a
    SunOS yogesh 5.10 Generic_142900-02 sun4u sparc SUNW,Sun-Fire-V240
    bash-3.00$ ls -ld 142900-02
    drwxr-xr– 2 root root 512 Feb 1 2011 142900-02
    bash-3.00$ date
    Mon Mar 26 04:58:36 BST 2012
    bash-3.00$ pwd
    /var/sadm/patch
    bash-3.00$ uptime
    4:58am up 50 day(s), 10:36, 74 users, load average: 2.50, 3.48, 3.85

  1. September 22, 2015

    […] Read – Installing packages/Patches/ Applications in zones […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us