You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
757 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

rpmbuild
===
创建RPM的二进制软件包和源码软件包
## 说明
**rpmbuild命令** 被用于创建rpm的二进制软件包和源码软件包。
### 语法
```
rpmbuild(选项)
```
```
--initdb初始化RPM数据库
--rebuilddb从已安装的包头文件方向重建RPM数据库
-ba创建二进制和源代码包
-bb创建二进制代码包
-bs创建源代码包。
```
### 实例
```
rpmbuild -ba 'spec文件路径'
```
build完后可以在`/usr/src/redhat/RPMS/`下找到二进制rpm包rpm包按照其对应的cpu体系结构分类通常在`/usr/src/redhat/RPMS/i386`目录下。`/usr/src/redhat/SRPMS/`下找到源码rpm包此时由于是源代码所以无须按体系结构分类。