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
相关推荐
承渊政道2 小时前
Linux系统学习【Linux基础开发工具】
linux·运维·笔记·学习·centos·编辑器
❀͜͡傀儡师12 小时前
centos 7部署dns服务器
linux·服务器·centos·dns
予枫的编程笔记21 小时前
【Linux入门篇】Linux入门不踩坑:内核、发行版解析+环境搭建全流程
linux·ubuntu·centos·vmware·xshell·linux入门·linux环境搭建
艾莉丝努力练剑1 天前
【Linux:文件】基础IO:文件操作的系统调用和库函数各个接口汇总及代码演示
linux·运维·服务器·c++·人工智能·centos·io
醇氧1 天前
【Linux】centos 防火墙学习
linux·学习·centos
❀͜͡傀儡师1 天前
CentOS 7部署FTP服务
linux·运维·centos·ftp
swaveye90601 天前
轻量服务器CentOS 7.9 64位 设置允许防火墙/HTTP/HTTPS访问
运维·服务器·centos
雨笋情缘2 天前
在 CentOS 7 系统中通过定时任务自动执行 Shell 脚本
centos·crontab
Web极客码2 天前
CentOS 7.x如何快速升级到CentOS 7.9
linux·运维·centos
Lw老王要学习2 天前
CentOS 7.9达梦数据库安装全流程解析
linux·运维·数据库·centos·达梦