Rocky Linux 安装 springboot
时间: 2023-10-18 21:57:40 浏览: 219
springboot。
要在Rocky Linux上安装Spring Boot,您需要先配置yum源为阿里云,并更新缓存。可以使用以下命令更改yum源为阿里云并更新缓存:
```
sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \
-i.bak \
/etc/yum.repos.d/Rocky-*.repo
dnf makecache
```
接下来,您需要安装Redis和Nginx,您可以根据需要选择单机版或集群版配置。以下是示例配置:
单机版配置:
```
#配置Redis的配置信息(单机版)
#spring.redis.host=192.168.188.128
#spring.redis.port=6379
#spring.redis.password=123456
```
集群版配置:
```
#配置Redis的配置信息(集群版,连接哨兵集群)
#指定所有哨兵服务的IP 端口多个地址使用逗号分隔
spring.redis.sentinel.nodes=192.168.19.129:26380,192.168.19.129:26382,192.168.19.129:26384
#指定集群名称取值来自哨兵配置文件
spring.redis.sentinel.master=mymaster
#指定Redis的访问密码
spring.redis.password=123456
```
最后,您需要关闭SELinux和防火墙:
```
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl disable firewalld
systemctl stop firewalld
```
以上是在Rocky Linux上安装Spring Boot的一般步骤。请确保按照您的实际需求进行适当的配置和安装。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [cephadm部署ceph-quincy版(rocky8.6)](https://blog.csdn.net/w975121565/article/details/126770631)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [Linux和部署在Linux上的相关软件](https://blog.csdn.net/Ssucre/article/details/115542747)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文