I have installed apache2 on Solaris machine with the binary. So i dont want to install the same binary across all the systems but only want to copy the lib files and the files which have been updated in this installation process.
So in order to get those lib files and then prepare a tar package it will be easier to extract this tar on all machines.
Can you please guide me on how to proceed further.
So in the installation process, i have run the below.
Btw i dont want to copy any source files and i just want to make a tar package with the files involved with the installation (i.e) lib files and binaries.
Thank you for the reply. an you guide me in gathering all of these required files. I mean the best procedure to gather the files and i dont want any files to be missing.
Well, 'ldd -rsv' will tell you every library used by an executable, and 'strace' can tell you every file a running app opens (very educational). Usually, libraries go in a 'lib' dir and that dir is in the LD_LIBRARY_PATH, and executables, script or compiled, go in a 'bin' dir that is in the $PATH variable. Throwing everything in /bin and /lib is a bad practice. Directories /usr/local/bin and /usr/local/lib are popular, but it is ok to keep every app separate. If you create the desired relative path on the tar end, it will create the relative directories wherever untarred. You can write and include a little script to move them from the untar directory, if that feels more comfortable.
Packaging like an rpm is a bit past me, and I prefer simple archives. Compression is nice, too. New tar has that, or you can use zip, or gzip the tar (.tar.gz or .tgz).
So i need to go under /usr/local/apache2 and run the command ldd -rss for all the directories under /usr/local/apache2?
Can you briefly explain as i am new to unix?
---------- Post updated 09-25-12 at 11:20 AM ---------- Previous update was 09-24-12 at 04:09 PM ----------
Quote:
Originally Posted by DGPickett
If we want to copy only selected files as shown in the below eg how can we write the tar command? So as below there are several other directories that we need to tar up. Btw if i am installing for apache do i need to look for only apache dependencies or all the lib files under /usr/local/lib?
for each executable you need to trace all the libraries it uses and include those not already on the destination host. Locations can vary as long as they are in the ld() ENV variable dir:dir list (usually $LD_LIBRARY_PATH). This bit runs ldd -rsv on my hp-ux java an lists the libraries it uses.
Narrative: find all files in package trees that might be executable compiled objects, run file on them to find just executables dynamically linked (your file messages may vary), run ldd on each, capture libraries located, remove any parent dir zigzag references, e.g., "xxx/bin/../lib/libxxx.sl" and sort unique. Turn the '\t' into a real tab.
If you build your app in a dir with dirs under it like /usr/local/*/ (bin,lib,man), you run itin place using PATH, LD_LIBRARY_PATH, MANPATH or copy your_dir/* into /usr/local/.
Last edited by DGPickett; 09-26-2012 at 04:41 PM..
Hello,
i have installed a package by using the command
sudo rpm -i filepackage.rpm
package filepackage is already installed
when i try to remove it, i get an error saying "is not installed":
sudo rpm -e filepackage.rpm
error: package filepackage is not installed
How can... (4 Replies)
Hello,
i have downloaded an rpm package "hadoop-0.20.205.0-1.amd64.rpm"
in /usr/local/ directory.
I'm trying to install the rpm package in a new path/location (/usr/local/hadoop-0.20.205), but i can't.
I did:
1st try: Didn't work
sudo rpm -i --prefix=/usr/local/hadoop-0.20.205... (1 Reply)
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Friends,
Please let meknow, How we can find the dependancies of .dstream package & .rpm package before installation ?
For AIX, We can use the inutoc . command to create the .toc file for the bff package, What about Solaris & Linux ? (0 Replies)
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
I just tried to unzip the tar.gz installation file with gzip -d file.tar.gz
and then tar -xvf file.tar. ThenI tried to install with command ./install.sh, i got the following error...
The install tar.gz package must be specified as the first argument!
Any one have an idea why this error.... (1 Reply)
have following package installed
rpm -qa |grep ADMIN
It will give the following package installed:
ADMIN-4.0.0.1
Now I will upgrade the ADMIN package using the following command.
rpm --upgrade ADMIN-4.1.0.1
It will upgrade the ADMIN packagge to ADMIN-4.1.0.1
Now I want that... (0 Replies)
I need help with one of my log files I got following format:
This is only a smal part of the file !
.........
--------------------------------------
2003-08-05 12:23:13.939781
logNo : 1380008
Server started - Activate; 10.48.4.51
--------------------------------------
2003-08-05 ... (4 Replies)