SpringBoot RPM制作

  1. 安装依赖
shell 复制代码
[root@20240423-instance4 ~]# yum install rpmdevtools

2.初始化目录

shell 复制代码
[root@20240423-instance4 ~]# rpmdev-setuptree 
[root@20240423-instance4 ~]# tree rpmbuild/
rpmbuild/
├── BUILD
├── RPMS
├── SOURCES
├── SPECS
└── SRPMS

5 directories, 0 files

3.编写SPEC文件

shell 复制代码
%define __jar_repack 0
Name: jtlas-server
Version: 1.0.0
Release: 1
Summary: JD.Cloud jtlas service back end server.
License: Apache 2.0
Group: JD.Cloud/Applications
Prefix: /export
Source0: %{name}-%{version}-SNAPSHOT.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
Jtlas Service backend acts as a service for querying metadata from a warehouse.

%prep
%setup -n %{name}

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/export/App/%{name}
cp -r * $RPM_BUILD_ROOT/export/App/%{name}

mkdir -p $RPM_BUILD_ROOT%{_unitdir}

%post
%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
/export/App/%{name}

4.资源包文件打包

shell 复制代码
[root@20240423-instance4 rpmbuild]# rpmbuild -ba SPECS/jtals-server.spec
相关推荐
toooooop81 天前
CentOS 7 内核 3.10.0-1160.119.1 升级指南
linux·运维·centos
oioihoii2 天前
Jenkins自动部署全流程:CentOS 7、GitHub、Gitee、GitLab、Vue+Maven与Webhook
centos·github·jenkins
无足鸟ICT3 天前
【RHCA+】_etc_yum.repos.d_文件名.repo
linux·运维·centos
LuminousCPP5 天前
数据库学习笔记(二):MySQL 基础操作入门|在 CentOS Stream 10 上连接、建库与建表
数据库·经验分享·笔记·学习·mysql·centos
.道阻且长.6 天前
Linux软件包管理器
linux·运维·ubuntu·职场和发展·centos
乔旭伟7 天前
CentOS 停更迁移实战:vault 源配置、目标选型与迁移工程清单
linux·运维·centos
闲云自留地8 天前
CentOS 搬 Ubuntu 24.04:yum 变 apt、防火墙、SELinux、root 全差异避坑
linux·ubuntu·centos
暖核8 天前
从 CentOS 到 Ubuntu24.04 运维迁移手册:命令对照表 + 实操 + 避坑
linux·运维·centos
曦夜日长9 天前
MySQL系统篇,安装部署(一):CentOS 7 下从卸载到登录的完整实战
数据库·mysql·centos
虎头金猫10 天前
从上传PPT到观众远程打开互动页面:Claper在CentOS 7上的Docker部署、互动组件设置与固定访问地址实战
linux·运维·网络·人工智能·docker·centos·powerpoint