首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

rpm容易制作

2012-08-26 
rpm简单制作我对linux一窍不通,可前段时间由于客户需要,要求给他们一个RPM版本,本人咬牙切齿鼓捣了两天,终

rpm简单制作

我对linux一窍不通,可前段时间由于客户需要,要求给他们一个RPM版本,本人咬牙切齿鼓捣了两天,终于应付过去(这不是本人一贯作风,以后有机会仔细研究一下linux的基本操作)。

?

RPM打包是使用的linux的rpm build工具,如果命令行中提示“rpmbuild : command not found”,那是因为系统没有安装rpm build工具,这个工具一般在安装光盘中。

下面对整个实现过程简单描述一下:

    资源放置:usr/src/redhat/build 下面有多个文件
    tar.gz包放到resources下,spec文件放到specs下然后执行打包程序

使用到的linux命令有:

    rpm打包: rpmbuild -ba *.specrpm安装tar.gz文件:rpm -ivh *.tar.gzrpm卸载tar.gz文件:rpm -e * 注意:一定不要带发版号和后缀,如ISStudio-6.0.0-1.i386.rpm,要使用rpm -e ISStudio-6.0.0移除文件:rm -rf 文件名

spec文件示例:

Summary:   The Install Package for InforSuite Studio on LinuxName:      ISStudioVersion:   6.0.0Release:   1License:   CommercialGroup:     Applications/EditorsSource:    inforsuite-studio.tar.gzBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootUrl:       http://www.inforbus.comPackager:  CVICSEPrefix:    %{_prefix}Prefix:    %{_sysconfdir}%define    userpath /home/CVICSE%descriptionInforSuite Studio is one of the CVICSE's Products锛宨t provides a development environment for support CVICSE's midllewares: inforflow & inforsib, and so on.Beside, we also provide some excellet tool for JEE develop, for example, the Develop Platform supports UML,MDA,Struts,Hibernate,Spring developing. %prep%setup -c%installinstall -d $RPM_BUILD_ROOT%{userpath}#cp -a %{name}* $RPM_BUILD_ROOT%{userpath}cp -a * $RPM_BUILD_ROOT%{userpath}%cleanrm -rf $RPM_BUILD_ROOTrm -rf $RPM_BUILD_DIR/%{name}-%{version}%files%defattr(-,root,root)%{userpath}%postcat > ~/Desktop/ISStudio.desktop <<EOF[Desktop Entry]Encoding=UTF-8Name=ISStudioExec=%{userpath}/eclipse/eclipseIcon=%{userpath}/ISStudio/resources/eclipse.pngCategories=Application;Development;Version=6.0.0StartupNotify=trueType=ApplicationTerminal=falseEOFcp -a ~/Desktop/ISStudio.desktop /usr/share/applications%postunrm ~/Desktop/ISStudio.desktoprm /usr/share/applications/ISStudio.desktop%changelog* Wed Mar 12 2008 zhu_qhua  - InforSuite Studio project to RPM build spec-file

?

参考: http://blog.csdn.net/yueyinggufan/archive/2009/08/21/4469000.aspx

http://wiki.netbeans.org/VestaBuild

?

?

?

?

1 楼 yianpuodiaotu 2010-02-23   使用虚拟机的时候,经常会发现ssh连接不到虚拟的linux,解决方案:
1.首先确保IP唯一
2.重新启动NetWork(界面手工操作or命令:service network stop/start/restart)

完成

热点排行