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
相关推荐
Maple_land7 小时前
Linux进程第五讲:PPID与bash的关联、fork系统调用的原理与实践操作(上)
linux·运维·服务器·centos·bash
_OP_CHEN9 小时前
Linux 系统编程:(一)从历史演进到 XShell 远程登录实操
linux·运维·服务器·centos·unix·xshell
风跟我说过她12 小时前
CentOS 7 环境下 MySQL 5.7 深度指南:从安装、配置到基础 SQL 操作
sql·mysql·centos
罗政1 天前
CentOS 7.6 系统源码部署 HivisionIDPhotos
linux·运维·centos
风跟我说过她1 天前
Sqoop的安装与配置
hive·hadoop·经验分享·centos·hbase·sqoop
荣光波比1 天前
RabbitMQ高可用集群搭建教程(基于CentOS 7.9 + Erlang 23.2.7 + RabbitMQ 3.8.8)
运维·centos·rabbitmq·erlang
IT 小阿姨(数据库)1 天前
PostgreSQL通过pg_basebackup物理备份搭建流复制备库(Streaming Replication Standby)
运维·服务器·数据库·sql·postgresql·centos
upgrador2 天前
操作系统命令:Linux与Shell(Operating System & Command Line, OS/CLI)目录导航、文件操作与日志查看命令实践
linux·ubuntu·centos
BruceD_3 天前
新装 CentOS 7 切换 yum 源完整指南
linux·python·docker·centos·yum
洋哥网络科技3 天前
Centos系统替代选择
linux·运维·centos