Solved

Program and files -> copyover...

Posted on 2004-10-18
11
258 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
  • 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 400 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 100 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

726 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