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
相关推荐
闲云野鹤在人间1 天前
KVM虚拟化实战|CentOS‑Stream8 两种安装方式+模板制作+基础使用
linux·运维·服务器·centos
陈年老古董5 天前
CentOS编译安装Python3.11完整教程
linux·笔记·学习·centos·python3.11
笨笨饿5 天前
#111_关于FreeRTOS面试的一些题目
linux·ubuntu·面试·职场和发展·centos·rtos
一路向北finish8 天前
《CentOS 7 搭建 Hadoop 3.3.6 分布式集群:NFS 共享方案完整实操》
linux·运维·hadoop·分布式·centos
量子炒饭大师13 天前
MySQL 5.7 在 CentOS 7 环境安装:从清理 MariaDB 到初始化与完善配置
数据库·mysql·centos·mariadb
a未来永远是个未知数14 天前
centos离线安装ntpcent
linux·运维·centos
☆凡尘清心☆15 天前
CentOS Stream 9 源码编译搭建 Zabbix7.0.29 完整部署方案(部署成功)
linux·运维·centos
wsad053215 天前
CentOS 10 上使用 Docker Compose 部署 Discuz X5.0 论坛完整教程
linux·docker·centos·discuz
檀越剑指大厂18 天前
CentOS部署Landlord斗地主项目:源码编译并实现远程访问
linux·运维·centos
测试运维日常笔记19 天前
RHEL/CentOS 离线部署指南:配置本地 ISO 镜像作为 YUM 仓库
linux·运维·centos