HarBor私有镜像仓库安装部署

环境准备
#>>> redis
$ yum -y install redis
$ systemctl enable --now redis
$ vim /etc/redis.conf
modify: bind <ipaddress>
$ systemctl restart redis

#>>> nfs
$ yum -y install nfs-utils
$ mkdir -p /data/harbor
$ vi /etc/exports
/data/harbor	<ipsegment>/<netmask>(rw,sync,no_root_squash)
$ systemctl enable --now nfs

#>>>测试:【两台harbor机器都要操作】
$ vi /etc/fstab
<nfs-server-ipaddress>:/data/harbor	/data/harbor	nfs	defaults	0 0

$ mount -a
mount.nfs: mount point /data/harbor does not exist
$ mkdir -p /data/harbor
$ mount -a
$ df -Th
文件系统                             类型      容量  已用  可用 已用% 挂载点
devtmpfs                            devtmpfs  979M     0  979M    0% /dev
tmpfs                               tmpfs     991M     0  991M    0% /dev/shm
tmpfs                               tmpfs     991M  9.6M  981M    1% /run
tmpfs                               tmpfs     991M     0  991M    0% /sys/fs/cgroup
/dev/mapper/centos-root             xfs        17G  1.4G   16G    8% /
/dev/sda1                           xfs      1014M  138M  877M   14% /boot
tmpfs                               tmpfs     199M     0  199M    0% /run/user/0
<nfs-server-ipaddress>:/data/harbor nfs4       17G  1.4G   16G    9% /data/harbor

#>>> postgresql
$ yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

$ yum install -y postgresql13-server

$ /usr/pgsql-13/bin/postgresql-13-setup initdb
$ systemctl enable --now postgresql-13

$ vim /var/lib/pgsql/13/data/postgresql.conf
modify: listen_addresses = '*'

$ vim /var/lib/pgsql/13/data/pg_hba.conf
host    all             all             <ipsegment>:<netmask>          md5

$ systemctl restart postgresql-13

$ su - postgres
bash4.2# psql

#>>> 以下操作在posetgresql中进行
postgres=# CREATE DATABASE harbor;
CREATE DATABASE
postgres=# CREATE DATABASE notary_signer;
CREATE DATABASE
postgres=# CREATE DATABASE notary_server;
CREATE DATABASE

postgres=# CREATE USER harbor WITH PASSWORD 'Wyxbuke00.';
CREATE ROLE
postgres=# CREATE USER notary_signer WITH PASSWORD 'Wyxbuke00.';
CREATE ROLE
postgres=# CREATE USER notary_server WITH PASSWORD 'Wyxbuke00.';
CREATE ROLE

postgres=# GRANT ALL PRIVILEGES ON DATABASE harbor TO harbor;
GRANT
postgres=# GRANT ALL PRIVILEGES ON DATABASE notary_signer TO notary_signer;
GRANT
postgres=# GRANT ALL PRIVILEGES ON DATABASE notary_server TO notary_server;

#>>> nginx
$ vim /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

$ yum -y install nginx
$ cd /etc/nginx/conf.d
$ vim harbor-proxy.conf
upstream harbor-service {
    server <harborA_ipaddress>:80;
    server <harborB_ipaddress>:80;
}

server {
    listen       80;
    server_name  harbor.daemon.com;
    access_log  /var/log/nginx/harbor-loadbalance.access.log  main;

    location / {
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://harbor-service;
    }
}

$ systemctl restart nginx
harbor配置及启动
#>>> 安装harbor
#>>> 含义: 对企业内的镜像进行统一的管理,并且harbor还带有 用户管理功能, 并且还具备LDAP用户管理域接入功能;

#>>> 1.事先在两台harbor机其中安装好docker, 并配置好加速器
#>>> 2.安装docker-compose
$ curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ chmod a+x /usr/local/bin/docker-compose
$ ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

#>>> harbor 下载地址: https://github.com/goharbor/harbor/releases/download/v2.5.0/harbor-offline-installer-v2.5.0.tgz
$ tar xf harbor-offline-installer-$(VERSION).tgz -C /usr/local/
$ cd /usr/local/harbor
$ cp harbor.yml.tmpl harbor.yml
$ vim harbor.yml
# Uncomment external_database if using external database.
external_database:
  harbor:
    host: <postgresql_address>
    port: 5432
    db_name: harbor
    username: harbor
    password: Wyxbuke00.
    ssl_mode: disable
    max_idle_conns: 2
    max_open_conns: 0
  notary_signer:
    host: <postgresql_address>
    port: 5432
    db_name: notary_signer
    username: notary_signer
    password:Wyxbuke00.
    ssl_mode: disable
  notary_server:
    host: <postgresql_address>
    port: 5432
    db_name: notary_server
    username: notary_server
    password: Wyxbuke00.
    ssl_mode: disable

# Uncomment external_redis if using external Redis server
external_redis:
  # support redis, redis+sentinel
  # host for redis: <host_redis>:<port_redis>
  # host for redis+sentinel:
  #  <host_sentinel1>:<port_sentinel1>,<host_sentinel2>:<port_sentinel2>,<host_sentinel3>:<port_sentinel3>
  host: <redis_address>:6379
  #password:
  # sentinel_master_set must be set to support redis+sentinel
  #sentinel_master_set:
  # db_index 0 is for core, it's unchangeable
  registry_db_index: 1
  jobservice_db_index: 2
  chartmuseum_db_index: 3
  trivy_db_index: 5
  idle_timeout_seconds: 30

#>>> harbor安装步骤
#>>> 下载所需的镜像
[root@harbor-a harbor]# ./prepare
#>>> 直接安装
[root@harbor-a harbor]# ./install.sh

#>>> 上传时报错
[root@harbor-a harbor]# vim /etc/docker/daemon.json
"insecure-registries": ["harbor.hiops.com"]

或者通过xftp将提前下载好的harbor和docker-compose传到虚拟机上:

[root@service ~]# tar xf harbor-offline-installer-v2.8.4.tgz -C /usr/local
[root@service ~]# cd /usr/local
[root@service local]# ll
总用量 0
drwxr-xr-x. 2 root root   6  8月 10  2021 bin
drwxr-xr-x. 2 root root   6  8月 10  2021 etc
drwxr-xr-x. 2 root root   6  8月 10  2021 games
drwxr-xr-x. 2 root root 122  3月 10 20:47 harbor
drwxr-xr-x. 2 root root   6  8月 10  2021 include
drwxr-xr-x. 2 root root   6  8月 10  2021 lib
drwxr-xr-x. 3 root root  17  9月  7  2023 lib64
drwxr-xr-x. 2 root root   6  8月 10  2021 libexec
drwxr-xr-x. 2 root root   6  8月 10  2021 sbin
drwxr-xr-x. 5 root root  49  9月  7  2023 share
drwxr-xr-x. 2 root root   6  8月 10  2021 src

[root@service local]# cd harbor
[root@service harbor]# ll\
> 
总用量 597536
-rw-r--r--. 1 root root      3639  8月 15  2023 common.sh
-rw-r--r--. 1 root root 611834153  8月 15  2023 harbor.v2.8.4.tar.gz
-rw-r--r--. 1 root root     12499  8月 15  2023 harbor.yml.tmpl
-rwxr-xr-x. 1 root root      2725  8月 15  2023 install.sh
-rw-r--r--. 1 root root     11347  8月 15  2023 LICENSE
-rwxr-xr-x. 1 root root      1881  8月 15  2023 prepare
[root@service harbor]# cp harbor.yml.tmpl harbor.yml
[root@service harbor]# ./install.sh


[root@service harbor]#  vim harbor.yml
#https:
  # https port for harbor, default is 443
  # port: 443
  # The path of cert and key files for nginx
  #certificate: /your/certificate/path
  #private_key: /your/private/key/path

# # Uncomment following will enable tls communication between all harbor components
# internal_tls:
#   # set enabled to true means internal tls is enabled
#   enabled: true
#   # put your cert and key files on dir
#   dir: /etc/harbor/tls/internal

# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
# external_url: https://reg.mydomain.com:8433

# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: 123456

[root@service harbor]# ./install.sh

[Step 0]: checking if docker is installed ...

Note: docker version: 25.0.3

[Step 1]: checking docker-compose is installed ...

Note: Docker Compose version v2.24.5

[Step 2]: loading Harbor images ...
Loaded image: goharbor/harbor-jobservice:v2.8.4
Loaded image: goharbor/redis-photon:v2.8.4
Loaded image: goharbor/harbor-log:v2.8.4
Loaded image: goharbor/harbor-db:v2.8.4
Loaded image: goharbor/nginx-photon:v2.8.4
Loaded image: goharbor/prepare:v2.8.4
Loaded image: goharbor/harbor-core:v2.8.4
Loaded image: goharbor/trivy-adapter-photon:v2.8.4
Loaded image: goharbor/harbor-portal:v2.8.4
Loaded image: goharbor/registry-photon:v2.8.4
Loaded image: goharbor/notary-server-photon:v2.8.4
Loaded image: goharbor/notary-signer-photon:v2.8.4
Loaded image: goharbor/harbor-registryctl:v2.8.4
Loaded image: goharbor/harbor-exporter:v2.8.4


[Step 3]: preparing environment ...

[Step 4]: preparing harbor configs ...
prepare base dir is set to /usr/local/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
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: /compose_location/docker-compose.yml
Clean up the input dir


Note: stopping existing Harbor instance ...


[Step 5]: starting Harbor ...
[+] Running 9/10
 ? Network harbor_harbor        Created                                                                                                                               3.3s 
 ? Container harbor-log         Started                                                                                                                               0.5s 
 ? Container redis              Started                                                                                                                               1.9s 
 ? Container harbor-db          Started                                                                                                                               1.6s 
 ? Container harbor-portal      Started                                                                                                                               1.7s 
 ? Container registry           Started                                                                                                                               1.9s 
 ? Container registryctl        Started                                                                                                                               1.5s 
 ? Container harbor-core        Started                                                                                                                               2.3s 
 ? Container nginx              Started                                                                                                                               3.1s 
 ? Container harbor-jobservice  Started                                                                                                                               3.1s 
? ----Harbor has been installed and started successfully.----
[root@service harbor]# ll
总用量 597560
drwxr-xr-x. 3 root root        20  3月 10 20:49 common
-rw-r--r--. 1 root root      3639  8月 15  2023 common.sh
-rw-r--r--. 1 root root      5834  3月 10 20:51 docker-compose.yml
-rw-r--r--. 1 root root 611834153  8月 15  2023 harbor.v2.8.4.tar.gz
-rw-r--r--. 1 root root     12497  3月 10 20:51 harbor.yml
-rw-r--r--. 1 root root     12499  8月 15  2023 harbor.yml.tmpl
-rwxr-xr-x. 1 root root      2725  8月 15  2023 install.sh
-rw-r--r--. 1 root root     11347  8月 15  2023 LICENSE
-rwxr-xr-x. 1 root root      1881  8月 15  2023 prepare
.
[root@service harbor]# systemctl start docker

[root@service harbor]# cd ~
[root@service ~]# ll
总用量 653920
-rw-------. 1 root root      1293  9月  7  2023 anaconda-ks.cfg
-rw-r--r--. 1 root root  61431093  3月 10 20:51 docker-compose-linux-x86_64
-rw-r--r--. 1 root root 608175520  3月 10 20:47 harbor-offline-installer-v2.8.4.tgz
[root@service ~]#  mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
[root@service ~]# chmod +x /usr/local/bin/docker-compose
[root@service ~]# docker-compose version
Docker Compose version v2.24.6
[root@service ~]# cd /usr/local/harbor
[root@service harbor]# ll
总用量 597560
drwxr-xr-x. 3 root root        20  3月 10 20:49 common
-rw-r--r--. 1 root root      3639  8月 15  2023 common.sh
-rw-r--r--. 1 root root      5834  3月 10 20:51 docker-compose.yml
-rw-r--r--. 1 root root 611834153  8月 15  2023 harbor.v2.8.4.tar.gz
-rw-r--r--. 1 root root     12497  3月 10 20:51 harbor.yml
-rw-r--r--. 1 root root     12499  8月 15  2023 harbor.yml.tmpl
-rwxr-xr-x. 1 root root      2725  8月 15  2023 install.sh
-rw-r--r--. 1 root root     11347  8月 15  2023 LICENSE
-rwxr-xr-x. 1 root root      1881  8月 15  2023 prepare
[root@service harbor]# ./install.sh


[root@service harbor]# docker-cpmpose ps
bash: docker-cpmpose: command not found...
[root@service harbor]# docker-compose ps
NAME                IMAGE                                COMMAND                   SERVICE       CREATED          STATUS                             PORTS
harbor-core         goharbor/harbor-core:v2.8.4          "/harbor/entrypoint.…"   core          14 seconds ago   Up 12 seconds (health: starting)   
harbor-db           goharbor/harbor-db:v2.8.4            "/docker-entrypoint.…"   postgresql    14 seconds ago   Up 12 seconds (health: starting)   
harbor-jobservice   goharbor/harbor-jobservice:v2.8.4    "/harbor/entrypoint.…"   jobservice    14 seconds ago   Up 10 seconds (health: starting)   
harbor-log          goharbor/harbor-log:v2.8.4           "/bin/sh -c /usr/loc…"   log           15 seconds ago   Up 13 seconds (health: starting)   127.0.0.1:1514->10514/tcp
harbor-portal       goharbor/harbor-portal:v2.8.4        "nginx -g 'daemon of…"   portal        14 seconds ago   Up 12 seconds (health: starting)   
nginx               goharbor/nginx-photon:v2.8.4         "nginx -g 'daemon of…"   proxy         14 seconds ago   Up 11 seconds (health: starting)   0.0.0.0:80->8080/tcp, :::80->8080/tcp
redis               goharbor/redis-photon:v2.8.4         "redis-server /etc/r…"   redis         14 seconds ago   Up 12 seconds (health: starting)   
registry            goharbor/registry-photon:v2.8.4      "/home/harbor/entryp…"   registry      14 seconds ago   Up 12 seconds (health: starting)   
registryctl         goharbor/harbor-registryctl:v2.8.4   "/home/harbor/start.…"   registryctl   14 seconds ago   Up 12 seconds (health: starting)   
[root@service harbor]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0c:29:04:e4:be brd ff:ff:ff:ff:ff:ff
    altname enp3s0
    inet 192.168.142.139/24 brd 192.168.142.255 scope global dynamic noprefixroute ens160
       valid_lft 1164sec preferred_lft 1164sec
    inet6 fe80::20c:29ff:fe04:e4be/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ca:d6:7d:06 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:caff:fed6:7d06/64 scope link 
       valid_lft forever preferred_lft forever
39: br-bb464c28b278: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:6d:88:8a:3d brd ff:ff:ff:ff:ff:ff
    inet 172.19.0.1/16 brd 172.19.255.255 scope global br-bb464c28b278
       valid_lft forever preferred_lft forever
    inet6 fe80::42:6dff:fe88:8a3d/64 scope link 
       valid_lft forever preferred_lft forever
41: veth3205038@if40: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether e6:45:10:37:aa:b0 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::e445:10ff:fe37:aab0/64 scope link 
       valid_lft forever preferred_lft forever
43: vethf157077@if42: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether c2:d0:e0:23:f5:a7 brd ff:ff:ff:ff:ff:ff link-netnsid 1
    inet6 fe80::c0d0:e0ff:fe23:f5a7/64 scope link 
       valid_lft forever preferred_lft forever
45: veth0c7a7b8@if44: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether 16:c5:94:c5:96:5d brd ff:ff:ff:ff:ff:ff link-netnsid 4
    inet6 fe80::14c5:94ff:fec5:965d/64 scope link 
       valid_lft forever preferred_lft forever
47: veth6610ffe@if46: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether ea:12:ad:ca:7b:24 brd ff:ff:ff:ff:ff:ff link-netnsid 2
    inet6 fe80::e812:adff:feca:7b24/64 scope link 
       valid_lft forever preferred_lft forever
49: veth854dad4@if48: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether 26:41:3e:22:19:54 brd ff:ff:ff:ff:ff:ff link-netnsid 3
    inet6 fe80::2441:3eff:fe22:1954/64 scope link 
       valid_lft forever preferred_lft forever
51: veth65c0a78@if50: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether 16:8e:9f:1a:f6:e2 brd ff:ff:ff:ff:ff:ff link-netnsid 5
    inet6 fe80::148e:9fff:fe1a:f6e2/64 scope link 
       valid_lft forever preferred_lft forever
53: vethdd7defd@if52: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether 22:dd:3e:cf:94:a9 brd ff:ff:ff:ff:ff:ff link-netnsid 6
    inet6 fe80::20dd:3eff:fecf:94a9/64 scope link 
       valid_lft forever preferred_lft forever
55: vethf476dd9@if54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether 22:34:53:96:68:af brd ff:ff:ff:ff:ff:ff link-netnsid 8
    inet6 fe80::2034:53ff:fe96:68af/64 scope link 
       valid_lft forever preferred_lft forever
59: veth0016bd1@if58: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bb464c28b278 state UP group default 
    link/ether 9e:39:87:d0:0f:0f brd ff:ff:ff:ff:ff:ff link-netnsid 7
    inet6 fe80::9c39:87ff:fed0:f0f/64 scope link 
       valid_lft forever preferred_lft forever

通过主机IP地址输出到浏览器,登陆harbor图形化界面

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/446626.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

简介:CMMI软件能力成熟度集成模型

前言 CMMI是英文Capability Maturity Model Integration的缩写。 CMMI认证简称软件能力成熟度集成模型&#xff0c;是鉴定企业在开发流程化和质量管理上的国际通行标准&#xff0c;全球软件生产标准大都以此为基点&#xff0c;并都努力争取成为CMMI认证队伍中的一分子。 对一个…

动静态库

inode inode用于管理文件属性和内容 一个文件只能有一个inode&#xff0c;一个inode可以对应多个文件名 Linux进程中&#xff0c;打开的每一个文件都有对应的文件inode属性和文件页缓冲区&#xff08;内存和磁盘的缓冲区&#xff09; 软硬链接 硬链接 多个文件指向同一个i…

Gradle模块化最佳实践

一&#xff0c;模块化的原因及意义 模块化是一种将大型的软件系统拆分成相互独立的模块的方法。具有以下优势&#xff1a; 代码复用&#xff1a;不同的模块可以共享相同的代码。这样可以避免重复编写相同的代码&#xff0c;提高开发效率。模块独立性&#xff1a;每个模块都可…

【安装教程】windows下安装Faiss-GPU

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 【安装教程】windows下安装Faiss-GPU 查看安装指令 查看安装指令 登录网站&#xff1a;https://anaconda.org/ &#xff0c; 然后搜索faiss-gpu会进入如下界面&#xff0c;或…

Vue 3中的reactive:响应式状态的全面管理

&#x1f90d; 前端开发工程师、技术日更博主、已过CET6 &#x1f368; 阿珊和她的猫_CSDN博客专家、23年度博客之星前端领域TOP1 &#x1f560; 牛客高级专题作者、打造专栏《前端面试必备》 、《2024面试高频手撕题》 &#x1f35a; 蓝桥云课签约作者、上架课程《Vue.js 和 E…

讲解Python3内置模块之json编码解码方法

简介 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式&#xff0c;它基于ECMAScript的一个子集。 JSON采用完全独立于语言的文本格式&#xff0c;这些特性使JSON成为理想的数据交换格式&#xff0c;易于人阅读和编写&#xff0c;同时也易于机器解析和生成&#…

web前端框架

目前比较火热的几门框架: React React是由Facebook(脸书)开发和创建的开源框架。React 用于开发丰富的用户界面&#xff0c;特别是当您需要构建单页应用程序时。它是最强大的前端框架。 弊端: 您不具备 JavaScript 的实践知识&#xff0c;则建议不要使用 React。同样&#x…

MIT6.828LAB4 (3)

LAB3_Part B: Copy-on-Write Fork 文章目录 LAB3_Part B: Copy-on-Write Fork前言练习8练习9练习10练习11练习12总结 前言 记录一下自己的学习过程 实验内容翻译&#xff1a; https://gitee.com/cherrydance/mit6.828 该翻译仅供参考 练习8 实现sys_env_set_pgfault_upcall系统…

内存映射mmap拓展

第一个是上一篇博客中用mmap实现任意两个进程间相互通信&#xff0c;前几篇博客也用管道实现了进程间通信 这里有个问题&#xff0c;管道是基于缓冲区环形队列的&#xff0c;实验也表明读过的数据不能在读利用命名管道实现任意进程间的通信 那么mmap多个读写操作时会是什么情况…

关于GPU显卡的介绍

一.关于英伟达历代产品架构 显卡是一种计算机硬件设备,也被称为显示适配器或图形处理器。目前的硬件部分主要由主板、芯片、存储器、散热器&#xff08;散热片、风扇&#xff09;等部分。显卡的主要芯片是显卡的主要处理单元。显卡上也有和计算机存储器相似的存储器&#xff0…

Mysql数据库-基本表操作

1.表操作 创建表&#xff1a;CREATE TABLE table_name ( field1 datatype, field2 datatype, field3 datatype ) character set 字符集 collate 校验规则 engine 存储引擎; field 表示列名 datatype 表示列的类型 character set 字符集&#xff0c;如果没有指定字符集&#xff…

python学习笔记------集合(set)

集合定义格式 基本语法&#xff1a; #定义集合字面量 {元素&#xff0c;元素&#xff0c;元素......&#xff0c;元素} #定义集合变量 变量名称{元素&#xff0c;元素&#xff0c;元素......&#xff0c;元素} #定义空集合 变量名称set() #定义集合字面量 {元素&#…

【AI辅助研发】-趋势:大势已来,行业变革

【AI辅助研发】-趋势&#xff1a;大势已来&#xff0c;行业变革 引言 在科技日新月异的今天&#xff0c;人工智能&#xff08;AI&#xff09;技术已逐渐渗透到各行各业&#xff0c;其中软件研发行业更是受益匪浅。AI辅助研发已成为大势所趋&#xff0c;不仅提高了软件开发的效…

登录凭证------

为什么需要登录凭证&#xff1f; web开发中&#xff0c;我们使用的协议http是无状态协议&#xff0c;http每次请求都是一个单独的请求&#xff0c;和之前的请求没有关系&#xff0c;服务器就不知道上一步你做了什么操作&#xff0c;我们需要一个办法证明我没登录过 制作登录凭…

免费无水印视频素材哪里下载?这几个地方您要知道

哟哟&#xff0c;切克闹&#xff0c;视频剪辑达人们&#xff0c;是不是在视频素材的海洋里迷航了&#xff1f;别着急&#xff0c;今天我就给大家分享几个超实用的无水印短视频素材合集网&#xff0c;让你的创作更加得心应手&#xff0c;从此素材不再是你的烦恼 1&#xff0c;蛙…

鸿蒙原生应用元服务开发-WebGL网页图形库开发概述

WebGL的全称为Web Graphic Library(网页图形库)&#xff0c;主要用于交互式渲染2D图形和3D图形。目前HarmonyOS中使用的WebGL是基于OpenGL裁剪的OpenGL ES&#xff0c;可以在HTML5的canvas元素对象中使用&#xff0c;无需使用插件&#xff0c;支持跨平台。WebGL程序是由JavaScr…

Hudi入门

一、Hudi编译安装 1.下载 https://archive.apache.org/dist/hudi/0.9.0/hudi-0.9.0.src.tgz2.maven编译 mvn clean install -DskipTests -Dscala2.12 -Dspark33.配置spark与hudi依赖包 [rootmaster hudi-spark-jars]# ll total 37876 -rw-r--r-- 1 root root 38615211 Oct …

【Python从入门到进阶】50、当当网Scrapy项目实战(三)

接上篇《49、当当网Scrapy项目实战&#xff08;二&#xff09;》 上一篇我们讲解了的Spider与item之间的关系&#xff0c;以及如何使用item&#xff0c;以及使用pipelines管道进行数据下载的操作&#xff0c;本篇我们来讲解Scrapy的多页面下载如何实现。 一、多页面下载原理分…

【Leetcode每日一刷】滑动窗口:209.长度最小的子数组

一、209.长度最小的子数组 1.1&#xff1a;题目 题目链接 1.2&#xff1a;解题思路 题型&#xff1a;滑动窗口&#xff1b;时间复杂度&#xff1a;O(n) &#x1faa7; 滑动窗口本质也是双指针的一种技巧&#xff0c;特别适用于字串问题 ❗❗核心思想/ 关键&#xff1a;左右…

A5自媒体wordpress主题模板

一个简洁的wordpress个人博客主题&#xff0c;适合做个人博客&#xff0c;SEO优化效果挺不错的。 https://www.wpniu.com/themes/204.html