

clinux下的安装程序有RPM、tar.gz、DEB包,区别如下:
RPM包在红帽LINUX、SUSE、Fedora可以直接进行安装,但在Ubuntu中却无法识别;DEB包应该是Debian/Ubuntu的专利,在Ubuntu中双击DEB包就可以进入自动安装进程。
tar.gz包在所有的Linux版本中都能使用,但安装过程麻烦。要先解压缩,然后在“终端”里用cd 命令进入刚才解压的目录,再找到安装链接文件安装。
笨法一个:
做成.rpm包先
rpm -ta ***.tar.gz
用alien工具转.rpm为.deb
sudo apt-get install alien
sudo alien ***.rpm
比如tar.gz包解压到了“/temp/*****.tar.gz/”,tar.gz包中的安装链接文件为install:
1、cd /temp/*****.tar.gz/
2、./install
3、根据提示输入“ENTER”或“安装目录”
装的时候若出现waiting for other tasks,则需关闭自动更新。在终端中安装时,需首先输入su命令将美元符号$换成#,然后再 执行 rpm -ivh ***.rpm
通过dpkg -x *.deb及dpkg -e *.deb可以将一个deb包解开成文件目录形式
sudo apt-get install build-essential fakeroot dh-make
1、下载的xxx.tar.gz用tar xzvf解压后进入目录
cd xxx
2、运行dh_make命令
dh_make -e iwedone@gmail.com -f ../xxx.tar.gz
3、修改control等文件。
修改control copyright等文件,如果只是自己做一个自己用的deb包文件,不改也可以,但是如果是为Debian做的准备上传到Debian apt源中的话,就要按照规范认真地填写。
4、生成deb包文件,我是这样的:
./configure
make
dpkg-buildpackage –rfakeroot
Create .deb or .rpm from .tar.gz with checkinstall
Checkinstall is extremely useful utility to create .deb packages for Debian, Ubuntu (or .rpm packages for Fedora, RedHat, CentOs) from .tar.gz (or .tgz) source tarball after it’s compiled at your Linux box. In other words you can prepare binary package for later usage without need to compile software from sources every time you need to get it installed on certain Linux box.
Another application of checkinstall is software deinstallation that was compiled and installed from sources. As you might already noticed, not every programmer adds “uninstall” rule to Makefile and thus command “make uninstall” would fail. The nice solution is to use checkinstall to prepare binarypackage from sources and then install or uninstall it with dpkg command (or rpm in RedHat based distributions).
Here is the short algorithm on how to prepare .deb package from clamav source tarball:
1. Install checkinstall:
sudo aptitude -y install checkinstall (Ubuntu, Debian and related distributions)
or
sudo yum install -y checkinstall
(for rpm based distributions, please note that checkinstall usually isn’t included to standard Fedora/RedHat repositories, so you will need to link up third party repo like DAG)
or
compile checkinstall from sources
2. Get clamav sources:
wget http://mesh.dl.sourceforge.net/sourceforge/clamav/clamav-0.92.tar.gz (as an example)
3. Install libraries that might be necessary for clamav compilation:
sudo aptitude install libgmp3 libgmp3-dev
(this command is applicable for Debian and certainly will be different for Fedora or RedHat)
4. Compile clamav:
tar xvfz clamav-0.92.tar.gz
cd clamav-0.92/
./configure --sysconfdir=/etc
make
5. Run checkinstall and follow its intuitive instructions (enter package description etc.):
sudo checkinstall -D make install
checkinstall --type=debian --arch=i686 -d2 make install
6. When finished you’ll get clamav-0.92_0.92-1_i386.deb (or rpm package if you use Fedora/RedHat/CentOs) you may want to install with sudo dpkg -i clamav-0.92_0.92-1_i386.deb (or sudo rpm -i ...) or move to another PC for later installation.
-------------------------------------------------------------
Introduction
CheckInstall keeps track of all files installed by a "make install" or equivalent, creates a Slackware, RPM, or Debian package with those files, and adds it to the installed packages database, allowing for easy package removal or distribution. Use CheckInstall instead of just running "sudo make install", as that will likely put files all over the filesystem, with no easy way of removing them if things go wrong. If in the future you try to install a package that contains the same file as the software you are compiling, you will receive errors and the software you compiled may stop working. (In fact, checkinstall can keep track of files modified by any command line, not just a "make install", so you can use it for any type of installation task outside of apt, and it will keep track of the installation in the package manager.) IconsPage?action=AttachFile&do=get&target=dont.png CheckInstall is not designed to produce packages suitable for distribution. Do not use it to produce packages intended for the Ubuntu archive or PPAs. Instead, follow the Packaging|Guide. IconsPage?action=AttachFile&do=get&target=warning.png From the checkinstall README: "The Debian support in CheckInstall is still new, so handle it with care. It has been reported to work OK in some Debian systems and it certainly works OK in my Slackware development system with dpkg installed. Your mileage may vary."
Installation
Install the package checkinstall from the Repositories. For help on installing software in Ubuntu, see InstallingSoftware. A quick method via the terminal for those who like to copy and paste:
sudo aptitude install checkinstall
Usage
Instead of
sudo make install
you will use
sudo checkinstall
When called with no arguments, checkinstall will call "make install". If you need other arguments, they can be supplied:
sudo checkinstall make install_package
The installed package can then also easily be removed via Synaptic or via the terminal:
sudo dpkg -r packagename
Example:
sudo dpkg -r pidgin
IconsPage?action=AttachFile&do=get&target=IconNote.png Note that the .deb package it creates can also be used elsewhere, which simplifies installation of the same program on many machines.
Use CheckInstall with auto-apt
You can use auto-apt when you want to build a simple package from source with checkinstall. You need to have auto-apt installed! Instead of
./configure
you use:
auto-apt run ./configure
If the dependencies are available, a dialog box opens and ask you to install them. The rest remains the same
make
sudo checkinstall
-------------------------------------------------------------