当前位置:网站首页>Convert source package to RPM package
Convert source package to RPM package
2022-07-29 07:54:00 【Never Done777】
With NGINX For example :
1. yum -y install rpm-build #### Installation and fabrication rpm Package tools

2 . rpmbuild -ba nginx.spec #### Make rpm package , But if there is no configuration file, an error will be reported , You also need to knock when you report an error , Will produce the required directory ( Destination directory )

3. cp ~/lnmp_soft/nginx-1.17.6.tar.gz rpmbuild/SOURCES/
##### Copy source code Package to rpmbuild Working directory of notes : Because the installation is NGINX therefore nginx The dependency package of gcc make pcre-devel openssl-develmake l You have to install it in advance .
4.vim rpmbuild/SPECS/nginx.spec // Writing will nginx Convert to rpm Package configuration file


Name:nginx // The software name
Version:1.17.6 // edition
Release:1 // released rpm The version of the package
Summary:test~ // A brief description
#Group:
License:GPL // License agreement ,GPL Free software
URL:www.abc.com // website
Source0:nginx-1.17.6.tar.gz // Source package
#BuildRequires:
#Requires:
%description // Detailed description
test~ test~
%post // You can add installation rpm Commands executed after package , It's not necessary
useradd nginx
%prep
%setup -q
%build
./configure // To configure , If you want to add options or modules, you can continue to write
make %{?_smp_mflags} // compile
%install
make install DESTDIR=%{buildroot} // install
%files
%doc
/usr/local/nginx/* // Package the files under the changed path into rpm
%changelog
5.rpmbuild -ba rpmbuild/SPECS/nginx.spec #### Make according to the above documents rpm package

6.ls rpmbuild/RPMS/x86_64/nginx-1.17.6-1.x86_64.rpm ##### See the end result

0

View validation

边栏推荐
- MySQL 45 talk | 07 line lock merits and demerits: how to reduce the impact of line lock on performance?
- [WPF] realize language switching through dynamic / static resources
- The difference between static library and dynamic library of program
- 在一个sql文件中,上面定义一个测试表及数据,下面可以select* from 测试表
- 下推分析的限制
- Compare three clock circuit schemes of single chip microcomputer
- Jiamusi Market Supervision Bureau carried out special food safety network training on epidemic and insect prevention
- Limitations of push down analysis
- The new colleague wrote a few pieces of code, broke the system, and was blasted by the boss!
- mysql 使用 DATE_FORMAT(date,'%Y-%m')
猜你喜欢

Technology sharing | quick intercom integrated dispatching system

Zero technology is deeply involved in the development of privacy computing financial scenario standards of the ICT Institute

Jianmu continuous integration platform v2.5.2 release

JVM garbage collection mechanism (GC)

IonIcons图标大全
![[cryoelectron microscope] relation4.0 - subtomogram tutorial](/img/5b/5364fbe68c495b67d9db5ed9bec2ac.png)
[cryoelectron microscope] relation4.0 - subtomogram tutorial

Jump from mapper interface to mapping file XML in idea

What are the answers about older bloggers?

Solve the problem that CSDN cannot publish blog due to unknown copyright

LANDSCAPE
随机推荐
Output 1234 three digits without repetition
在一个sql文件中,上面定义一个测试表及数据,下面可以select* from 测试表
Autojs微信研究:微信自动发送信息机器人最终成品(有效果演示)
MapReduce steps of each stage
Effective learning of medical image segmentation annotation based on noise pseudo tags and adversarial learning
FLink CDC 的mysql connector中,mysql的字段是varbinary, 官方
Space shooting Lesson 17: game over (end)
207. Curriculum
The database uses PSQL and JDBC to connect remotely and disconnect automatically from time to time
cs61abc分享会(六)程序的输入输出详解 - 标准输入输出,文件,设备,EOF,命令行参数
Ionicons icon Encyclopedia
Amaze UI 图标查询
Analyze the roadmap of 25 major DFI protocols and predict the seven major trends in the future of DFI
LANDSCAPE
What are the common error types and solutions of black box testing?
Sort out the two NFT pricing paradigms and four solutions on the market
Sqlmap (SQL injection automation tool)
[WPF] realize language switching through dynamic / static resources
RoBERTa:A Robustly Optimized BERT Pretraining Approach
10 common software architecture modes