Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Program and files -> copyover...

Posted on 2004-10-18
11
Medium Priority
?
263 Views
Last Modified: 2013-12-27
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
Comment
Question by:ramble
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 12342284
The "registry" for Solaris packages is under  /var/spool/pkg
0
 
LVL 48

Accepted Solution

by:
Tintin earned 1600 total points
ID: 12342303
Sorry, /var/spool/pkg is where the actual packages reside, the package info is in /var/sadm/pkg
0
 

Author Comment

by:ramble
ID: 12343026
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 48

Expert Comment

by:Tintin
ID: 12343138
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
 

Author Comment

by:ramble
ID: 12343256
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
 
LVL 48

Expert Comment

by:Tintin
ID: 12343531
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
 
LVL 38

Expert Comment

by:yuzh
ID: 12343773
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
 

Author Comment

by:ramble
ID: 12348868
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
 

Author Comment

by:ramble
ID: 12349046
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
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 400 total points
ID: 12353776
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
 

Author Comment

by:ramble
ID: 12368561
Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question