PKG creation in solaris
FILE NEEDED:
pkginfo ---> Information about the package
checkinstall --> operation that you are gonna do while installing
Postinstall ---> Operation that you need to do after installation
prototype ----> configuration file for installing pkgs in solaris
Example: We are gonna create whole file under /solaris
pkginfo -->
PKG=”pkgname″
NAME=”test tool”
VERSION=”1.0″
ARCH=”x86″
CLASSES=”none”
CATEGORY=”utility”
VENDOR=”company name”
PSTAMP=”18 Sept″
ISTATES=”S s 1 2 3″
RSTATES=”S s 1 2 3″
BASEDIR=”/solaris”
Checkinstall ->
echo "sam" > /tmp/log
Postinstall ->
echo "finished" >> /tmp/log
## File that you need to include while installaling
mkdir sam
cd sam
echo "include files" > includes
pkgproto sam/ > ../prototype
#### The content of file will be look like below##########
d none sam 0755 root root
f none sam/includes 0644 root root
#####Ready for installation########################
Append the following line on the top of the file
i pkginfo
i checkinstall
i postinstalld none sam 0755 root root
f none sam/includes 0644 root root
############################################
Creating package into directory format
pkgmk -r -o /solaris -d /solaris -f /solaris/prototype
A compiled file will be created in the directory with packagename --> The which you given in pkginfo file
############################################
Converting package directory into formatted data stream
pkgtrans /solaris /solaris/package_name.pkg packagename
#############################################
Solaris package will be created with the name "package_name.pkg"
installing package in solaris
pkgadd -i package_name.pkg
FILE NEEDED:
pkginfo ---> Information about the package
checkinstall --> operation that you are gonna do while installing
Postinstall ---> Operation that you need to do after installation
prototype ----> configuration file for installing pkgs in solaris
Example: We are gonna create whole file under /solaris
pkginfo -->
PKG=”pkgname″
NAME=”test tool”
VERSION=”1.0″
ARCH=”x86″
CLASSES=”none”
CATEGORY=”utility”
VENDOR=”company name”
PSTAMP=”18 Sept″
ISTATES=”S s 1 2 3″
RSTATES=”S s 1 2 3″
BASEDIR=”/solaris”
Checkinstall ->
echo "sam" > /tmp/log
Postinstall ->
echo "finished" >> /tmp/log
## File that you need to include while installaling
mkdir sam
cd sam
echo "include files" > includes
pkgproto sam/ > ../prototype
#### The content of file will be look like below##########
d none sam 0755 root root
f none sam/includes 0644 root root
#####Ready for installation########################
Append the following line on the top of the file
i pkginfo
i checkinstall
i postinstalld none sam 0755 root root
f none sam/includes 0644 root root
############################################
Creating package into directory format
pkgmk -r -o /solaris -d /solaris -f /solaris/prototype
A compiled file will be created in the directory with packagename --> The which you given in pkginfo file
############################################
Converting package directory into formatted data stream
pkgtrans /solaris /solaris/package_name.pkg packagename
#############################################
Solaris package will be created with the name "package_name.pkg"
installing package in solaris
pkgadd -i package_name.pkg
No comments:
Post a Comment