Visit The New, Modern Unix Linux Community


Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Package
# 1  

What is installation package and how to create it?
When we run:
in AIX:
installp package1

in Linux
rpm -ivh mypackage

What is package1 or mypackage in the abov examples and how to create them and deploy them?
I hope my question is clear enough.
Thank you

Last edited by Don Cragun; 02-18-2019 at 02:16 AM..
# 2  
Originally Posted by big123456
What is installation package and how to create it?
Suppose you have a certain program /usr/bin/myprogram that you want to run also on another system. You could of course just copy the executable file to the remote system, but maybe the program needs some other files to work properly. For instance:

/usr/bin/myprogram       # main program
/usr/lib/mylib           # library necessay to run the  program
/etc/myprogram.conf       # configuration file

You could still take every single file and transfer it to another system but it make things a little easier to put that all together into one file which you then could transfer to the target system. i.e. you could use a tar archive, put the three files necessary into it and then unpack that on the target system to have all three files put into their respective place at once. That would at least guarantee that you will not forget one of the files when you copy the program to the new system.

Now, the program, in order to run properly, may need to have some adjustments be done on the system too: maybe it uses a special user account to run which has to be created, maybe it should be started at system start so you need to create startup routines and put their call to the system startup files (in AIX /etc/inittab, in Linux in systemd configuration files, etc.) and so on. So, in order to not forget any of these things, you may create some sort of script that does that for you and put that into the tar archive too.

But there still is a problem: you may need not only to put the program onto systems, you may eventually want to remove it from some of them after a while. For this you do not want to leave a trace of leftovers and ideally after installing it and removing it the system should be in the same state as before. That includes, in addition to removing the files you put there, you need to remove all changes made to already existing files, removing user accounts created, etc.. You may want to write another script to do this again because if you do it manually yo may forget the one or other thing.

Now, wouldn't it be great to have a program for all that? A program which you can tell which files to install, which actions to take upon installation, upon deinstallation, upon updating, and so forth? Exactly this is a package and the program to use such packages is called a package manager. rpm ("RedHat Package Manager") is one of such package managers, developed for Linux but now available on many systems. installp is the package manager for AIX. AIXpackages come in a certain format ("backup file format", bff, which is why they all have the extension ".bff") and there is a program makebff which you can use to create such packages.

You should read up on how to work with packages in general and AIX packages in specific (there is an IBM Redbook about this) before attempting to automate your work with packages though. Building and maintaining packages is not easy and you don't learn it in minutes. It is easy to create very bad packages which will even increase your administration work and make it more complicated. It can take some effort and experience to create well-crafted packages that will help you a great deal in your daily work.

I hope this helps.

These 2 Users Gave Thanks to bakunin For This Post:
# 3  
Thanks for explanation and your time.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #290
Difficulty: Easy
Free and open-source software (FOSS) is software that anyone is freely licensed to use, copy, study, and change the software in any way, and but the source code must be maintained secretly.
True or False?

9 More Discussions You Might Find Interesting

1. Emergency UNIX and Linux Support

Problem when trying to remove a package using rpm command - error: package is not installed

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)
Discussion started by: g_p
4 Replies

2. UNIX for Dummies Questions & Answers

Can't install rpm package with --prefix in new path.Error: package is not relocatable

Hello, i have downloaded an rpm package "hadoop-" 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)
Discussion started by: g_p
1 Replies

3. Linux

How install a new package without remove old package?

Dear all, I would like to install a new version of package without remove old version on Centos and vice versa. Please give me advice! thanks much, (2 Replies)
Discussion started by: all4cfa
2 Replies

4. UNIX for Advanced & Expert Users

How to find dependancies of .dstream package (Solaris) & .rpm package( linux)

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)
Discussion started by: yb4779
0 Replies

5. AIX

mkinstallp package creation failing "no such file: ./usr/lpp/<package name>/inst_root"

Hello, I'm trying to build a (bff) package from an already installed program (clam antivirus) using mkinstallp. However, mkinstallp fails with "no such file: ./usr/lpp/<package name>/inst_root" I'm not sure why all files get created ok except for these particular ones. Any help would be... (2 Replies)
Discussion started by: omonte
2 Replies

6. Solaris

how to uninstall the package help

hi i installed wine1.1.2-sol11-i386.pkg.bz2 but wine doesnt work error err:process:start_wineboot failed to start wineboot, err 1359 how can i uninstall that package and how can i fix that error (2 Replies)
Discussion started by: ect1
2 Replies

7. BSD

after update package...

Hi all^^ after upgrade joomla (1.5.7-1.5.11) this package , and then portaudit -Fda fetch: No address record Couldn't fetch database. Old database restored. portaudit: Download failed what wrong??? (1 Reply)
Discussion started by: adamkong
1 Replies

8. Solaris

not able to install the package

I am working with sun solaris 9 and I want to install some packages but due to less disk space I am not able to install the packages. I am giving the output of filesystem-- # df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t0d0s0 2148263 1997593 107705 ... (10 Replies)
Discussion started by: smartgupta
10 Replies

9. Linux

how to restore original package after uninstalling the upgraded package using rpm

have following package installed rpm -qa |grep ADMIN It will give the following package installed: ADMIN- Now I will upgrade the ADMIN package using the following command. rpm --upgrade ADMIN- It will upgrade the ADMIN packagge to ADMIN- Now I want that... (0 Replies)
Discussion started by: amitpansuria
0 Replies

Featured Tech Videos