当前位置: 首页 > 编程日记 > 正文

Docker - 在CentOS7.5中升级Docker版本

1 - 检查当前版本

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# 
[root@localhost ~]# cat /etc/system-release
CentOS Linux release 7.5.1804 (Core) 
[root@localhost ~]# 
[root@localhost ~]# docker version
Client:Version:         1.13.1API version:     1.26Package version: docker-1.13.1-102.git7f2769b.el7.centos.x86_64Go version:      go1.10.3Git commit:      7f2769b/1.13.1Built:           Mon Aug  5 15:09:42 2019OS/Arch:         linux/amd64Server:Version:         1.13.1API version:     1.26 (minimum version 1.12)Package version: docker-1.13.1-102.git7f2769b.el7.centos.x86_64Go version:      go1.10.3Git commit:      7f2769b/1.13.1Built:           Mon Aug  5 15:09:42 2019OS/Arch:         linux/amd64Experimental:    false
[root@localhost ~]# 

2 - 卸载旧版本

[root@localhost ~]# rpm -qa |grep -i docker
docker-1.13.1-102.git7f2769b.el7.centos.x86_64
docker-client-1.13.1-102.git7f2769b.el7.centos.x86_64
docker-common-1.13.1-102.git7f2769b.el7.centos.x86_64
[root@localhost ~]# 
[root@localhost ~]# yum remove docker \
> docker-client \
> docker-client-latest \
> docker-common \
> docker-latest \
> docker-latest-logrotate \
> docker-logrotate \
> docker-engine
Loaded plugins: fastestmirror, langpacks
No Match for argument: docker-client-latest
No Match for argument: docker-latest
No Match for argument: docker-latest-logrotate
No Match for argument: docker-logrotate
No Match for argument: docker-engine
Resolving Dependencies
--> Running transaction check
---> Package docker.x86_64 2:1.13.1-102.git7f2769b.el7.centos will be erased
---> Package docker-client.x86_64 2:1.13.1-102.git7f2769b.el7.centos will be erased
---> Package docker-common.x86_64 2:1.13.1-102.git7f2769b.el7.centos will be erased
--> Finished Dependency ResolutionDependencies Resolved=============================================================================================Package            Arch        Version                                   Repository    Size
=============================================================================================
Removing:docker             x86_64      2:1.13.1-102.git7f2769b.el7.centos        @extras       65 Mdocker-client      x86_64      2:1.13.1-102.git7f2769b.el7.centos        @extras       13 Mdocker-common      x86_64      2:1.13.1-102.git7f2769b.el7.centos        @extras      4.4 kTransaction Summary
=============================================================================================
Remove  3 PackagesInstalled size: 77 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionErasing    : 2:docker-1.13.1-102.git7f2769b.el7.centos.x86_64                          1/3 
warning: /etc/sysconfig/docker-storage saved as /etc/sysconfig/docker-storage.rpmsave
warning: /etc/docker/daemon.json saved as /etc/docker/daemon.json.rpmsaveErasing    : 2:docker-client-1.13.1-102.git7f2769b.el7.centos.x86_64                   2/3 Erasing    : 2:docker-common-1.13.1-102.git7f2769b.el7.centos.x86_64                   3/3 
warning: /etc/sysconfig/docker saved as /etc/sysconfig/docker.rpmsaveVerifying  : 2:docker-client-1.13.1-102.git7f2769b.el7.centos.x86_64                   1/3 Verifying  : 2:docker-1.13.1-102.git7f2769b.el7.centos.x86_64                          2/3 Verifying  : 2:docker-common-1.13.1-102.git7f2769b.el7.centos.x86_64                   3/3 Removed:docker.x86_64 2:1.13.1-102.git7f2769b.el7.centos                                           docker-client.x86_64 2:1.13.1-102.git7f2769b.el7.centos                                    docker-common.x86_64 2:1.13.1-102.git7f2769b.el7.centos                                    Complete!
[root@localhost ~]# 

3 - 设置仓库

3.1 安装必要的包

[root@localhost ~]# yum install -y yum-utils \
> device-mapper-persistent-data \
> lvm2
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: centos.mirror.far.fi* epel: epel.besthosting.ua* extras: centos.mirror.far.fi* updates: centos.mirror.far.fi
Package device-mapper-persistent-data-0.7.3-3.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package lvm2.x86_64 7:2.02.177-4.el7 will be updated
---> Package lvm2.x86_64 7:2.02.180-10.el7_6.8 will be an update
--> Processing Dependency: lvm2-libs = 7:2.02.180-10.el7_6.8 for package: 7:lvm2-2.02.180-10.el7_6.8.x86_64
---> Package yum-utils.noarch 0:1.1.31-45.el7 will be updated
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be an update
--> Running transaction check
---> Package lvm2-libs.x86_64 7:2.02.177-4.el7 will be updated
---> Package lvm2-libs.x86_64 7:2.02.180-10.el7_6.8 will be an update
--> Processing Dependency: device-mapper-event = 7:1.02.149-10.el7_6.8 for package: 7:lvm2-libs-2.02.180-10.el7_6.8.x86_64
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.146-4.el7 will be updated
---> Package device-mapper-event.x86_64 7:1.02.149-10.el7_6.8 will be an update
--> Processing Dependency: device-mapper-event-libs = 7:1.02.149-10.el7_6.8 for package: 7:device-mapper-event-1.02.149-10.el7_6.8.x86_64
--> Processing Dependency: device-mapper = 7:1.02.149-10.el7_6.8 for package: 7:device-mapper-event-1.02.149-10.el7_6.8.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.146-4.el7 will be updated
--> Processing Dependency: device-mapper = 7:1.02.146-4.el7 for package: 7:device-mapper-libs-1.02.146-4.el7.x86_64
---> Package device-mapper.x86_64 7:1.02.149-10.el7_6.8 will be an update
---> Package device-mapper-event-libs.x86_64 7:1.02.146-4.el7 will be updated
---> Package device-mapper-event-libs.x86_64 7:1.02.149-10.el7_6.8 will be an update
--> Running transaction check
---> Package device-mapper-libs.x86_64 7:1.02.146-4.el7 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.149-10.el7_6.8 will be an update
--> Finished Dependency ResolutionDependencies Resolved=============================================================================================Package                        Arch         Version                     Repository     Size
=============================================================================================
Updating:lvm2                           x86_64       7:2.02.180-10.el7_6.8       updates       1.3 Myum-utils                      noarch       1.1.31-50.el7               base          121 k
Updating for dependencies:device-mapper                  x86_64       7:1.02.149-10.el7_6.8       updates       293 kdevice-mapper-event            x86_64       7:1.02.149-10.el7_6.8       updates       189 kdevice-mapper-event-libs       x86_64       7:1.02.149-10.el7_6.8       updates       188 kdevice-mapper-libs             x86_64       7:1.02.149-10.el7_6.8       updates       321 klvm2-libs                      x86_64       7:2.02.180-10.el7_6.8       updates       1.1 MTransaction Summary
=============================================================================================
Upgrade  2 Packages (+5 Dependent packages)Total size: 3.5 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionUpdating   : 7:device-mapper-1.02.149-10.el7_6.8.x86_64                               1/14 Updating   : 7:device-mapper-libs-1.02.149-10.el7_6.8.x86_64                          2/14 Updating   : 7:device-mapper-event-libs-1.02.149-10.el7_6.8.x86_64                    3/14 Updating   : 7:device-mapper-event-1.02.149-10.el7_6.8.x86_64                         4/14 Updating   : 7:lvm2-libs-2.02.180-10.el7_6.8.x86_64                                   5/14 Updating   : 7:lvm2-2.02.180-10.el7_6.8.x86_64                                        6/14 Updating   : yum-utils-1.1.31-50.el7.noarch                                           7/14 Cleanup    : yum-utils-1.1.31-45.el7.noarch                                           8/14 Cleanup    : 7:lvm2-2.02.177-4.el7.x86_64                                             9/14 Cleanup    : 7:lvm2-libs-2.02.177-4.el7.x86_64                                       10/14 Cleanup    : 7:device-mapper-event-1.02.146-4.el7.x86_64                             11/14 Cleanup    : 7:device-mapper-event-libs-1.02.146-4.el7.x86_64                        12/14 Cleanup    : 7:device-mapper-1.02.146-4.el7.x86_64                                   13/14 Cleanup    : 7:device-mapper-libs-1.02.146-4.el7.x86_64                              14/14 Verifying  : 7:device-mapper-event-1.02.149-10.el7_6.8.x86_64                         1/14 Verifying  : 7:device-mapper-libs-1.02.149-10.el7_6.8.x86_64                          2/14 Verifying  : yum-utils-1.1.31-50.el7.noarch                                           3/14 Verifying  : 7:device-mapper-event-libs-1.02.149-10.el7_6.8.x86_64                    4/14 Verifying  : 7:lvm2-2.02.180-10.el7_6.8.x86_64                                        5/14 Verifying  : 7:lvm2-libs-2.02.180-10.el7_6.8.x86_64                                   6/14 Verifying  : 7:device-mapper-1.02.149-10.el7_6.8.x86_64                               7/14 Verifying  : 7:device-mapper-1.02.146-4.el7.x86_64                                    8/14 Verifying  : 7:device-mapper-event-1.02.146-4.el7.x86_64                              9/14 Verifying  : yum-utils-1.1.31-45.el7.noarch                                          10/14 Verifying  : 7:device-mapper-event-libs-1.02.146-4.el7.x86_64                        11/14 Verifying  : 7:lvm2-libs-2.02.177-4.el7.x86_64                                       12/14 Verifying  : 7:lvm2-2.02.177-4.el7.x86_64                                            13/14 Verifying  : 7:device-mapper-libs-1.02.146-4.el7.x86_64                              14/14 Updated:lvm2.x86_64 7:2.02.180-10.el7_6.8             yum-utils.noarch 0:1.1.31-50.el7            Dependency Updated:device-mapper.x86_64 7:1.02.149-10.el7_6.8                                                 device-mapper-event.x86_64 7:1.02.149-10.el7_6.8                                           device-mapper-event-libs.x86_64 7:1.02.149-10.el7_6.8                                      device-mapper-libs.x86_64 7:1.02.149-10.el7_6.8                                            lvm2-libs.x86_64 7:2.02.180-10.el7_6.8                                                     Complete!
[root@localhost ~]# 

3.2 设置稳定的仓库

[root@localhost ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: fastestmirror, langpacks
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@localhost ~]# 

4 - 安装与配置Docker Engine - Community

4.1 安装最新版本

[root@localhost ~]# yum install docker-ce docker-ce-cli containerd.io
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: centos.mirror.far.fi* epel: epel.besthosting.ua* extras: centos.mirror.far.fi* updates: centos.mirror.far.fi
docker-ce-stable                                                      | 3.5 kB  00:00:00     
(1/2): docker-ce-stable/x86_64/updateinfo                             |   55 B  00:00:01     
(2/2): docker-ce-stable/x86_64/primary_db                             |  32 kB  00:00:01     
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.6-3.3.el7 will be installed
---> Package docker-ce.x86_64 3:19.03.1-3.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.1-3.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved=============================================================================================Package               Arch           Version                 Repository                Size
=============================================================================================
Installing:containerd.io         x86_64         1.2.6-3.3.el7           docker-ce-stable          26 Mdocker-ce             x86_64         3:19.03.1-3.el7         docker-ce-stable          24 Mdocker-ce-cli         x86_64         1:19.03.1-3.el7         docker-ce-stable          39 MTransaction Summary
=============================================================================================
Install  3 PackagesTotal download size: 90 M
Installed size: 368 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-19.03.1-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-19.03.1-3.el7.x86_64.rpm is not installed
(1/3): docker-ce-19.03.1-3.el7.x86_64.rpm                             |  24 MB  00:00:34     
(2/3): containerd.io-1.2.6-3.3.el7.x86_64.rpm                         |  26 MB  00:00:39     
(3/3): docker-ce-cli-19.03.1-3.el7.x86_64.rpm                         |  39 MB  00:00:55     
---------------------------------------------------------------------------------------------
Total                                                        1.0 MB/s |  90 MB  00:01:29     
Retrieving key from https://download.docker.com/linux/centos/gpg
Importing GPG key 0x621E9F35:Userid     : "Docker Release (CE rpm) <docker@docker.com>"Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35From       : https://download.docker.com/linux/centos/gpg
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : containerd.io-1.2.6-3.3.el7.x86_64                                        1/3 Installing : 1:docker-ce-cli-19.03.1-3.el7.x86_64                                      2/3 Installing : 3:docker-ce-19.03.1-3.el7.x86_64                                          3/3 Verifying  : 1:docker-ce-cli-19.03.1-3.el7.x86_64                                      1/3 Verifying  : 3:docker-ce-19.03.1-3.el7.x86_64                                          2/3 Verifying  : containerd.io-1.2.6-3.3.el7.x86_64                                        3/3 Installed:containerd.io.x86_64 0:1.2.6-3.3.el7            docker-ce.x86_64 3:19.03.1-3.el7           docker-ce-cli.x86_64 1:19.03.1-3.el7           Complete!
[root@localhost ~]# 

4.2 设置代理

根据网络实际状态来选择是否设置代理。

[root@localhost ~]# mkdir -p /etc/systemd/system/docker.service.d
[root@localhost ~]# vim /etc/systemd/system/docker.service.d/http-proxy.conf
[root@localhost ~]# cat /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://10.144.1.10:8080/"
Environment="HTTPS_PROXY=http://10.144.1.10:8080/"
[root@localhost ~]# 

4.3 设置国内镜像

通过修改daemon配置文件/etc/docker/daemon.json来使用加速器

[root@localhost ~]# sudo mkdir -p /etc/docker
[root@localhost ~]# sudo tee /etc/docker/daemon.json <<-'EOF'
> {
>   "registry-mirrors": ["https://t5t8q6wn.mirror.aliyuncs.com"]
> }
> EOF
{"registry-mirrors": ["https://t5t8q6wn.mirror.aliyuncs.com"]
}

4.4 启动Docker

[root@localhost ~]# systemctl start docker
[root@localhost ~]# 
[root@localhost ~]# docker version
Client: Docker Engine - CommunityVersion:           19.03.1API version:       1.40Go version:        go1.12.5Git commit:        74b1e89Built:             Thu Jul 25 21:21:07 2019OS/Arch:           linux/amd64Experimental:      falseServer: Docker Engine - CommunityEngine:Version:          19.03.1API version:      1.40 (minimum version 1.12)Go version:       go1.12.5Git commit:       74b1e89Built:            Thu Jul 25 21:19:36 2019OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.2.6GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fbrunc:Version:          1.0.0-rc8GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87fdocker-init:Version:          0.18.0GitCommit:        fec3683
[root@localhost ~]# 

4.4 验证是否安装成功

[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost ~]# 
[root@localhost ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete 
Digest: sha256:6540fc08ee6e6b7b63468dc3317e3303aae178cb8a45ed3123180328bcc1d20f
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/[root@localhost ~]# 
[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              fce289e99eb9        7 months ago        1.84kB
[root@localhost ~]# 
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                      PORTS               NAMES
466a14bbfa5b        hello-world         "/hello"            11 seconds ago      Exited (0) 10 seconds ago                       gallant_herschel
[root@localhost ~]# 

5 - 问题处理

5.1 问题现象-1

[root@localhost ~]# yum-config-manager \
> --add-repo \
> https://download.docker.com/linux/centos/docker-ce.repoFile "/bin/yum-config-manager", line 135except yum.Errors.RepoError, e:^
SyntaxError: invalid syntax
[root@localhost ~]# 

问题原因与处理方法:

  • 因前期将系统自带python2升级到Python3,导致/bin/yum-config-manager#!/usr/bin/python语句无法生效。
  • 修改为对应内容即可。
[root@localhost ~]# head -n 1 /bin/yum-config-manager
#!/usr/bin/python -tt
[root@localhost ~]# 
[root@localhost ~]# python --version
Python 3.7.4
[root@localhost ~]# python2 --version
Python 2.7.5
[root@localhost ~]# ll /usr/bin/ |grep -i python
-rwxr-xr-x.   1 root root       11312 Apr 27  2018 abrt-action-analyze-python
lrwxrwxrwx    1 root root          29 Jul 29 10:14 pip -> /usr/local/python3.7/bin/pip3
-rwxr-xr-x.   1 root root        7280 Apr 13  2018 pmpython
lrwxrwxrwx    1 root root          32 Jul 29 10:14 python -> /usr/local/python3.7/bin/python3
lrwxrwxrwx.   1 root root           9 Nov 16  2018 python2 -> python2.7
-rwxr-xr-x.   1 root root        7216 Apr 11  2018 python2.7
lrwxrwxrwx    1 root root          32 Jul 29 10:14 python3 -> /usr/local/python3.7/bin/pytho3
[root@localhost ~]# 
[root@localhost ~]# vim /bin/yum-config-manager 
[root@localhost ~]# head -n 1 /bin/yum-config-manager
#!/usr/bin/python2 -tt
[root@localhost ~]# 

5.2 问题现象-2

[root@localhost ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
[root@localhost ~]# 

问题原因与处理方法:

  • 因网络问题导致无法获得镜像文件,通过设置代理来规避此问题。
  • 参考信息:https://github.com/docker/for-win/issues/1534
[root@localhost ~]# mkdir -p /etc/systemd/system/docker.service.d
[root@localhost ~]# vim /etc/systemd/system/docker.service.d/http-proxy.conf
[root@localhost ~]# cat /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://10.144.1.10:8080/"
Environment="HTTPS_PROXY=http://10.144.1.10:8080/"
[root@localhost ~]# 
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl restart docker

5.3 问题现象-3

[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              16.04               2a697363a870        3 months ago        119MB
ubuntu              18.04               7698f282e524        3 months ago        69.9MB
hello-world         latest              fce289e99eb9        7 months ago        1.84kB
[root@localhost ~]# 
[root@localhost ~]# docker rmi -f 2a697363a870
Error: No such image: 2a697363a870
[root@localhost ~]# 
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS  

问题原因与处理方法:

  • 推测有残留的镜像信息,删除对应文件即可。
  • 参考信息: https://stackoverflow.com/questions/46381888/docker-images-shows-image-docker-rmi-says-no-such-image-or-reference-doe
[root@localhost ~]# systemctl stop docker
[root@localhost ~]# rm -rf /var/lib/docker
[root@localhost ~]# systemctl start docker
[root@localhost ~]# 
[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
[root@localhost ~]# 

6 - 参考信息

  • 在CentOS7中安装Docker
  • https://docs.docker.com/
  • https://docs.docker.com/get-started/
  • https://docs.docker.com/install/
  • https://docs.docker.com/install/linux/docker-ce/centos/

转载于:https://www.cnblogs.com/anliven/p/11366170.html

相关文章:

编码的细微区别

在编程学习的深入后&#xff0c;不可避免的会遇到ANSI、GB2312、UTF8的编码问题&#xff0c;如果不彻底了解他们的区别&#xff0c;都最终会造成一个问题--乱码&#xff01;想要更好的了解编码&#xff0c;我们首先应该了解编码的历史演变。 在继续学习之前先明白一下转化关系吧…

Axel之 -axel_do剖析

axel_do主体部分&#xff0c;尝试从多个连接select方式去读取数据&#xff0c;如果读取失败或者连接超时就重新连接。 下面是代码分析. //下载的主循环void axel_do( axel_t *axel ){ fd_set fds[1]; int hifd, i; long long int remaining,size; …

win10键盘全部没反应_Win10笔记本键盘失灵怎么办 Win10键盘失灵解决方法【详解】...

相信现在已经有很多朋友都已经成功升级了win10正式版&#xff0c;不过最近有用户反映&#xff0c;升级Win10笔记本键盘失灵怎么办?下面迅维小编整理了一些常见的原因与解决办法&#xff0c;供大家参考尝试解决。Win10笔记本键盘失灵的原因一1、没有开启小键盘很多笔记本都带有…

基于链接的排序算法

基于链接的排序算法似乎已广泛应用到各种商业seohua.net”> 搜索引擎中。为了让设计出来的网站能够在各种搜索引擎中获得较高排名&#xff0c;设计者们应该知道这些算法的原理。Google排名的成功意味着PageRank算 法值得特别的关注。PageRank算法是少数几个公开的排序算法之…

Spring Boot配置全局异常捕获

1 SpringBoot配置全局的异常捕获 项目的说明 配置thymeleaf作为视图模板ExceptionController.java模拟测试用MyAjaxExceptionHandler.java捕获到异常以ajax形式返回MyExceptionHandler.java捕获到异常以页面形式返回ajaxerror.html这个是测试返回ajax异常的页面error.html以页面…

一步一步Asp.Net MVC系列_权限管理总结(附MVC权限管理系统源码)

TZHSWEET&#xff1a;请大家多多反馈问题&#xff0c;我已经在修改中了&#xff0c;已更新版本。。。。。。 如果大家遇到数据库附加问题&#xff0c;EF连接字符串问题&#xff0c;请自行配置,如果有bug反馈可以私聊&#xff0c;我的qq&#xff1a;409180955。 项目已经发布到G…

电脑壁纸励志_励志壁纸 | 要乖 要长大 要努力 要不负众望

全世界只有不到1%的人关注了壁纸阿姨你真是个特别的人2020.4.17要乖 要长大 要努力 要不负众望励志壁纸全文字数&#xff1a;236阅读时间&#xff1a;1分钟图片数目&#xff1a;361“我不懂什么年少轻狂&#xff0c;我只知道胜者为王。”点击图片 长按保存高清原图♥2“愿你以渺…

ubuntu自定义命令

ubuntu中通过alias可以自定义快捷命令 在.bashrc中加入alias指令可以定义快捷命令&#xff0c;以下为我常用快捷命令 alias watwatch -n 1 nvidia-smi alias gohomecd /home/B/gaoye alias cdcodecd /home/B/gaoye/code 转载于:https://www.cnblogs.com/yeran/p/11367988.html

OSPF LSA 类型

路由器LSA&#xff1a;每台路由器都创建1类LSA&#xff0c;用于向连接的每个区域描述自己&#xff0c;在每台路由器中&#xff0c;每个区域的LSDB都包含一个1类LSA&#xff0c;它指出了当前路由器的RID和所有接口的IP地址。1类LSA还用于描述末节网络。网络LSA&#xff1a;每个中…

配件商城项目总结

---恢复内容开始--- 一、在首页导航栏上有一个自动摇晃的手机图标 &#xff0c;而我一开始设置的是悬浮摇晃 由于将悬浮设置在图片外面的容器&#xff08;a&#xff09;上导致效果没出来&#xff0c;而且动画效果一直没出来。 解决方法&#xff1a;将悬浮改成自动播放&#xff…

006本周总结报告

这周基本学完了java的基础中的基础&#xff0c;还不会灵活的应用&#xff0c;相关概念仍然有些模糊。为此&#xff0c;自己将自己学到的知识点做了下系统的复习&#xff0c;并作了相关的笔记。这周编程的大部分时间主要用于小学期PTA的编程作业中&#xff08;用C语言&#xff0…

excel小写转大写公式_【Excel函数贴】五个技巧性函数小套路

来吧 来吧 来吧 一起舞蹈 什么烦恼可以将我打扰…………1&#xff0c;字母大小写。一个做外贸的朋友问&#xff0c;Excel有没有函数可以把英文从小写变大写&#xff1f;他可能碰到蛮多洋人的人名或者货名需要大小写转换的。小写转大写&#xff1a;UPPER("excel")大写…

DevExpress A field with the name '' was not found on the selected data source.

绑定控件时发现的错误&#xff0c;找了很久终于找到原因了&#xff0c;可能也是大家没注意的地方&#xff0c;希望能给大家带来一些帮助。 自己在找的时候发现&#xff0c;明明是有的。 结果应该是这样的 上面定义实体类的字段写法有缺陷 这样再重新编译运行后就不会出错了。转…

刚申请了Blog,首贴庆祝!

刚申请了Blog&#xff0c;首贴庆祝&#xff01;转载于:https://www.cnblogs.com/ele-eye/archive/2011/11/17/2252654.html

ReentrantLock实现原理分析

ReentrantLock主要利用CASCLH队列来实现。它支持公平锁和非公平锁&#xff0c;两者的实现类似。 CAS&#xff1a;Compare and Swap&#xff0c;比较并交换。CAS有3个操作数&#xff1a;内存值V、预期值A、要修改的新值B。当且仅当预期值A和内存值V相同时&#xff0c;将内存值V修…

python编码

Unicode字符集中收录110多万个字符集合。UTF-8&#xff08;8-bit Unicode Transformation Format&#xff09;&#xff0c;是一种针对 Unicode 的可变长度字符编码方式。使用一到四个字节来编码 Unicode 字符 在计算机内存中统一使用Unicode编码&#xff0c;当需要保存到硬盘或…

MySQL性能测试工具 mysqlslap

先看参数介绍 FormatOption FileDescriptionIntroduced--auto-generate-sqlauto-generate-sqlGenerate SQL statements automatically when they are not supplied in files or using command options --auto-generate-sql-add-autoincrementauto-generate-sql-add-autoincreme…

atlas单机模式代码_用代码玩太无聊,这样玩海盗游戏《ATLAS》单机模式才是正确玩法...

在各大单机游戏中&#xff0c;存在很多的代码给玩家使用&#xff0c;利用这些代码&#xff0c;玩家就能和开了挂似得快速通关。这让不少玩家沉迷于代码的世界而无心享受游戏的乐趣&#xff0c;因此在游戏界中经常有代码毁了一款游戏的说法。这点放在最近才上线的海盗冒险生存游…

iSCSI软件套件 介绍

http://blog.csdn.net/do2jiang/article/details/5062586 iSCSI&#xff08;Internet SCSI&#xff09;是2003年IETF&#xff08;InternetEngineering Task Force&#xff0c;互联网工程任务组&#xff09;制订的一项标准&#xff0c;这种指令集合可以实现在IP网络上运行SCSI协…

【Computer Vision】 复现分割网络(1)——SegNet

目录 Tags: ComputerVision编译数据处理训练结果ReferenceTags: ComputerVision 编译 src/caffe/layers/contrastive_loss_layer.cpp:56:30: error: no matching function for call to ‘max(double, float)’ Dtype dist std::max(margin - sqrt(dist_sq_.cpu_data()[i]), Dt…

kotlin + springboot 整合redis,Redis工具类编写及单元测试

参考自&#xff1a; https://www.cnblogs.com/zeng1994/p/03303c805731afc9aa9c60dbbd32a323.html 1、maven依赖 <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0" xmlns:xsi"http://…

:before和::before的区别

在一次项目中&#xff0c;有一次要用到::selection伪元素&#xff0c;然后开发同学问我&#xff0c;CSS中一个冒号和两个冒号有神马区别&#xff1f; 这好像真的是个问题&#xff0c;或许很多前端同学对此都有疑惑&#xff0c;查了些资料&#xff0c;证实了下两个符号的区别&am…

python下载大文件mp4_python合并大量ts文件成mp4格式(ps:上限是450,亲测)

原博文 2018-08-22 17:34 − 1 import os 2 #exec_str rcopy /b ts/c9645620628078.tsts/c9645620628079.ts ts/1.ts 3 #os.system(exec_str) 4 f open(index.m3u8, r, encod...08595 相关推荐 2019-12-19 14:27 − ts readonly name "xxx"; updateValueAndValidi…

提高网站页面收录的几个方法 返回列表 发新帖回复

首先是清楚网站总体有多少页面。 可以用xenu扫描出所有的页面。 1.html地图 网页数量不是太多&#xff0c;可以用网站地图来增加收录&#xff0c;分成几个地图页面。 2.随机文章模块 在不影响用户体验的情况下&#xff0c;在栏目中增加随机文章模块&#xff0c;增加链接曝光度&…

JSP+Servlet+JavaBean

JSP相当于在HTML页面中加上Java代码&#xff0c;一般在<body>标签中放入主要代码。 在JSP里用<%...%>把Java代码包含起来的。 Servlet的生命周期&#xff1a; ①被服务器实例化后&#xff0c;容器运行init方法。 ②当请求&#xff08;Request&#xff09;到达时&am…

logistic回归 如何_第七章:利用Python实现Logistic回归分类模型

免责声明&#xff1a;本文是通过网络收集并结合自身学习等途径合法获取&#xff0c;仅作为学习交流使用&#xff0c;其版权归出版社或者原创作者所有&#xff0c;并不对涉及的版权问题负责。若原创作者或者出版社认为侵权&#xff0c;请联系及时联系&#xff0c;我将立即删除文…

多年没有管理的技术博客了,即日起开始管理起技术博客

多年没有管理的技术博客了&#xff0c;即日起开始管理起技术博客&#xff0c;希望朋友们一如既往的支持转载于:https://www.cnblogs.com/flashicp/archive/2012/08/14/2639054.html

GNS3的默认Telnet程序改成secureCRT

编辑-首选项-一般里的“终端命令”改为C:\Users\ldy\AppData\Local\VanDyke Software\SecureCRT\SecureCRT.exe /t /telnet %h %p 前面是SecureCRT程序的目录&#xff0c; /t是指建立一个新标签 &#xff0c; /telnet的意思是走Telnet协议&#xff0c; %h是要telnet到的主机&am…

关于Vue实例的生命周期created和mounted的区别

关于作者 程序开发人员&#xff0c;不拘泥于语言与技术&#xff0c;目前主要从事PHP和前端开发&#xff0c;使用Laravel和VueJs&#xff0c;App端使用Apicloud混合式开发。合适和够用是最完美的追求。 个人网站&#xff1a;http://www.linganmin.cn 最近刚写了一个手机在线播放…

UVa 10112 - Myacm Triangles

UVa第一卷最后一题。 求内部不含点并且面积最大的三角形。 暴力。 代码如下&#xff1a; 1 #include<iostream>2 #include<cstdio>3 #include<cmath>4 #include<cstring>5 6 using namespace std;7 8 typedef struct node9 { 10 char ch; 11 i…