当前位置: 首页 > news >正文

做网站设计需求国内新闻最近新闻今天

做网站设计需求,国内新闻最近新闻今天,甘肃制作网站,做暧暧小视频网站华子目录 docker实例1.为Ubuntu镜像添加ssh服务2.Docker安装mysql docker实例 1.为Ubuntu镜像添加ssh服务 (1)访问https://hub.docker.com,寻找合适的Ubuntu镜像 (2)拉取Ubuntu镜像 [rootserver ~]# docker pull ubuntu:latest latest: Pulling from library/ub…

华子目录

  • docker实例
    • 1.为Ubuntu镜像添加ssh服务
    • 2.Docker安装mysql

docker实例

1.为Ubuntu镜像添加ssh服务

(1)访问https://hub.docker.com,寻找合适的Ubuntu镜像
在这里插入图片描述
(2)拉取Ubuntu镜像

[root@server ~]# docker pull ubuntu:latest
latest: Pulling from library/ubuntu
7b1a6ab2e44d: Pull complete
Digest: sha256:626ffe58f6e7566e00254b638eb7e0f3b11d4da9675088f4781a50ae288f3322
Status: Downloaded newer image for ubuntu:latest
docker.io/library/ubuntu:latest[root@server ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
ubuntu       latest    ba6acccedd29   2 years ago   72.8MB

(3)后台运行容器,并配置软件源

  • Ubuntu的软件源必须以.list结尾,并且软件源放在/etc/apt/
[root@server ~]# docker run -itd --name ubuntu -p 2222:22 ubuntu:latest
871fe7e0e9a3c0d3f5d079911483cb890323d2dfd3c13d23f685aa2dd4c75944
[root@server ~]# docker exec -it ubuntu bash
root@871fe7e0e9a3:/# mv /etc/apt/sources.list /etc/apt/sources.list.backup  #将原来的软件源置为备份root@871fe7e0e9a3:~# echo  deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse  >>  /etc/apt/sources.list
root@871fe7e0e9a3:~# echo  deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse  >>  /etc/apt/sources.list
root@871fe7e0e9a3:~# echo  deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse  >>  /etc/apt/sources.list
root@871fe7e0e9a3:~# echo  deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse  >>  /etc/apt/sources.list
root@871fe7e0e9a3:~# echo  deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse  >>  /etc/apt/sources.list
root@871fe7e0e9a3:~# echo  deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse  >>  /etc/apt/sources.list
root@871fe7e0e9a3:~# echo  deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse  >>  /etc/apt/sources.list
root@871fe7e0e9a3:~# echo  deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse  >>  /etc/apt/sources.listroot@871fe7e0e9a3:~# cd /etc/apt
root@871fe7e0e9a3:/etc/apt# ls
apt.conf.d  auth.conf.d  preferences.d  sources.list  sources.list.backup  sources.list.d  trusted.gpg.droot@871fe7e0e9a3:/etc/apt# apt update
Ign:1 https://mirrors.aliyun.com/ubuntu jammy InRelease
Ign:2 https://mirrors.aliyun.com/ubuntu jammy-security InRelease
Ign:3 https://mirrors.aliyun.com/ubuntu jammy-updates InRelease
Ign:4 https://mirrors.aliyun.com/ubuntu jammy-backports InRelease
Err:5 https://mirrors.aliyun.com/ubuntu jammy ReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.60.234 443]
Err:6 https://mirrors.aliyun.com/ubuntu jammy-security ReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.60.234 443]
Err:7 https://mirrors.aliyun.com/ubuntu jammy-updates ReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.60.234 443]
Err:8 https://mirrors.aliyun.com/ubuntu jammy-backports ReleaseCertificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.60.234 443]
Reading package lists... Done
W: https://mirrors.aliyun.com/ubuntu/dists/jammy/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/ubuntu/dists/jammy-security/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/ubuntu/dists/jammy-updates/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/ubuntu/dists/jammy-backports/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/ubuntu/dists/jammy/Release: No system certificates available. Try installing ca-certificates.
E: The repository 'https://mirrors.aliyun.com/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: https://mirrors.aliyun.com/ubuntu/dists/jammy-security/Release: No system certificates available. Try installing ca-certificates.
E: The repository 'https://mirrors.aliyun.com/ubuntu jammy-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: https://mirrors.aliyun.com/ubuntu/dists/jammy-updates/Release: No system certificates available. Try installing ca-certificates.
E: The repository 'https://mirrors.aliyun.com/ubuntu jammy-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: https://mirrors.aliyun.com/ubuntu/dists/jammy-backports/Release: No system certificates available. Try installing ca-certificates.
E: The repository 'https://mirrors.aliyun.com/ubuntu jammy-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

(4)安装和配置ssh服务

root@871fe7e0e9a3:~# apt install openssh-server -y

(5)如果需要正常启动ssh服务,则目录/var/run/sshd必须存在

root@871fe7e0e9a3:~# mkdir -p /var/run/sshd

(6)启动ssh服务,并查看监听状态

root@871fe7e0e9a3:~# /usr/sbin/sshd -D &
root@871fe7e0e9a3:~# apt install iproute
root@871fe7e0e9a3:~# ss -lntup

(7)使用ssh连接容器

[root@node1 ~]# ssh root@192.168.80.129 -p 2222

2.Docker安装mysql

(1)访问https://hub.docker.com,寻找合适的mysql镜像
在这里插入图片描述
(2)拉取mysql镜像

[root@server ~]# docker pull mysql:latest
latest: Pulling from library/mysql
72a69066d2fe: Pull complete
93619dbc5b36: Pull complete
99da31dd6142: Pull complete
626033c43d70: Pull complete
37d5d7efb64e: Pull complete
ac563158d721: Pull complete
d2ba16033dad: Pull complete
688ba7d5c01a: Pull complete
00e060b6d11d: Pull complete
1c04857f594f: Pull complete
4d7cfa90e6ea: Pull complete
e0431212d27d: Pull complete
Digest: sha256:e9027fe4d91c0153429607251656806cc784e914937271037f7738bd5b8e7709
Status: Downloaded newer image for mysql:latest
docker.io/library/mysql:latest[root@server ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
mysql        latest    3218b38490ce   2 years ago   516MB
ubuntu       latest    ba6acccedd29   2 years ago   72.8MB

(3)后台运行容器,并使用exec进入容器

  • mariadbMySQL指定-e变量时都是MYSQL_ROOT_PASSWORD
[root@server ~]# docker run -itd --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql:latest
ea6beb680b7ae725d844bd3360e184e772bbbadc9df1e84f10a90b60a9625c52
[root@server ~]# docker ps
CONTAINER ID   IMAGE           COMMAND                   CREATED          STATUS          PORTSNAMES
ea6beb680b7a   mysql:latest    "docker-entrypoint.s…"   15 seconds ago   Up 14 seconds   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp   mysql
871fe7e0e9a3   ubuntu:latest   "bash"                    44 minutes ago   Up 44 minutesubuntu
[root@server ~]# docker exec -it mysql bash
root@ea6beb680b7a:/# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.27 MySQL Community Server - GPLCopyright (c) 2000, 2021, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>
http://www.15wanjia.com/news/31404.html

相关文章:

  • 邯郸网站建设推广哪个杭州seo好
  • 1000M双线网站空间高州网站seo
  • 石家庄建站模板搭建seo课程培训要多少钱
  • 电白区住房和城乡建设部门户网站火蝠电商代运营靠谱吗
  • 网站seo入门最近一周国内热点新闻
  • 网站建设与设计学了做什么的网站平台都有哪些
  • 有没有做淘宝首页特效的网站最全资源搜索引擎
  • 湛江模板建站服务商全球疫情最新数据统计
  • 视觉差滚动网站凡科小程序
  • 如何做好网站建设的要点网络媒体发稿平台
  • 做脚奴网站进入百度app查看
  • wordpress安装没有选择语言长沙seo关键词
  • 网站研发公司微信crm
  • 做农产品交易网站有哪些广告公司职位
  • 桂林两江四湖在哪里seo技术自学
  • 网络营销 长沙上海网站seo公司
  • 用java开发网站的步骤网站建设是什么
  • 网站标题title怎么写昨日凌晨北京突然宣布重大消息
  • 群晖服务器做网站英文网站推广
  • 做网站 用什么兼容温州网站快速排名
  • 家教网站怎么做百度秒收录蜘蛛池
  • 怎么查询网站点击量b站在线观看人数在哪
  • 17网站一起做网店类似的优化网站排名需要多少钱
  • 网站建设的申请竞价托管开户
  • 做网站的要花多少钱搜索引擎营销方式
  • 网站地图做计划任务网络营销推广外包服务
  • 手机网站开发的目的青岛百度代理公司
  • 牡丹江网站开发如何给企业做网络推广
  • 沈阳做网站的seo优化网站的注意事项
  • 数据做图网站有哪些内容鼓楼网站seo搜索引擎优化