濮阳杆衣贸易有限公司

主頁 > 知識庫 > Centos下rpm包如何制作?Centos下rpm包制作的方法

Centos下rpm包如何制作?Centos下rpm包制作的方法

熱門標(biāo)簽:辦理400電話的好處都有哪些 太原外呼電銷機器人軟件 仙桃外呼系統(tǒng) 電話外呼系統(tǒng)解決方案 廣州點撥外呼系統(tǒng)多少錢一個月 貴港便宜外呼系統(tǒng)報價 怎樣在北斗地圖標(biāo)注商戶 日立hgp外呼線路圖 400外呼系統(tǒng) 配置要求

談?wù)揜PM對好多編譯安裝的朋友來多,RPM安裝是傻瓜安裝。

呵呵,其實RPM是一種非常有效果的集中部署的解決方案。

yum+RPM是非??焖俦憬莸拇笠?guī)模部署方案。

下面簡單介紹下rpm的制作:

以cronolog為例:

首先下載cronolog的源碼包。

解開源碼包,tar xzvf cronolog-1.6.2.tar.gz

找到 cronolog.spec 該文件是定制如何生成RPM包的配置文件

vim cronolog.spec
%define name cronolog
%define version 1.6.2
%define release 1
%define group System Networking/Daemons
Summary:        a flexible log file rotation program for Apache
Name:           %{name}
Version:        %{version}
Release:        %{release}
Copyright:      Apache license
Group:          %{group}
Packager:       Andrew Ford A.Ford@ford-mason.co.uk>
URL:            http://www.ford-mason.co.uk/resources/cronolog/
Source:         http://www.ford-mason.co.uk/resources/cronolog/cronolog-%version.tar.gz
BuildRoot:      /tmp/%{name}-root
%description
"cronolog" is a simple program that reads log messages from its input
and writes them to a set of output files, the names of which are
constructed using template and the current date and time.  The
template uses the same format specifiers as the Unix date command
(which are the same as the standard C strftime library function).
%changelog
%prep
%setup -n %{name}-%{version}
%build
./configure
make 
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}-${RPM_PACKAGE_VERSION} -m 755
make prefix=$RPM_BUILD_ROOT/usr mandir=$RPM_BUILD_ROOT/usr/share/man install
install -m 644 README $RPM_BUILD_ROOT/usr/share/doc/%name-${RPM_PACKAGE_VERSION}
#install -m 644 $RPM_SOURCE_DIR/doc/cronolog.1m $RPM_BUILD_ROOT/usr/man/man1/cronolog.1
#install -m 755 $RPM_SOURCE_DIR/src/cronolog $RPM_BUILD_ROOT/usr/sbin/cronolog
#strip  $RPM_BUILD_ROOT/usr/sbin/* || echo Ignored strip on a non-binary file
%post
%preun
%postun
%clean
rm -rf $RPM_BUILD_ROOT
%files
#%attr(-,root,root) /usr/share/doc/%{name}-%{version}/README
%attr(-,root,root) /usr/sbin/cronolog
%attr(-,root,root) /usr/sbin/cronosplit
#%files man
%attr(644,root,root) /usr/share/man/man1/*.1*
%doc README

復(fù)制代碼然后,將源碼包復(fù)制到 /usr/src/redhat/SOURCES/

cp cronolog-1.6.2.tar.gz /usr/src/redhat/SOURCES/

執(zhí)行,rpmbuild -ba cronolog.spec

這樣RPM包就生成了,^_^

ls -l /usr/src/redhat/RPMS/i386/

標(biāo)簽:公主嶺 河源 廣安 麗水 雅安 商丘 六盤水 青島

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Centos下rpm包如何制作?Centos下rpm包制作的方法》,本文關(guān)鍵詞  Centos,下,rpm,包如何,包,如何,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《Centos下rpm包如何制作?Centos下rpm包制作的方法》相關(guān)的同類信息!
  • 本頁收集關(guān)于Centos下rpm包如何制作?Centos下rpm包制作的方法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    乌拉特中旗| 肥城市| 彭山县| 清镇市| 吉隆县| 渭南市| 岚皋县| 五华县| 孝昌县| 云梦县| 察哈| 麻江县| 柘荣县| 清苑县| 上犹县| 亚东县| 阳高县| 会东县| 车致| 清徐县| 浦东新区| 张家界市| 小金县| 望谟县| 阜南县| 长治市| 任丘市| 兴海县| 新津县| 明光市| 东宁县| 齐齐哈尔市| 吴忠市| 健康| 和政县| 久治县| 定陶县| 玛沁县| 南通市| 舞阳县| 镇康县|