惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

博客园 - soar.pang

20260313 配置Python环境,执行导出批量数据到Excel,代码由Cursor 生成 python调度高德API,计算经度,维度距离 metabase 使用记录 metabase 搭建使用记录 OCI 2021.09.15-1 Kettle 公式 2021.03.03 Kettle 环境搭建--系统环境Ubuntu20.04 2020.12.31 Oracle 12c 服务器,PL/SQL连接访问提示不支持和用户密码不正确 2020.10.13 Python 处理数据生成多Sheet Excel Oracle 12C RAC环境搭建 Linux 环境中Oracle 安装遇的问题 Postgresql windows 环境安装一 小米智能驱蚊器体验 PowerBI 基础图表 企业单位 【第一周】三维可视之基础运用 测验(一) Python科学计算三维可视化 Pg数据库的基础安装 Windows Server 任务计划执行.exe 20200211 Oracle监听启动异常
metabase 在Ubuntu 20版本上的服务自动重启配置
soar.pang · 2024-09-13 · via 博客园 - soar.pang
  1. 创建系统开机后运行脚本
  2. 在/etc/下创建rc.local文本

sudo touch /etc/rc.local

sudo chmod -R 777 /etc/rc.local

第一句创建重启后的执行文件,第二句是授权

1.在文件rc.local中编写运行sh文件内容

sudo vim /etc/rc.local

#!/bin/sh -e

sleep 1

sudo ./metabasefile/relocadmetabase.sh

exit 0

(这里的xxx.sh,是具体要运行的服务, 我这是要运行metabase

所以, 在metbase文件路径下,创建了sh文件

找到对应路径

创建xxx.sh文件

touch reloadmetabase.sh

如果要删除文件使用命令为sudo rm test.txt

Sudo chmod 777 reloadmetabase.sh

(写的时候注意名字, 不要写错了)

  1. ubuntu-18.04及以上系统取消了rc.local自启动功能,因此不能像ubuntu16一样通过编辑rc.local来设置开机启动脚本,通过下列简单设置后,可以使rc.local重新发挥作用
  2. 以上的内容多用到vim 编辑功能,主要使用sudo vim xxx.sh
  3. Sudo cat xxx.sh

查看文件内容

输入i , 可以填写vim的文件, 按ESC ,可以退出编写 :wq   表示退出并保存

  1. 创建rc-local.service文件
  2. sudo vim /etc/systemd/system/rc-local.service

输入如下内容

[Unit]

Description=/etc/rc.local Compatibility

ConditionPathExists=/etc/rc.local

[Service]

Type=forking

ExecStart=/etc/rc.local start

TimeoutSec=0

StandardOutput=tty

RemainAfterExit=yes

SysVStartPriority=99

[Install]

WantedBy=multi-user.target

  1. sudo systemctl enable rc-local

启动服务

查看服务状态

sudo systemctl status rc-local.service

  1. 重启服务器 sudo reboot

也许并不是你需要的内容,这只是我人生的一些痕迹. -- soar.pang