• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Program and files -> copyover...

I've got 2 identical servers.  I installed a lot of different packages on server#1.  On server#2, I simply copied all the packages over from server#1, and then did some SYM links to server1.  I copied server1 using rsync into a directory on server2, then set a symlink like:

ln -s /server_1/usr/local /usr/local

(BTW - I renamed /usr/local to /usr/local.org)

Most packages are installed in /usr/local/ so I thought that a symlink to server_1 /usr/local would be sufficient.

And it works just fine.  All packages are executing with not problems.

The main problem is that pkginfo -l obviously doesn't list the programs (and packages) installed because it was just copied...not "installed".

So...where is pkginfo -l pulling it's information? Does the system check for dependencies using the pkginfo command?

Now, I want to install a package on server_2 - to test before I install it on server_1.  But it doesn't know that a DEPENDENCY package is installed...so it won't let me.

I'd like to know a little bit about the characteristics of the pkgadd -d and pkginfo -i command...is there a type of "registry" that it updates for this information?  Can I edit that, and simply manually add the packages that I've copied over?

Show me the ERR of my ways.  :)

Thanks_ramble
0
ramble
Asked:
ramble
  • 5
  • 4
  • 2
2 Solutions
 
TintinCommented:
The "registry" for Solaris packages is under  /var/spool/pkg
0
 
TintinCommented:
Sorry, /var/spool/pkg is where the actual packages reside, the package info is in /var/sadm/pkg
0
 
rambleAuthor Commented:
So...I take it, that you can't manually add anything to it?

Am I correct in thinking that when a package is added..or attempted to be added, that it looks in /var/sadm/pkg for dependencies?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
TintinCommented:
You can manually add stuff to /var/sadm/pkg.  If you rsynced that directory from your server1 and then did a pkginfo on server2, they should be the same.
0
 
rambleAuthor Commented:
What you are suggesting is simply copying /var/sadm/pkg (srv1) to /var/sadm/pkg (svr2).

Which is kind of what I'm trying to avoid.

You suggest that I can manually add stuff to /var/sadm/pkg
How do I do that?  When I look at pkg it seems to be rather jumbled.

example:

-mgr-share:SUNWgnome-file-mgr<Y      SUNWxwpft<_,SUNWgnome-fun-applets-root<e$UNWgnome-fun-applets-share<s SUNWgnome-fun-applets<ˆ   SUNWxwslb<²     SUNWxwslx<Á     SUNWxwsrc<ÇSUNWgnome-games=^    SUNWxwsrv=l SUNWgnome-games-root=rSUNWypr=– SUNWgnome-games-share=œSUNWypu=ÛSUNWzip>óSUNWzsh>SUNWeslu>ÿSUNWgnome-help-db?$UNWgnome-help-viewer-share?! SUNWgnome-help-viewer?3$SUNWgnome-hex-editor-roSUNWicux?Æ SUNWgnome-print-

So, it appears that I can't add (or edit) the file directly...
0
 
TintinCommented:
Why do you want to do it manually?

Once you've synced /var/sadm/pkg and /var/spool/pkg from server1, you can then happily test new packages on server2, and when happy, install it on server1.
0
 
yuzhCommented:
Hi  ramble,

    Tintin has given you good infor.

     For your information, you don't have to copy the program from server1 to server2 at
all, you can simply setup NFS mount to mount server1:/usr/local on server2, and you only
have to worry about update server1 when you need to, all the software will work without
problem, that's the way I do it in my network.

     

     
0
 
rambleAuthor Commented:
Yes, Tintin did give me good information.

I made a mistake and typed: cat pkg

I thought it was a file...not a directory... *duh*.

*BUT*.  I misrepresented the problem a bit.  Both are NOT identical servers (as I initially posted in this question).  They have different RAID managers.  And, one is based on PCI architeture and the other is SunBUS architecture.

So, the reason I was thinking about manually adding, is because I would need to be selective.  An RSYNC on that directory would probably result in the system malfunctioning...or the Raid Array not coming up.

Is there any problem with me simply just coping the packages selectively from the pkg directory?

BTW: /var/spool/pkg is empty on both servers.
0
 
rambleAuthor Commented:
There's over 1000 entries in the /pkg directory.  Most start with SUNW...

It's starting to appear that what I'm wanting to do isn't feasible...
0
 
yuzhCommented:
Why not simplely use NFS to mount server1:/usr/local on server2?

rsync is not a good tool for ONE OFF copy (the first time is very slow, it is a good tool
for sync 2 file system!)

you can use "ssh + tar" to copy the software accross. eg:

at server2, you do:

cd /user/local
ssh root@server1 "cd /usr/local ; tar cf -)" | tar -xvf -

You can forget about copy the pkginfor stuff to /usr/local, please make a note of what
you done in server2.



0
 
rambleAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 5
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now