Ubuntu18 安装Harbor 并配置https
liuian 2025-01-04 21:25 15 浏览
实验环境:
软件名称 | 版本 |
docker-ce | v19.03.15 |
docker-compose | v1.29.0 |
Harbor | v2.3.2 |
一、Harbor简介
- Harbor是由VMware公司开源的企业级的Docker Registry管理项目,拥有更丰富的权限权利和完善的架构设计,适用大规模docker集群部署提供仓库服务。
- Harbor 是 CNCF 毕业的项目,可提供合规性、性能和互操作性,帮助跨云原生计算平台(如 Kubernetes 和 Docker)一致且安全地管理工件。
- Harbor 提供了 Dcoker Registry 管理界面UI,可基于角色访问控制,镜像复制, AD/LDAP 集成,日志审核等功能,并且完全的支持中文。
二、Harbor 的主要功能
- 基于角色的访问控制
用户与Docker镜像仓库通过“项目”进行组织管理,一个用户可以对多个镜像仓库在同一命名空间(project)里有不同的权限。
- 基于镜像的复制策略
镜像可以在多个Registry实例中复制(可以将仓库中的镜像同步到远程的Harbor,类似于MySQL主从同步功能),尤其适合于负载均衡,高可用,混合云和多云的场景。
- 图形化用户界面
用户可以通过浏览器来浏览,检索当前Docker镜像仓库,管理项目和命名空间。
- 支持 AD/LDAP
Harbor可以集成企业内部已有的AD/LDAP,用于鉴权认证管理。
- 镜像删除和垃圾回收
Harbor支持在Web删除镜像,回收无用的镜像,释放磁盘空间。image可以被删除并且回收image占用的空间。
- 审计管理
所有针对镜像仓库的操作都可以被记录追溯,用于审计管理。
- RESTful API
RESTful API 提供给管理员对于Harbor更多的操控, 使得与其它管理软件集成变得更容易。
- 部署简单
提供在线和离线两种安装工具, 直接使用docker部署,但需要依赖docker官方的 Docker Compose 容器编排工具
- 支持Helm charts仓库
支持Helm charts仓库的功能,需要在安装的时候指定下参数,如 ./install.sh --with-chartmuseum
三、Harbor 架构组件
Habor组件相对较多,看下都运行了哪些容器:
root@manager:/opt/harbor# docker-compose ps
Name Command State Ports
------------------------------------------------------------------------------------------------------------------------------------------------
harbor-core /harbor/entrypoint.sh Up (healthy)
harbor-db /docker-entrypoint.sh 96 13 Up (healthy)
harbor-jobservice /harbor/entrypoint.sh Up (healthy)
harbor-log /bin/sh -c /usr/local/bin/ ... Up (healthy) 127.0.0.1:1514->10514/tcp
harbor-portal nginx -g daemon off; Up (healthy)
nginx nginx -g daemon off; Up (healthy) 0.0.0.0:80->8080/tcp,:::80->8080/tcp, 0.0.0.0:443->8443/tcp,:::443->8443/tcp
redis redis-server /etc/redis.conf Up (healthy)
registry /home/harbor/entrypoint.sh Up (healthy)
registryctl /home/harbor/start.sh Up (healthy)
组件名称 | 说明 | 实现方式 |
Proxy | 用于转发用户的请求到registry/ui/token service 的反向代理 | nginx:使用nginx官方的镜像进行配置 |
Registry | 镜像的push/pull 命令实现的功能 | registry:使用registry官方镜像 |
Database | 保存项目/用户/角色/复制策略等信息到数据库中 | harbor-db: Mariadb的官方镜像,用于保存Harbor的数据库信息 |
Core-service | 用户进行镜像操作的界面实现,通过webhook的机制保证镜像状态的变化harbor能够及时了解以便进行日志更新等操作,而项目用户角色则通过token进行镜像的push/pull等操作 | harbor-ui 等 |
Job services | 镜像复制,可以在harbor实例之间进行镜像的复制或者同步等操作 | harbor-jobservice |
Log collector | 负责收集各个镜像的日志信息进行统一管理 | harbor-log:日志默认保存在/var/log/harbor |
四、Harbor 部署
1、安装docker-ce
安装docker采用清华镜像源:https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/
使用阿里云镜像加速
4.1.1、如果你过去安装过 docker,先删掉:
sudo
apt-get remove docker docker-engine docker.io
4.1.2、首先安装依赖:
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
4.1.3、根据你的发行版,下面的内容有所不同。你使用的发行版:
信任 Docker 的 GPG 公钥:
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4.1.4、对于 amd64 架构的计算机,添加软件仓库:
sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"
4.1.5、安装指定版本的Docker-CE:
Step 1: 查找Docker-CE的版本:
apt-cache madison docker-ce
Step 1: 安装指定版本: 安装docker-ce 会自动依赖安装上docker-cli [docker 客户端工具]
sudo apt-get install docker-ce=5:19.03.15~3-0~ubuntu-bionic -y
4.1.6、使用阿里云docker 镜像加速
登录到阿里云,选择容器镜像服务,点击镜像加速器
4.1.7、配置镜像加速器
可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://u2vzou7d.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
2、安装docker-compose
从GitHub上 下载docker-compose 二进制包: https://github.com/docker/compose/releases/tag/1.29.0
下载 docker-compose-Linux-x86_64 版本
#把下载下来的软件包上传到/root 路径下
root@manager:~# mv docker-compose-Linux-x86_64 /usr/bin/docker-compose
root@manager:~# chmod +x /usr/bin/docker-compose
#安装后查看下版本
root@manager:~# docker-compose version
docker-compose version 1.29.0, build 07737305
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
3、创建harbor证书
PS: 公司一般都会有商业的证书,直接拿过来使用即可
如果只是想做一张内网用的电子证书或不想花钱去找个 CA 签署,可以造一张自签 (Self-signed)的电子证书。当然这类电子证书没有任何保证,浏览器遇到这证书会发出警告,甚至不接收这类证书。使用自签名(self-signed)的证书,它的主要目的不是防伪,而是使用户和系统之间能够进行SSL通信,保证密码等个人信息传输时的安全。
#创建证书路径
root@manager:/# mkdir /root/cert
root@manager:~/cert# cd /root/cert/
#生成一个.key文件
root@manager:~/cert# openssl genrsa -out ssl.key 1024
#根据这个key文件生成.csr 证书请求文件
root@manager:~/cert# openssl req -new -key ssl.key -out ssl.csr
Can't load /root/.rnd into RNG
140061599584704:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:BeiJing
Locality Name (eg, city) []:BeiJing
Organization Name (eg, company) [Internet Widgits Pty Ltd]:fxkjnj
Organizational Unit Name (eg, section) []:fxkjnj
Common Name (e.g. server FQDN or YOUR name) []:harbor.fxkjnj.com
Email Address []:admin@fxkjnj.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
#根据这2个文件生成.crt证书文件,10年有效期
root@manager:~/cert# openssl x509 -req -days 3650 -in ssl.csr -signkey ssl.key -out ssl.crt
Signature ok
subject=C = CN, ST = BeiJing, L = Beijing, O = FXKJNJ, OU = FXKJNJ, CN = harbor.fxkjnj.com, emailAddress = admin@fxkjnj.com
Getting Private key
root@manager:~/cert# ls -l
total 12
-rw-r--r-- 1 root root 977 Sep 29 16:01 ssl.crt
-rw-r--r-- 1 root root 708 Sep 29 15:07 ssl.csr
-rw------- 1 root root 887 Sep 29 14:59 ssl.key
4、安装harbor
从GitHub上 下载Harbor的软件包: https://github.com/goharbor/harbor/releases/tag/v2.3.2
下载 harbor-offline-installer-v2.3.2.tgz 离线版
4.1、 把下载下来的软件包上传到/root 路径下
root@manager:~# tar -xf harbor-offline-installer-v2.3.2.tgz -C /opt/
root@manager:~# cd /opt/harbor
root@manager:/opt/harbor# ls -l
total 594384
-rw-r--r-- 1 root root 3361 Aug 18 16:51 common.sh
-rw-r--r-- 1 root root 608611132 Aug 18 16:52 harbor.v2.3.2.tar.gz
-rw-r--r-- 1 root root 7840 Aug 18 16:51 harbor.yml.tmpl
-rwxr-xr-x 1 root root 2500 Aug 18 16:51 install.sh
-rw-r--r-- 1 root root 11347 Aug 18 16:51 LICENSE
-rwxr-xr-x 1 root root 1881 Aug 18 16:51 prepare
4.2、 把创建的证书,复制到/opt/harbor 路径下
root@manager:/opt/harbor# cp /root/cert/{ssl.key,ssl.crt} /opt/harbor/
root@manager:/opt/harbor# ls -l
total 594428
drwxr-xr-x 5 root root 4096 Sep 29 16:04 ./
drwxr-xr-x 4 root root 4096 Sep 29 15:12 ../
drwxr-xr-x 3 root root 4096 Sep 29 15:50 common/
-rw-r--r-- 1 root root 3361 Aug 18 16:51 common.sh
drwxr-xr-x 9 root root 4096 Sep 29 15:56 data/
-rw-r--r-- 1 root root 7058 Sep 29 15:56 docker-compose.yml
-rw-r--r-- 1 root root 608611132 Aug 18 16:52 harbor.v2.3.2.tar.gz
-rw-r--r-- 1 root root 7871 Sep 29 15:55 harbor.yml
-rw-r--r-- 1 root root 7840 Aug 18 16:51 harbor.yml.tmpl
-rwxr-xr-x 1 root root 2500 Aug 18 16:51 install.sh*
-rw-r--r-- 1 root root 11347 Aug 18 16:51 LICENSE
drwxr-xr-x 2 10000 10000 4096 Sep 29 15:57 log/
-rwxr-xr-x 1 root root 1881 Aug 18 16:51 prepare*
-rw-r--r-- 1 root root 977 Sep 29 16:04 ssl.crt
-rw------- 1 root root 887 Sep 29 16:04 ssl.key
4.3、 创建harbor配置文件
root@manager:/opt# cd /opt/haror
root@manager:/opt/harbor# cp harbor.yml.tmpl harbor.yml
root@manager:/opt/harbor# vim harbor.yml
#只需要修改成如下内容
.................
#配置Harbor域名访问地址
hostname: harbor.fxkjnj.com
.................
#配置Harbor证书路径
certificate: /opt/harbor/ssl.crt
private_key: /opt/harbor/ssl.key
.................
#配置Harbor管理员密码
harbor_admin_password: fxkjnj
.................
#配置Harbor数据存放路径
data_volume: /opt/harbor/data
.................
#配置Harbor日志路径
location: /opt/harbor/log
.................
#保存并退出
4.4、创建harbor数据目录和日志目录
root@manager:/opt# mkdir /opt/harbor/data
root@manager:/opt# mkdir /opt/harbor/log
4.5、执行./install.sh 脚本安装harbor
# 为了后期使用Helm 方便,我们之间安装上helm,添加安装参数:--with-chartmuseum
root@manager:/opt# cd /opt/harbor
root@manager:/opt/harbor# ./install.sh --with-chartmuseum
[Step 0]: checking if docker is installed ...
Note: docker version: 20.10.8
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 1.29.0
[Step 2]: loading Harbor images ...
Loaded image: goharbor/redis-photon:v2.3.2
Loaded image: goharbor/nginx-photon:v2.3.2
Loaded image: goharbor/harbor-portal:v2.3.2
Loaded image: goharbor/trivy-adapter-photon:v2.3.2
Loaded image: goharbor/chartmuseum-photon:v2.3.2
Loaded image: goharbor/notary-signer-photon:v2.3.2
Loaded image: goharbor/harbor-core:v2.3.2
Loaded image: goharbor/harbor-log:v2.3.2
Loaded image: goharbor/harbor-registryctl:v2.3.2
Loaded image: goharbor/harbor-exporter:v2.3.2
Loaded image: goharbor/notary-server-photon:v2.3.2
Loaded image: goharbor/prepare:v2.3.2
Loaded image: goharbor/harbor-db:v2.3.2
Loaded image: goharbor/harbor-jobservice:v2.3.2
Loaded image: goharbor/registry-photon:v2.3.2
[Step 3]: preparing environment ...
[Step 4]: preparing harbor configs ...
prepare base dir is set to /opt/harbor
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /data/secret/keys/secretkey
Successfully called func: create_root_cert
Generated configuration file: /config/chartserver/env
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
Note: stopping existing Harbor instance ...
Removing harbor-jobservice ... done
Removing nginx ... done
Removing harbor-core ... done
Removing registry ... done
Removing harbor-portal ... done
Removing redis ... done
Removing registryctl ... done
Removing harbor-db ... done
Removing harbor-log ... done
Removing network harbor_harbor
Removing network harbor_harbor-chartmuseum
WARNING: Network harbor_harbor-chartmuseum not found.
[Step 5]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating network "harbor_harbor-chartmuseum" with the default driver
Creating harbor-log ... done
Creating redis ... done
Creating harbor-db ... done
Creating chartmuseum ... done
Creating registry ... done
Creating registryctl ... done
Creating harbor-portal ... done
Creating harbor-core ... done
Creating harbor-jobservice ... done
Creating nginx ... done
? ----Harbor has been installed and started successfully.----
root@manager:/opt/harbor# docker-compose ps
Name Command State Ports
------------------------------------------------------------------------------------------------------------------------------------------------
chartmuseum ./docker-entrypoint.sh Up (healthy)
harbor-core /harbor/entrypoint.sh Up (healthy)
harbor-db /docker-entrypoint.sh 96 13 Up (healthy)
harbor-jobservice /harbor/entrypoint.sh Up (healthy)
harbor-log /bin/sh -c /usr/local/bin/ ... Up (healthy) 127.0.0.1:1514->10514/tcp
harbor-portal nginx -g daemon off; Up (healthy)
nginx nginx -g daemon off; Up (healthy) 0.0.0.0:80->8080/tcp,:::80->8080/tcp, 0.0.0.0:443->8443/tcp,:::443->8443/tcp
redis redis-server /etc/redis.conf Up (healthy)
registry /home/harbor/entrypoint.sh Up (healthy)
registryctl /home/harbor/start.sh Up (healthy)
4.6、登录到harbor控制台,并创建一个私有的项目
这里,我使用域名去访问harbor, 就需要手动添加修改hosts文件,添加ip 和 域名的映射关系
windows: 编辑 C:\Windows\System32\drivers\etc\hosts 文件
Linux : vim /etc/hosts
访问Harbor: https://harbor.fxkjnj.com/
输入用户名/密码 登录
新建一个私有项目
可以在控制台界面,查看到推送命令:
5、客户端从Harbor上上传,下载镜像
找一台有docker环境的ubuntu 机器,模拟往harbor上上传,下载镜像
#注意,这里,我使用域名去访问harbor, 就需要手动添加修改hosts文件,添加ip 和 域名的映射关系
root@ubuntu:~# docker version
Client: Docker Engine - Community
Version: 20.10.8
API version: 1.40
Go version: go1.16.6
Git commit: 3967b7d
Built: Fri Jul 30 19:54:08 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 19.03.15
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 99e3ed8919
Built: Sat Jan 30 03:15:20 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0.1
GitCommit: v1.0.1-0-g4144b63
docker-init:
Version: 0.18.0
GitCommit: fec3683
5.1、从dockerhub上下载一个nginx:1.20.1 的镜像
root@ubuntu:~# docker pull nginx:1.20.1
1.20.1: Pulling from library/nginx
07aded7c29c6: Already exists
ccf8c35cea14: Pull complete
21ed194ca997: Pull complete
b2329d3f240e: Pull complete
00c4a11249b0: Pull complete
547cf440fa42: Pull complete
Digest: sha256:af635cf83a20ecaf45abc818f54808130da49345d84786d19c074f7fc8de31c7
Status: Downloaded newer image for nginx:1.20.1
docker.io/library/nginx:1.20.1
5.2、给镜像打上标记,以便推送到harhor私有仓库中
root@ubuntu:~# docker tag nginx:1.20.1 harbor.fxkjnj.com/fxkj/nginx:1.20.1
5.3、修改docker 配置文件,添加对私有仓库的信任, insecure-registries
root@ubuntu:~# vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://u2vzou7d.mirror.aliyuncs.com"],
"insecure-registries": ["harbor.fxkjnj.com"]
}
5.3、重启docker
systemctl restart docker
5.4、登录到harbor ,并上传镜像
root@ubuntu:~/.docker# docker login harbor.fxkjnj.com
Username: admin
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
#往harbor上传镜像
root@ubuntu:~/.docker# docker push harbor.fxkjnj.com/fxkj/nginx:1.20.1
The push refers to repository [harbor.fxkjnj.com/fxkj/nginx]
0bdf8da939c8: Pushed
a77307502458: Pushed
b4f0619f5d91: Pushed
2af43e00049a: Pushed
d926ce0c8121: Pushed
476baebdfbf7: Pushed
1.20.1: digest: sha256:00406bbfff1a168789df84ee39bf2267fa61224da7b50badc1f4984513999331 size: 1570
可以看到已经上传成功
5.5、登录到harbor ,下载镜像
PS: 如果我们有几千台docker宿主机需要去访问habor上传,下载镜像,我们难道要一台一台机器登录,然后docker login ? 吗 ,
不,我们只需要在已经登录harbor的一台docker 主机上,拷贝走/root/.docker/config.json 到本机/root/.docker/上,就可以免密去访问habor上传,下载镜像
(1)、 修改docker 配置文件,添加对私有仓库的信任, insecure-registries
root@ubuntu:~# vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://u2vzou7d.mirror.aliyuncs.com"],
"insecure-registries": ["harbor.fxkjnj.com"]
}
(2)、重启docker
systemctl restart docker
(3)、拷贝 config.json 文件到本机/root/.docker/下
scp -rp /root/.docker/config.json k8s-node1:/root/.docker/
(4)、从harbor 上下载镜像下来:
root@k8s-node1:~# docker pull harbor.fxkjnj.com/fxkj/nginx:1.16
1.16: Pulling from fxkj/nginx
54fec2fa59d0: Pull complete
5546cfc92772: Pull complete
50f62e3cdaf7: Pull complete
Digest: sha256:2963fc49cc50883ba9af25f977a9997ff9af06b45c12d968b7985dc1e9254e4b
Status: Downloaded newer image for harbor.fxkjnj.com/fxkj/nginx:1.16
harbor.fxkjnj.com/fxkj/nginx:1.16
6、常见问题
1、在登录harbor 的时候,提示 Error response from daemon: Get https://192.168.31.100/v2/: dial tcp 192.168.30.24:443: connect: connection refused
#解决这个问题其实就在/etc/docker/daemon.json文件下,添加对私有仓库的认证就可以登录了,也就是添加可信任厂库地址
[root@k8s-master ~]# vim /etc/docker/daemon.json
{
"registry-mirrors": ["http://f1361db2.m.daocloud.io"],
"insecure-registries": ["harbor.fxkj.com"]
}
#重启docker
[root@k8s-master ~]# systemctl restart docker
2、使用自签证书,登录Harbor 时,无法打开安全页面
只需要 在当前页面 手动 输入 thisisunsafe 即可打开页面
本文参考了以下内容,原文链接已贴
https://www.yisu.com/zixun/154614.html
https://www.cnblogs.com/tianzhendengni/p/14071523.html
相关推荐
- 第7章 Linux磁盘管理—磁盘格式化和挂载
-
提醒:本文为合集文章,后续会持续更新!关注我,每日提升!7.3 格式化磁盘分区磁盘分区虽然分好区了,但暂时还不能用,我们还须对每一个分区进行格式化。所谓格式化,其实就是安装文件系统,Windows下的...
- Linux三剑客之sed命令详解,小白也能看得懂!
-
sed全称为StreamEDitor,行编辑器,同时也是一种流编辑器,它一次处理一行内容。处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”(patternspace),接着用sed命令处...
- Rust语言介绍,新崛起的编程语言
-
Rust是一门系统编程语言,由于其独特的特点和性能,近年来备受开发者关注,是近几年发展最迅猛的编程语言之一。据StackOverflow开发者调查显示,Rust连续第八年被评为最受喜爱的编程语言,...
- What does " 2>&1 " mean?
-
技术背景在Linux或Unix系统中,程序通常会将输出发送到两个地方:标准输出(stdout)和标准错误(stderr)。标准输出用于正常的程序输出,而标准错误则用于输出程序运行过程中产生的错误信息。...
- 玩转命令行:7 个高效 Linux 命令技巧,助你事半功倍!
-
日常的运维、开发、测试过程中,Linux命令行无疑是我们最常接触的界面之一。掌握一些不为人知但极具实用价值的命令技巧,不仅能大幅提升你的工作效率,更能在关键时刻帮你快速定位问题、批量处理任务、自动化...
- 作为测试人,如何优雅地查看Log日志?
-
作为一名测试工程师,测试工作中和Linux打交道的地方有很多。比如查看日志、定位Bug、修改文件、部署环境等。项目部署在Linux上,如果某个功能发生错误,就需要我们去排查出错的原因,所以熟练地掌握查...
- Linux新手必备:20个高效命令轻松掌握!
-
Linux基本命令使用指南在现代计算机操作系统中,Linux因其开放性、灵活性和强大的功能,广泛应用于服务器和开发环境中。作为技术人员,掌握Linux的基本命令是非常重要的。在本文中,我们将重点介绍2...
- 如何在 Linux 中有效使用 history 命令?
-
在Linux中,每当你在终端输入一条命令并按下回车,这条命令就会被默默记录下来。而history命令的作用,就是让你回顾这些操作的足迹。简单来说,它是一个“命令行日记本”,默认存储在用户主目录...
- Linux/Unix 系统中find命令用法
-
find是Linux/Unix系统中一个非常强大且灵活的命令,用于在目录层次结构中查找文件和目录。它允许你根据各种条件(如名称、类型、大小、权限、修改时间等)来搜索,并对找到的结果执行操作。基本...
- 阿里云国际站:如何通过日志分析排查故障?
-
本文由【云老大】TG@yunlaoda360撰写一、日志收集确定日志位置:应用程序日志:通常位于/var/log/或应用程序的安装目录下,例如Nginx的日志位于/var/log/ngi...
- Linux History命令:如何显示命令执行的日期和时间
-
在Linux系统中,history命令是一个简单却强大的工具,它允许用户查看和重用之前执行过的命令。然而,默认情况下,history命令的输出仅显示命令的序号和内容,并不包含命令执行的日期和时间。这对...
- 在R语言中使用正则表达式
-
有时候我们要处理的是非结构化的数据,例如网页或是电邮资料,那么就需要用R来抓取所需的字符串,整理为进一步处理的数据形式。R语言中有一整套可以用来处理字符的函数,在之前的博文中已经有所涉及。但真正的...
- 网络安全实战:记一次比较完整的靶机渗透
-
0x01信息搜集nmap-sC-sV-p--A10.10.10.123-T4-oAnmap_friendzone访问80端口的http服务只发现了一个域名。0x02DNS区域传输因...
- Java程序员必备的Linux命令
-
Java程序员必备的Linux命令作为一名Java开发者,在日常工作中难免会与Linux服务器打交道。熟练掌握一些常用的Linux命令,不仅能提高工作效率,还能让你在团队中显得更加专业。今天,我将带你...
- linux shell 笔记——1
-
shell的格式开头#!/bin/bash或者#!/bin/sh开头系统变量:HOME、HOME、HOME、PWD、SHELL、SHELL、SHELL、USER,PATH等等比方:echo$...
- 一周热门
-
-
Python实现人事自动打卡,再也不会被批评
-
Psutil + Flask + Pyecharts + Bootstrap 开发动态可视化系统监控
-
一个解决支持HTML/CSS/JS网页转PDF(高质量)的终极解决方案
-
【验证码逆向专栏】vaptcha 手势验证码逆向分析
-
再见Swagger UI 国人开源了一款超好用的 API 文档生成框架,真香
-
网页转成pdf文件的经验分享 网页转成pdf文件的经验分享怎么弄
-
C++ std::vector 简介
-
python使用fitz模块提取pdf中的图片
-
《人人译客》如何规划你的移动电商网站(2)
-
Jupyterhub安装教程 jupyter怎么安装包
-
- 最近发表
- 标签列表
-
- python判断字典是否为空 (50)
- crontab每周一执行 (48)
- aes和des区别 (43)
- bash脚本和shell脚本的区别 (35)
- canvas库 (33)
- dataframe筛选满足条件的行 (35)
- gitlab日志 (33)
- lua xpcall (36)
- blob转json (33)
- python判断是否在列表中 (34)
- python html转pdf (36)
- 安装指定版本npm (37)
- idea搜索jar包内容 (33)
- css鼠标悬停出现隐藏的文字 (34)
- linux nacos启动命令 (33)
- gitlab 日志 (36)
- adb pull (37)
- table.render (33)
- uniapp textarea (33)
- python判断元素在不在列表里 (34)
- python 字典删除元素 (34)
- react-admin (33)
- vscode切换git分支 (35)
- python bytes转16进制 (35)
- grep前后几行 (34)