07.16.07
Installing programs without a package manager.
Installing programs without a package manager.
I have been a webmaster for about two years now. But webmaser doesn’t really describe my level of proficiency with managing a linux server.
Truth be told, I got my linux server with LAMP on it out of the box. So I had to install very little on it. It’s a webserver not a desktop.
And when I had to install stuff manually I just wgeted the tar file which was needed, prayed to the gods that be, and did the configure, make and make install.
Now I have a new web server and I’m installing it from scratch and while I was installing some un named obscure software. My friend, which I ‘ll hereafter refer to by the name of Payne, was watching my shell session so he could aid me. And when I did my configure, make, make install routine he uttered NOooooooooo. Turns out that installing it like that is just a bad practice. Many of the thousands of people who ‘ll read this will frown and be slightly stunned, isn’t that how most of the people are doing this?
The good
You should download the source do a
configure
make
Explaining the debuild process is a bit large so I won’t get into it, but to summeraize it:
When you look at your software and you see a debian directory then it has already everything which is needed to turn it into a package with debuild.
You just launch debuild and when everything goes well you get a debian package in the parent directory.
The Bad
configure
make
make install
What makes this bad is that you bypass the package management system. Which means that package management doesn’t know about the
software you just installed. Later on you can install the same software through the packet manager. Then you end up with 2 versions in 2 different locations. The make install method doesn’t take care of dependencies. When you want to uninstall libraries which your make install software depend on
you will get no warning. After you uninstalled it, you will be baffled to find out your ‘make install’ software stopped working. Last problem with this method is uninstalling of the software itself. Other software can depend on it. So when you uninstall this software you can run into the same trouble as mentioned before.
The Ugly
configure –sysconfdir=/etc –prefix /usr/xx
make
checkinstall -D make install
Answer the question ‘The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]:’ with ‘y’ .
Enter a description for your package.
Fill in what you like, need. In the end press enter to continue.
Your software is installed and a Debian package is created, you can find in the installation directory.
You can use this package on other pc’s
dpkg -i /path/to/software.deb
Uninstalling can be done by call the dpkg with -r parameter.
dpkg -r the_software
This is the ugly way because your package does not come with dependency checks nor does it come with our of the box init scripts.