我使用 .rpm。我为 glassfish 制作了 rpm
我的模板文件是
Summary: GlassFish
Name: redsky-glassfish
Version: @VERSION@
Release: @RELEASE@
License: Proprietary
Group: Applications/System
Buildroot: %{_topdir}/%{name}-%{version}-root
BuildArch: x86_64
Requires: jdk
Conflicts: java-1.7.0-openjdk
%description
%preun
%install
rm -fr ${RPM_BUILD_ROOT}
mkdir ${RPM_BUILD_ROOT}
cp -r ${RPM_BUILD_DIR}/* ${RPM_BUILD_ROOT}
%post
%postun
#0 = uninstall, 1 = upgrade
if [ "$1" == "0" ]; then
rm -fr /opt/glassfish/
fi
%files
/*
在安装过程中它会抛出错误
安装 glassfish-development-1095.x86_64 中的文件 /etc/init.d 与包 chkconfig-1.3.49.3-2.el6.x86_64 中的文件冲突