1.将源码包打包成RPM包 RPM包构成: -metadata元数据:版本,软件名称,依赖关系,发布日期 -file 文件:RPM所需所有文件的打包文件 scripts脚本:安装后,卸载后需要运行的脚本 软件打包流程:准备源码软件-安装rpm-build-编写编译配置文件-编译RPM包
安装rpm-build,编译打包RPM的命令工具 yum -y install rpm-build rpmbuild -ba nginx.spec 注意:这一步会报错,但是仍然会生成rpmbuild文件夹 ls /root/rpmbuild 将源码软件复制到sources目录下 创建并修改SPECS配置文件, vim SPECS/nginx.spec Name:nginx Version:1.8.0 Release:1.rhel7 Summary:The is a Web Server,to nginx
#Group: License:GPL URL:www.uinyun.com Source0:nginx-1.8.0.tar.gz
BuildRequires: gcc pcre openssl-devel #Requires:
%description This is a Web server nginx
%prep %setup -q
%build ./configure --with-http_ssl_module --with-http_stub_status_module make %{?_smp_mflags}
%install make install DESTDIR=%{buildroot}
%files %doc /usr/local/nginx/*
%changelog
rpmbuild -ba SPECS/nginx.spec
生成的RPM包在RPMS下