LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Creating a Bin Installer For a Application (https://www.linuxquestions.org/questions/linux-newbie-8/creating-a-bin-installer-for-a-application-499080/)

stranger_6_7 11-06-2006 06:57 AM

Creating a Bin Installer For a Application
 
Hi,

I have built an application and i have to make a rpm out of it. But i thought of creating a .bin file which will have apache, mysql and php and my application along with them. How can i create a Bin installer
file something like myapp.bin which on running will automatically install my application along with apache,mysql and php?


Thanks for the Help
stranger.

bathory 11-06-2006 08:27 AM

You can take a look here

crabboy 11-06-2006 08:29 AM

I've done this in the past by using a shell script with a binary tarfile appended to it. When the script it run it will pull off the tarfile and then extract it. A few of the key elements of the script are:

Code:

SKIP=`${AWK} '/^__ARCHIVE_START__/ { print NR + 1; exit 0; }' $PROGRAM`

ExtractTarFile()
{
    echo "Extracting files..."
    ${TAIL} +${SKIP} $PROGRAM_FILE | ${GZIP} -dc | ${TAR} -xvf -

}


if [ $? -eq 1 ]; then
  echo "gzip must be installed and in your path"
  exit 1
fi

# Call the main routines, either backup or backout
if [[ $BACKOUT_FLAG = 1 ]]; then
    BackoutTarFile
else
    CreateBackupFiles
    CheckForCopyErrors  # this function may abort script
    ExtractTarFile

fi


exit 0

__ARCHIVE_START__
^_.^H^@.Ýz@^@^CÌ;^KlSW.çÙ.:Ô^E3^[vM^EÅ  ..,eì$.ÉÒ.S.¬Ù¤.        Î4.@Ï.c.µ&q^].^D
<snip>

I created the script/binfile with:
Code:

cat script.sh tarfile.tar > setup.bin
I have not used this in quite some time in favor of professional installers, but it worked good when I did use it. I actually liked this a bit better since my script controlled every aspect of the install and I didn't have to rely on the oddities and limitations of Install Shield installers.

crabboy 11-06-2006 08:32 AM

Well it looks like it's been made easier since I tackled the problem years ago. The makeself approach looks even easier.

unSpawn 11-06-2006 08:48 AM

Each time a vulnerability is fixed in Apache, MySQL or PHP you will have to re-release your monolithic package else you're spreading flawed software (which is as bad as spreading FUD). That is inefficient and makes it hard to maintain.

RPM's handle dependencies. If you just set "Requires: apache, mysql, php" in the .spec file for your application RPM the dependencies will be installed if necessary. You don't *need* no other tools.

matthewg42 11-06-2006 09:05 AM

Consider using autopackage


All times are GMT -5. The time now is 05:03 PM.