OpenSolaris 2008.05 and Open Source Databases

Lets start at the point where you have just installed OpenSolaris OS 2008.05 and have logged in using your primary userid on the system.

First thing to do is install the packages for PostgreSQL and MySQL on OpenSolaris OS 2008.05. Right click on the desktop and select "Open Terminal" to start a terminal session. Use "su" to assume the root userid. (The primary user already has root role however some programs still explicitly check for userid of root and hence needed to avoid unexpected surprises.)

Verify pkg is able to communicate with the IPS repository.

# pkg search -r postgres
INDEX      ACTION    VALUE                     PACKAGE
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-client@8.2.6-0.86
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-contrib@8.2.6-0.86
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-devel@8.2.6-0.86
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-docs@8.2.6-0.86
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-jdbc@8.2.504-0.86
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-libs@8.2.6-0.86
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-pl@8.2.6-0.86
basename   dir       var/postgres              pkg:/SUNWpostgr-82-server-data-root@8.2.6-0.86
basename   file      usr/postgres/8.2/bin/postgres pkg:/SUNWpostgr-82-server@8.2.6-0.86
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-tcl@1.5-0.86
basename   file      usr/bin/postgres          pkg:/SUNWpostgr-server@8.1.11-0.86
basename   dir       usr/postgres              pkg:/SUNWpostgr-82-l10n-ja@0.5.11-0.86


This confirms that the repository is accessible. If this does not work confirm you have internet connection and/or try:

#  svcadm restart nwam

which currently takes some time to bring a small popup saying the interface is plumbed up and has an IP address assigned.  Anyway lets assume that the internet connects well and we are ready to install the Packages of PostgreSQL and MySQL

To install PostgreSQL binaries (currently PostgreSQL 8.2.6 32-bit  is available):

# pkg install SUNWpostgr-82-client SUNWpostgr-82-contrib SUNWpostgr-82-devel SUNWpostgr-82-docs SUNWpostgr-82-jdbc SUNWpostgr-82-libs SUNWpostgr-82-pl SUNWpostgr-82-server-data-root SUNWpostgr-82-server SUNWpostgr-82-tcl SUNWpostgr-server SUNWpostgr-82-l10n-ja
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  13/13   3159/3159   64.03/64.03

PHASE                                        ACTIONS
Install Phase                              3688/3688


Now to install PgAdminIII

 # pkg install SUNWpgadmin3
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1     281/281   21.46/21.46

PHASE                                        ACTIONS
Install Phase                                378/378

 

Now to install MySQL packages:

# pkg install SUNWmysql-base SUNWmysql-base SUNWmysql SUNWmysql5test SUNWmysql5 SUNWmysqlt
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    5/5   2727/2727 160.65/160.65

PHASE                                        ACTIONS
Update Phase                                     2/2
Install Phase                              2971/2971



If you also want to install webmin:

# pkg install SUNWwebmin
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1 19946/19946   40.35/40.35

PHASE                                        ACTIONS
Install Phase                            24298/24298



With this we are now setup with the most common packages required to use Open Source Databases PostgreSQL and MySQL on OpenSolaris 2008.05


 

Comments:

Nice tip.

However, I have one problem. The webmin package doesn't seem to allow a root login and complains of "login failed". This is on the final OpenSolaris 2008.05 and known good root password. Is this an RBAC issue?

Thks.

Posted by Wes W. on May 08, 2008 at 08:36 AM EDT #

Hi Wes W.

In OpenSolaris root has been changed to a role rather than user. A role cannot login to the the system directly. Check /etc/user_attr you will see postgres and root defined as role. There will be one user with type role=root that you defined during installation. Using the user should give you most of the rights. Though some commands will still require you to do "su".

Regards,
Jignesh

Posted by Jignesh Shah on May 08, 2008 at 09:06 AM EDT #

Thanks for responding Jingnesh.

I've done a complete reinstall of the OS after mucking up /etc/webmin and still have the same problem after I issue the ./webminsetup and use the same user as defined during installation instead of root.

I like the idea of root being only a role and hope to get Webmin working without reverting back to the traditional root setup. I'd graciously take any more tips you might have to achieve this.

Regards.

Posted by Wes W. on May 08, 2008 at 09:54 AM EDT #

Hi Wes W.

Here is what I did to make it work:
After intstalling the pkg SUNWwebmin
Consider puser1 as primary user
I did su to root
Step 1:
#/usr/sfw/lib/webmin/setup.sh
Selected all the default options:

Step 2:
Then while root
Edited /etc/webmin/miniserv.users and added my primary user as follows:
puser1:x:101
-This allows you to login to the server

Step 3:
And also edited /etc/webmin/webmin.acl
using a copy of the existing entry for root and added a new line and changed root to puser1 to give access to all the modules

Step 4:
Exit root shell and do
$ svcadm enable webmin

Step 5:
http://localhost:10000
And now you should be able to login using your primary login. (if there are no typos anywhere)

Hope this helps

Posted by Jignesh Shah on May 08, 2008 at 11:01 AM EDT #

Forgot to mention, the defaults for PostgreSQL modules are not correct and needs to be changed before using the PostgreSQL module.

PostgreSQL binaries are in /usr/postgres/8.2/ (bin/lib)
PostgreSQL configuration files are in /var/postgres/8.2/data and created only after the first instantiation of
svcadm enable postgresql:version_82

Posted by Jignesh Shah on May 08, 2008 at 11:04 AM EDT #

VERY COOL.

However, I did have to make a simple change to your Step 4 to "svcadm restart webmin" as webmin was already running. But the good news is webmin is now working on OpenSolaris 2008.05!

Thanks Jignesh Shah for the workaround!!

Posted by Wes W. on May 08, 2008 at 03:54 PM EDT #

I could log it in, too! Thanks a lot!

Posted by noniko on June 09, 2008 at 12:20 AM EDT #

I'm running SXCE.

# uname -a
SunOS unknown 5.11 snv_93 i86pc i386 i86pc

# cat /etc/user_attr
...
#
adm::::profiles=Log Management
dladm::::auths=solaris.smf.manage.wpa,solaris.smf.modify
lp::::profiles=Printer Management
postgres::::type=role;profiles=Postgres Administration,All
root::::auths=solaris.\*,solaris.grant;profiles=Web Console Management,All;lock_after_retries=no;min_label=admin_low;clearance=admin_high

# webminsetup
(hit C/R for everything)

In your browser type: http://localhost:10000/ and
type "root" for your name and use your root password.

I did not have to change _anything_ from default,
just had to run webminsetup. Thanks for the tips.

Tony

Posted by Tony Wa on August 06, 2008 at 06:12 AM EDT #

Post a Comment:
Comments are closed for this entry.
About

Jignesh Shah is Principal Software Engineer in Application Integration Engineering, Oracle Corporation. AIE enables integration of ISV products including Oracle with Unified Storage Systems. You can also follow me on my blog http://jkshah.blogspot.com

Search

Archives
« August 2015
SunMonTueWedThuFriSat
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
     
Today