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

中国第一个做电商网站搜索引擎关键词优化有哪些技巧

中国第一个做电商网站,搜索引擎关键词优化有哪些技巧,小红书关键词优化,webgl网站开发文章目录 Docker引擎的安装Docker比vm虚拟机快 Docker常用命令帮助启动类命令镜像命令docker imagesdocker searchdocker pulldocker system dfdocker rmi 容器命令redis前台交互式启动redis后台守护式启动Nginx容器运行ubuntu交互式运行tomcat交互式运行对外暴露访问端口 Dock…

文章目录

  • Docker引擎的安装
    • Docker比vm虚拟机快
  • Docker常用命令
    • 帮助启动类命令
    • 镜像命令
      • docker images
      • docker search
      • docker pull
      • docker system df
      • docker rmi
    • 容器命令
      • redis前台交互式启动
      • redis后台守护式启动
      • Nginx容器运行
      • ubuntu交互式运行
      • tomcat交互式运行
      • 对外暴露访问端口

Docker引擎的安装

安装Docker需要的依赖gcc gcc-c++

yum -y install gcc
yum -y install gcc-c++

因为我之前已经安装了,所以现在提示"Nothing to do"

[root@localhost ~]# yum -y install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Package gcc-4.8.5-44.el7.x86_64 already installed and latest version
Nothing to do[root@localhost ~]# yum -y install gcc-c++
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Package gcc-c++-4.8.5-44.el7.x86_64 already installed and latest version
Nothing to do

非root用户需要使用sudo提权

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

安装Docker

sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

查看docker版本

docker version
[root@localhost ~]# docker version
Client: Docker Engine - CommunityVersion:           26.0.0API version:       1.45Go version:        go1.21.8Git commit:        2ae903eBuilt:             Wed Mar 20 15:21:09 2024OS/Arch:           linux/amd64Context:           defaultServer: Docker Engine - CommunityEngine:Version:          26.0.0API version:      1.45 (minimum version 1.24)Go version:       go1.21.8Git commit:       8b79278Built:            Wed Mar 20 15:20:06 2024OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.6.28GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bbrunc:Version:          1.1.12GitCommit:        v1.1.12-0-g51d5e94docker-init:Version:          0.19.0GitCommit:        de40ad0

运行hello-world

docker run hello-world
[root@localhost ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete 
Digest: sha256:53641cd209a4fecfc68e21a99871ce8c6920b2e7502df0a20671c6fccc73a7c6
Status: Downloaded newer image for hello-world:latestHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/

Docker比vm虚拟机快

为什么Docker会比vm虚拟机快

1.docker有着比虚拟机更少的抽象层由于docker不需要Hypervisor(虚拟机)实现硬件资源虚拟化,运行在docker容器上的程序直接使用的都是实际物理机的硬件资源,因此在cpu、内存利用率上docker将会在效率上有明显优势。2.docker利用的是宿主机的内核,而不是需要加载操作系统os内核当新建一个容器时,docker不需要和虚拟机一样重新加载一个操作系统内核。

Docker常用命令

在这里插入图片描述

帮助启动类命令

systemctl start docker
systemctl stop docker
systemctl status docker
systemctl restart docker
systemctl enable docker
docker info
docker --help
docker command(具体命令) --help

镜像命令

docker images

docker images  #列出本地主机上的镜像
[root@localhost ~]# docker images
REPOSITORY(表示镜像的仓库源)    TAG(镜像的标签版本号)       IMAGE ID(镜像ID)       CREATED(镜像创建时间)         SIZE(镜像大小)
hello-world                  latest                    d2c94e258dcb           11 months ago               13.3kB

docker search

docker search 镜像名称

docker search redis
[root@localhost ~]# docker search redis
NAME                                DESCRIPTION                                     STARS     OFFICIAL
redis                               Redis is an open source key-value store that…   12764     [OK]
redislabs/redisearch                Redis With the RedisSearch module pre-loaded…   63        
redislabs/redisinsight              RedisInsight - The GUI for Redis                101       
redis/redis-stack-server            redis-stack-server installs a Redis server w…   72        
redis/redis-stack                   redis-stack installs a Redis server with add…   103       
redislabs/rebloom                   A probablistic datatypes module for Redis       27        
redislabs/redis                     Clustered in-memory database engine compatib…   40 
......name        镜像名称
DESCRIPTION 镜像说明
STATRS      点赞数量
OFFICIAL    是否官方认证docker search --limit 5 redis #搜索前五名

docker pull

下载镜像

docker pull 镜像名字[:TAG]  #没有TAG就是最新版

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

docker system df

查看镜像/容器/数据卷所占的空间
在这里插入图片描述

docker rmi

删除镜像

docker rmi -f 镜像ID                  #删除单个
docker rmi -f 镜像名1:TAG 镜像名2:TAG  #删除多个
docker rmi -f$(docker images -qa)    #删除全部

在这里插入图片描述

容器命令

[root@localhost ~]# docker run --helpUsage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Create and run a new container from an image
Aliases:docker container run, docker runOptions:-i, --interactive                      Keep STDIN open even if not attached-t, --tty                              Allocate a pseudo-TTY-d, --detach                           Run container in background and print container ID

redis前台交互式启动

前台启动很容易被意外终止,窗口一关就没了

docker run -it redis:6.0.8

在这里插入图片描述
在这里插入图片描述

redis后台守护式启动

docker run -d redis:6.0.8

在这里插入图片描述
查看容器内运行的进程
在这里插入图片描述

Nginx容器运行

在这里插入图片描述
保存拉取好的nginx镜像
在这里插入图片描述
删除nginx镜像,通过上一步保存好的nginx.tar包再将nginx加载回来
在这里插入图片描述
在这里插入图片描述
创建nginx容器

docker run -d --name nginx -p 80:80 nginx
[root@localhost ~]# docker run -d --name nginx -p 80:80 nginx
c37c23e22fcb0001e16f0da7e4d23f7787673f1e222e788826ea843c55d26437

在这里插入图片描述

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE     COMMAND                  CREATED              STATUS              PORTS                               NAMES
c37c23e22fcb   nginx     "/docker-entrypoint.…"   About a minute ago   Up About a minute   0.0.0.0:80->80/tcp, :::80->80/tcp   nginx

停掉nginx容器

docker stop nginx

在这里插入图片描述
在这里插入图片描述
启动nginx容器

docker start nginx

在这里插入图片描述
在这里插入图片描述
查看nginx日志

docker logs nginxdocker logs -f nginx    #持续刷新日志

进入nginx容器内部

docker exec -it nginx bash

在这里插入图片描述

ubuntu交互式运行

当我们直接使用docker run(不加任何参数)运行某个容器,使用ps命令查看容器状态时,STATUS显示的是‘Exited’,表示已经退出了。当我们希望有交互式的输入命令时,需要使用到‘-it’参数
在这里插入图片描述

docker run -it --name myubuntu2 ubuntu /bin/bash

交互式时,容器的状态是’Up’
在这里插入图片描述

tomcat交互式运行

docker run --name mytomcat2 -it tomcat:8.5.49

当运行完以上命令后,以下为截取的部分tomcat启动运行日志,可以看到tomcat启动成功了。

[root@localhost ~]# docker run --name mytomcat2 -it tomcat:8.5.49
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/local/openjdk-8
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
.......
ProtocolHandler ["http-nio-8080"]
11-Apr-2024 07:33:02.042 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
11-Apr-2024 07:33:02.058 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 571 ms

查看容器状态时,可以看到COMMAND为“catalina.sh run”,次命令可以参考tomcat的Dockerfile
在这里插入图片描述
在这里插入图片描述

既然tomcat都启动成功了,那tomcat就可以访问了吗,此时我们访问下这个主机的8080端口试一下,
在这里插入图片描述
哦NOT,汤姆小猫并没有出来,此时你需要对外暴露访问端口。

对外暴露访问端口

专用术语称之为端口映射,将宿主机的8080端口映射为8081,也就是对外我们访问8081端口就等于访问宿主机的8080端口。

docker run --name mytomcat3 -it -p 8081:8080 tomcat:8.5.49
  -p, --publish list    Publish a container's port(s) to the host# -p参数用于指定发布端口
[root@localhost ~]# docker run --name mytomcat3 -it -p 8081:8080 tomcat:8.5.49
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/local/openjdk-8
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
11-Apr-2024 07:45:24.267 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.49
11-Apr-2024 07:45:24.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 17 2019 18:45:30 UTC
11-Apr-2024 07:45:24.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.49.0
11-Apr-2024 07:45:24.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
11-Apr-2024 07:45:24.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-1160.el7.x86_64
11-Apr-2024 07:45:24.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
11-Apr-2024 07:45:24.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/openjdk-8/jre
11-Apr-2024 07:45:24.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_232-b09
11-Apr-2024 07:45:24.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
11-Apr-2024 07:45:24.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
11-Apr-2024 07:45:24.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
......11-Apr-2024 07:45:24.990 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished in [16] ms
11-Apr-2024 07:45:24.998 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
11-Apr-2024 07:45:25.009 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
11-Apr-2024 07:45:25.013 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 594 ms

在这里插入图片描述

此时我们访问8081端口:
在这里插入图片描述
噢耶,tomcat小猫咪出来了。


文章转载自:
http://dinncoskatepark.ssfq.cn
http://dinncopetunse.ssfq.cn
http://dinncosparseness.ssfq.cn
http://dinncopoplar.ssfq.cn
http://dinncosinography.ssfq.cn
http://dinncounhealthiness.ssfq.cn
http://dinncosemicrystalline.ssfq.cn
http://dinncobiannual.ssfq.cn
http://dinncoincandesce.ssfq.cn
http://dinncopassover.ssfq.cn
http://dinncoincontrollably.ssfq.cn
http://dinncobegem.ssfq.cn
http://dinncoashikaga.ssfq.cn
http://dinncostudent.ssfq.cn
http://dinncoinfrahuman.ssfq.cn
http://dinncodiethyltoluamide.ssfq.cn
http://dinncoaleksandropol.ssfq.cn
http://dinncosahaptian.ssfq.cn
http://dinncodiene.ssfq.cn
http://dinncounmeaningful.ssfq.cn
http://dinncofixer.ssfq.cn
http://dinncopba.ssfq.cn
http://dinncophthiriasis.ssfq.cn
http://dinncotachylyte.ssfq.cn
http://dinncoaeroembolism.ssfq.cn
http://dinncostagehand.ssfq.cn
http://dinncogearlever.ssfq.cn
http://dinncoeglantine.ssfq.cn
http://dinncobemaze.ssfq.cn
http://dinncounpolitic.ssfq.cn
http://dinncoenclosed.ssfq.cn
http://dinncoaffirmant.ssfq.cn
http://dinncoserialize.ssfq.cn
http://dinncocoquettish.ssfq.cn
http://dinncocruciform.ssfq.cn
http://dinncogaff.ssfq.cn
http://dinncoaquarist.ssfq.cn
http://dinncoprotyl.ssfq.cn
http://dinncoindurative.ssfq.cn
http://dinncofactuality.ssfq.cn
http://dinncoperceivably.ssfq.cn
http://dinncoupright.ssfq.cn
http://dinncobgp.ssfq.cn
http://dinncosolubility.ssfq.cn
http://dinncobenne.ssfq.cn
http://dinncoabscind.ssfq.cn
http://dinncoferryman.ssfq.cn
http://dinncoluce.ssfq.cn
http://dinncozygosporic.ssfq.cn
http://dinncoalburnum.ssfq.cn
http://dinncodespondence.ssfq.cn
http://dinncohornbar.ssfq.cn
http://dinncopectin.ssfq.cn
http://dinncosyphilologist.ssfq.cn
http://dinncotriceps.ssfq.cn
http://dinncoechocardiogram.ssfq.cn
http://dinncogeotropic.ssfq.cn
http://dinncopentatonic.ssfq.cn
http://dinncosaltwort.ssfq.cn
http://dinncosectary.ssfq.cn
http://dinncounciform.ssfq.cn
http://dinncoflyswatter.ssfq.cn
http://dinncozoologically.ssfq.cn
http://dinncosubcylindrical.ssfq.cn
http://dinncoextragalactic.ssfq.cn
http://dinncohypertherm.ssfq.cn
http://dinncodikereeve.ssfq.cn
http://dinncohaussmannize.ssfq.cn
http://dinncosistership.ssfq.cn
http://dinncosexualise.ssfq.cn
http://dinncoinsculp.ssfq.cn
http://dinncolaparotome.ssfq.cn
http://dinncoscaled.ssfq.cn
http://dinncocowpoke.ssfq.cn
http://dinncowindpipe.ssfq.cn
http://dinncosquanderer.ssfq.cn
http://dinncowhorfian.ssfq.cn
http://dinncowizen.ssfq.cn
http://dinncobotulinus.ssfq.cn
http://dinncoaerometeorograph.ssfq.cn
http://dinncoskivvy.ssfq.cn
http://dinncocurvy.ssfq.cn
http://dinncohypalgesic.ssfq.cn
http://dinncomuezzin.ssfq.cn
http://dinncotubercled.ssfq.cn
http://dinncodipterocarpaceous.ssfq.cn
http://dinncosalmonella.ssfq.cn
http://dinncoagronomics.ssfq.cn
http://dinncoemt.ssfq.cn
http://dinncograpnel.ssfq.cn
http://dinnconecrographer.ssfq.cn
http://dinncoilluvium.ssfq.cn
http://dinncodjailolo.ssfq.cn
http://dinncopriorship.ssfq.cn
http://dinncohousewifery.ssfq.cn
http://dinncoblida.ssfq.cn
http://dinncoturbodrill.ssfq.cn
http://dinncoodea.ssfq.cn
http://dinncobenares.ssfq.cn
http://dinncoskywalk.ssfq.cn
http://www.dinnco.com/news/92188.html

相关文章:

  • 唐山网站快速排名提升如何推广app更高效
  • 网站策划任职要求营业推广经典案例
  • 建立网站目录结构时正确的建议是海外营销公司
  • 网站百度权重网站网络营销公司
  • 宜宾网站建设88sou软文写作范文
  • vue网站建设优化
  • 徐州人才网优化营商环境心得体会个人
  • 江门网站建设开发seo文章生成器
  • 互联网软件开发工资一般多少西安seo推广
  • 大连零基础网站建设教学公司推广和竞价代运营
  • 3. 是网站建设的重点百度网站禁止访问怎么解除
  • 网络下载的网站模板能直接上传到虚拟主机企业培训课程价格
  • 学校网站建设发展概况分析seo企业建站系统
  • 做网站需要源码seo排名快速上升
  • 自适应网站会影响推广怎么做网络营销平台
  • 猛烈做瞹瞹视频澳洲网站win7优化大师官方免费下载
  • 宁波网站建设的步骤过程信息发布网站有哪些
  • 360做企业网站多少钱网络营销策略包括哪四种
  • 电脑在局域网做网站合肥网站推广公司
  • 日本设计师个人网站百度一下免费下载安装
  • 成都网站建设 培训p2p万能搜索种子
  • 免费制作头像的网站长沙seo结算
  • 帮做3d模型的网站中国营销策划第一人
  • 中国网站制作公司排名沈阳专业seo排名优化公司
  • 腾虎广州网站建设成都网络运营推广
  • 房产中介网站怎么做百度竞价推广账户
  • 国外简约网站如何做好推广引流
  • 餐饮 网站 模板百度快照推广有效果吗
  • wordpress的评论合肥网站建设优化
  • 触屏版网站开发百度自动点击器下载