腾讯云CentOS升级JDK1.8

1.查看CentOS自带JDK是否已安装。

yum list installed |grep java。

2.卸载原有JDK

yum -y remove java-1.5.0-gcj.i686

3.查看yum库中的JDK包

yum -y list java* 

4.安装JDK

yum -y install java-1.8.0-openjdk.i686
[[email protected]_238_215_centos ~]# yum list installed |grep java
java-1.5.0-gcj.i686   1.5.0.0-29.1.el6    @os
[[email protected]_238_215_centos ~]# yum -y remove java-1.5.0-gcj.i686
Loaded plugins: fastestmirror, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.5.0-gcj.i686 0:1.5.0.0-29.1.el6 will be erased
--> Processing Dependency: java-gcj-compat >= 1.0.70 for package: sinjdoc-0.5-9.1.el6.i686
--> Processing Dependency: java-gcj-compat >= 1.0.70 for package: sinjdoc-0.5-9.1.el6.i686
--> Running transaction check
---> Package sinjdoc.i686 0:0.5-9.1.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================
 Package                       Arch                Version                         Repository          Size
============================================================================================================
Removing:
 java-1.5.0-gcj                i686                1.5.0.0-29.1.el6                @os                140 k
Removing for dependencies:
 sinjdoc                       i686                0.5-9.1.el6                     @os                2.0 M

Transaction Summary
============================================================================================================
Remove        2 Package(s)

Installed size: 2.1 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Erasing    : sinjdoc-0.5-9.1.el6.i686                                                                 1/2
  Erasing    : java-1.5.0-gcj-1.5.0.0-29.1.el6.i686                                                     2/2
  Verifying  : java-1.5.0-gcj-1.5.0.0-29.1.el6.i686                                                     1/2
  Verifying  : sinjdoc-0.5-9.1.el6.i686                                                                 2/2 

Removed:
  java-1.5.0-gcj.i686 0:1.5.0.0-29.1.el6                                                                    

Dependency Removed:
  sinjdoc.i686 0:0.5-9.1.el6                                                                                

Complete!
[[email protected]_238_215_centos ~]# yum list installed |grep java
[[email protected]_238_215_centos ~]# java -version
-bash: /usr/bin/java: No such file or directory
[[email protected]_238_215_centos ~]# yum -y list java*
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Available Packages
java-1.5.0-gcj.i686                                      1.5.0.0-29.1.el6                            os
java-1.5.0-gcj-devel.i686                                1.5.0.0-29.1.el6                            os
java-1.5.0-gcj-javadoc.i686                              1.5.0.0-29.1.el6                            os
java-1.5.0-gcj-src.i686                                  1.5.0.0-29.1.el6                            os
java-1.6.0-openjdk.i686                                  1:1.6.0.41-1.13.13.1.el6_8                  os
java-1.6.0-openjdk-demo.i686                             1:1.6.0.41-1.13.13.1.el6_8                  os
java-1.6.0-openjdk-devel.i686                            1:1.6.0.41-1.13.13.1.el6_8                  os
java-1.6.0-openjdk-javadoc.i686                          1:1.6.0.41-1.13.13.1.el6_8                  os
java-1.6.0-openjdk-src.i686                              1:1.6.0.41-1.13.13.1.el6_8                  os
java-1.7.0-openjdk.i686                                  1:1.7.0.131-2.6.9.0.el6_8                   os
java-1.7.0-openjdk-demo.i686                             1:1.7.0.131-2.6.9.0.el6_8                   os
java-1.7.0-openjdk-devel.i686                            1:1.7.0.131-2.6.9.0.el6_8                   os
java-1.7.0-openjdk-javadoc.noarch                        1:1.7.0.131-2.6.9.0.el6_8                   os
java-1.7.0-openjdk-src.i686                              1:1.7.0.131-2.6.9.0.el6_8                   os
java-1.8.0-openjdk.i686                                  1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-debug.i686                            1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-demo.i686                             1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-demo-debug.i686                       1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-devel.i686                            1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-devel-debug.i686                      1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-headless.i686                         1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-headless-debug.i686                   1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-javadoc.noarch                        1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-javadoc-debug.noarch                  1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-src.i686                              1:1.8.0.131-0.b11.el6_9                     updates
java-1.8.0-openjdk-src-debug.i686                        1:1.8.0.131-0.b11.el6_9                     updates
java-clearsilver.i686                                    0.10.5-16.el6                               epel
java-dirq.noarch                                         1.4-1.el6                                   epel
java-dirq-javadoc.noarch                                 1.4-1.el6                                   epel
java-service-wrapper.i686                                3.2.5-23.el6                                epel
java-service-wrapper-javadoc.noarch                      3.2.5-23.el6                                epel
java-sleep.noarch                                        2.1-6.el6                                   epel
java-sleep-javadoc.noarch                                2.1-6.el6                                   epel
java_cup.i686                                            1:0.10k-5.el6                               os
java_cup-javadoc.i686                                    1:0.10k-5.el6                               os
java_cup-manual.i686                                     1:0.10k-5.el6                               os
javacc.i686                                              4.1-0.5.el6                                 os
javacc-demo.i686                                         4.1-0.5.el6                                 os
javacc-manual.i686                                       4.1-0.5.el6                                 os
javassist.noarch                                         3.9.0-6.el6                                 os
javassist-javadoc.noarch                                 3.9.0-6.el6                                 os
javastroke.i686                                          0.5.1-33.el6                                epel
javatar.noarch                                           2.5-5.el6                                   epel
javatar-javadoc.noarch                                   2.5-5.el6                                   epel
[[email protected]_238_215_centos ~]# yum -y install java-1.8.0-openjdk.i686
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk.i686 1:1.8.0.131-0.b11.el6_9 will be installed
--> Processing Dependency: java-1.8.0-openjdk-headless = 1:1.8.0.131-0.b11.el6_9 for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: libjvm.so(SUNWprivate_1.1) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: libjli.so(SUNWprivate_1.1) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: libjli.so for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: libjava.so(SUNWprivate_1.1) for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: libjava.so for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: libgif.so.4 for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: libawt.so for package: 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686
--> Running transaction check
---> Package giflib.i686 0:4.1.6-3.1.el6 will be installed
---> Package java-1.8.0-openjdk-headless.i686 1:1.8.0.131-0.b11.el6_9 will be installed
--> Processing Dependency: tzdata-java >= 2014f-1 for package: 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.i686
--> Processing Dependency: nss >= 3.28.4 for package: 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.i686
---> Package xorg-x11-fonts-Type1.noarch 0:7.2-11.el6 will be installed
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-11.el6.noarch
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-11.el6.noarch
--> Processing Dependency: mkfontdir for package: xorg-x11-fonts-Type1-7.2-11.el6.noarch
--> Processing Dependency: mkfontdir for package: xorg-x11-fonts-Type1-7.2-11.el6.noarch
--> Running transaction check
---> Package nss.i686 0:3.15.1-15.el6 will be updated
--> Processing Dependency: nss = 3.15.1-15.el6 for package: nss-sysinit-3.15.1-15.el6.i686
--> Processing Dependency: nss(x86-32) = 3.15.1-15.el6 for package: nss-tools-3.15.1-15.el6.i686
---> Package nss.i686 0:3.28.4-1.el6_9 will be an update
--> Processing Dependency: nss-util >= 3.28.3 for package: nss-3.28.4-1.el6_9.i686
--> Processing Dependency: nss-softokn(x86-32) >= 3.14.3-22 for package: nss-3.28.4-1.el6_9.i686
--> Processing Dependency: nspr >= 4.13.0 for package: nss-3.28.4-1.el6_9.i686
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.24) for package: nss-3.28.4-1.el6_9.i686
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.21) for package: nss-3.28.4-1.el6_9.i686
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.17.1) for package: nss-3.28.4-1.el6_9.i686
---> Package ttmkfdir.i686 0:3.0.9-32.1.el6 will be installed
---> Package tzdata-java.noarch 0:2017b-1.el6 will be installed
---> Package xorg-x11-font-utils.i686 1:7.2-11.el6 will be installed
--> Processing Dependency: libfontenc.so.1 for package: 1:xorg-x11-font-utils-7.2-11.el6.i686
--> Processing Dependency: libXfont.so.1 for package: 1:xorg-x11-font-utils-7.2-11.el6.i686
--> Running transaction check
---> Package libXfont.i686 0:1.5.1-2.el6 will be installed
---> Package libfontenc.i686 0:1.1.2-3.el6 will be installed
---> Package nspr.i686 0:4.10.0-1.el6 will be updated
---> Package nspr.i686 0:4.13.1-1.el6 will be an update
---> Package nss-softokn.i686 0:3.14.3-9.el6 will be updated
---> Package nss-softokn.i686 0:3.14.3-23.3.el6_8 will be an update
--> Processing Dependency: nss-softokn-freebl(x86-32) >= 3.14.3-23.3.el6_8 for package: nss-softokn-3.14.3-23.3.el6_8.i686
---> Package nss-sysinit.i686 0:3.15.1-15.el6 will be updated
---> Package nss-sysinit.i686 0:3.28.4-1.el6_9 will be an update
---> Package nss-tools.i686 0:3.15.1-15.el6 will be updated
---> Package nss-tools.i686 0:3.28.4-1.el6_9 will be an update
---> Package nss-util.i686 0:3.15.1-3.el6 will be updated
---> Package nss-util.i686 0:3.28.4-1.el6_9 will be an update
--> Running transaction check
---> Package nss-softokn-freebl.i686 0:3.14.3-9.el6 will be updated
---> Package nss-softokn-freebl.i686 0:3.14.3-23.3.el6_8 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================
 Package                             Arch           Version                           Repository       Size
============================================================================================================
Installing:
 java-1.8.0-openjdk                  i686           1:1.8.0.131-0.b11.el6_9           updates         187 k
Installing for dependencies:
 giflib                              i686           4.1.6-3.1.el6                     os               37 k
 java-1.8.0-openjdk-headless         i686           1:1.8.0.131-0.b11.el6_9           updates          31 M
 libXfont                            i686           1.5.1-2.el6                       os              153 k
 libfontenc                          i686           1.1.2-3.el6                       os               29 k
 ttmkfdir                            i686           3.0.9-32.1.el6                    os               41 k
 tzdata-java                         noarch         2017b-1.el6                       updates         183 k
 xorg-x11-font-utils                 i686           1:7.2-11.el6                      os               73 k
 xorg-x11-fonts-Type1                noarch         7.2-11.el6                        os              520 k
Updating for dependencies:
 nspr                                i686           4.13.1-1.el6                      os              116 k
 nss                                 i686           3.28.4-1.el6_9                    updates         883 k
 nss-softokn                         i686           3.14.3-23.3.el6_8                 os              270 k
 nss-softokn-freebl                  i686           3.14.3-23.3.el6_8                 os              157 k
 nss-sysinit                         i686           3.28.4-1.el6_9                    updates          51 k
 nss-tools                           i686           3.28.4-1.el6_9                    updates         453 k
 nss-util                            i686           3.28.4-1.el6_9                    updates          68 k

Transaction Summary
============================================================================================================
Install       9 Package(s)
Upgrade       7 Package(s)

Total download size: 34 M
Downloading Packages:
(1/16): giflib-4.1.6-3.1.el6.i686.rpm                                                |  37 kB     00:00
(2/16): java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686.rpm                            | 187 kB     00:00
(3/16): java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.i686.rpm                   |  31 MB     00:01
(4/16): libXfont-1.5.1-2.el6.i686.rpm                                                | 153 kB     00:00
(5/16): libfontenc-1.1.2-3.el6.i686.rpm                                              |  29 kB     00:00
(6/16): nspr-4.13.1-1.el6.i686.rpm                                                   | 116 kB     00:00
(7/16): nss-3.28.4-1.el6_9.i686.rpm                                                  | 883 kB     00:00
(8/16): nss-softokn-3.14.3-23.3.el6_8.i686.rpm                                       | 270 kB     00:00
(9/16): nss-softokn-freebl-3.14.3-23.3.el6_8.i686.rpm                                | 157 kB     00:00
(10/16): nss-sysinit-3.28.4-1.el6_9.i686.rpm                                         |  51 kB     00:00
(11/16): nss-tools-3.28.4-1.el6_9.i686.rpm                                           | 453 kB     00:00
(12/16): nss-util-3.28.4-1.el6_9.i686.rpm                                            |  68 kB     00:00
(13/16): ttmkfdir-3.0.9-32.1.el6.i686.rpm                                            |  41 kB     00:00
(14/16): tzdata-java-2017b-1.el6.noarch.rpm                                          | 183 kB     00:00
(15/16): xorg-x11-font-utils-7.2-11.el6.i686.rpm                                     |  73 kB     00:00
(16/16): xorg-x11-fonts-Type1-7.2-11.el6.noarch.rpm                                  | 520 kB     00:00
------------------------------------------------------------------------------------------------------------
Total                                                                        24 MB/s |  34 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : nspr-4.13.1-1.el6.i686                                                                  1/23
  Updating   : nss-util-3.28.4-1.el6_9.i686                                                            2/23
  Updating   : nss-softokn-freebl-3.14.3-23.3.el6_8.i686                                               3/23
  Updating   : nss-softokn-3.14.3-23.3.el6_8.i686                                                      4/23
  Updating   : nss-3.28.4-1.el6_9.i686                                                                 5/23
  Updating   : nss-sysinit-3.28.4-1.el6_9.i686                                                         6/23
  Installing : libfontenc-1.1.2-3.el6.i686                                                             7/23
  Installing : tzdata-java-2017b-1.el6.noarch                                                          8/23
  Installing : 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.i686                                9/23
  Installing : libXfont-1.5.1-2.el6.i686                                                              10/23
  Installing : 1:xorg-x11-font-utils-7.2-11.el6.i686                                                  11/23
  Installing : giflib-4.1.6-3.1.el6.i686                                                              12/23
  Installing : ttmkfdir-3.0.9-32.1.el6.i686                                                           13/23
  Installing : xorg-x11-fonts-Type1-7.2-11.el6.noarch                                                 14/23
  Installing : 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686                                        15/23
  Updating   : nss-tools-3.28.4-1.el6_9.i686                                                          16/23
  Cleanup    : nss-tools-3.15.1-15.el6.i686                                                           17/23
  Cleanup    : nss-3.15.1-15.el6.i686                                                                 18/23
  Cleanup    : nss-sysinit-3.15.1-15.el6.i686                                                         19/23
  Cleanup    : nss-softokn-3.14.3-9.el6.i686                                                          20/23
  Cleanup    : nss-util-3.15.1-3.el6.i686                                                             21/23
  Cleanup    : nspr-4.10.0-1.el6.i686                                                                 22/23
  Cleanup    : nss-softokn-freebl-3.14.3-9.el6.i686                                                   23/23
  Verifying  : libfontenc-1.1.2-3.el6.i686                                                             1/23
  Verifying  : nss-sysinit-3.28.4-1.el6_9.i686                                                         2/23
  Verifying  : nss-3.28.4-1.el6_9.i686                                                                 3/23
  Verifying  : nss-softokn-freebl-3.14.3-23.3.el6_8.i686                                               4/23
  Verifying  : tzdata-java-2017b-1.el6.noarch                                                          5/23
  Verifying  : libXfont-1.5.1-2.el6.i686                                                               6/23
  Verifying  : nss-tools-3.28.4-1.el6_9.i686                                                           7/23
  Verifying  : nss-util-3.28.4-1.el6_9.i686                                                            8/23
  Verifying  : 1:xorg-x11-font-utils-7.2-11.el6.i686                                                   9/23
  Verifying  : 1:java-1.8.0-openjdk-headless-1.8.0.131-0.b11.el6_9.i686                               10/23
  Verifying  : ttmkfdir-3.0.9-32.1.el6.i686                                                           11/23
  Verifying  : nss-softokn-3.14.3-23.3.el6_8.i686                                                     12/23
  Verifying  : nspr-4.13.1-1.el6.i686                                                                 13/23
  Verifying  : giflib-4.1.6-3.1.el6.i686                                                              14/23
  Verifying  : 1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.i686                                        15/23
  Verifying  : xorg-x11-fonts-Type1-7.2-11.el6.noarch                                                 16/23
  Verifying  : nss-sysinit-3.15.1-15.el6.i686                                                         17/23
  Verifying  : nss-util-3.15.1-3.el6.i686                                                             18/23
  Verifying  : nspr-4.10.0-1.el6.i686                                                                 19/23
  Verifying  : nss-softokn-3.14.3-9.el6.i686                                                          20/23
  Verifying  : nss-softokn-freebl-3.14.3-9.el6.i686                                                   21/23
  Verifying  : nss-3.15.1-15.el6.i686                                                                 22/23
  Verifying  : nss-tools-3.15.1-15.el6.i686                                                           23/23 

Installed:
  java-1.8.0-openjdk.i686 1:1.8.0.131-0.b11.el6_9                                                           

Dependency Installed:
  giflib.i686 0:4.1.6-3.1.el6                 java-1.8.0-openjdk-headless.i686 1:1.8.0.131-0.b11.el6_9
  libXfont.i686 0:1.5.1-2.el6                 libfontenc.i686 0:1.1.2-3.el6
  ttmkfdir.i686 0:3.0.9-32.1.el6              tzdata-java.noarch 0:2017b-1.el6
  xorg-x11-font-utils.i686 1:7.2-11.el6       xorg-x11-fonts-Type1.noarch 0:7.2-11.el6                      

Dependency Updated:
  nspr.i686 0:4.13.1-1.el6                          nss.i686 0:3.28.4-1.el6_9
  nss-softokn.i686 0:3.14.3-23.3.el6_8              nss-softokn-freebl.i686 0:3.14.3-23.3.el6_8
  nss-sysinit.i686 0:3.28.4-1.el6_9                 nss-tools.i686 0:3.28.4-1.el6_9
  nss-util.i686 0:3.28.4-1.el6_9                   

Complete!
[[email protected]_238_215_centos ~]# java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b11)
OpenJDK Server VM (build 25.131-b11, mixed mode)
时间: 2024-10-13 07:52:05

腾讯云CentOS升级JDK1.8的相关文章

腾讯云centos服务器修改/etc/hosts,使其重启不失效

腾讯云centos服务器修改/etc/hosts,使其重启不失效 使用腾讯云的服务器,我修改了/etc/hosts文件,然后操作了一下重启操作后,一打开/etc/hosts文件便如以下: ## template:jinja {# This file (/etc/cloud/templates/hosts.tmpl) is only utilized if enabled in cloud-config. Specifically, in order to enable it you need t

腾讯云CentOS系统配置apache和tomcat

本文使用yum软件包管理工具基于CentOS7.2版本配置apache和tom. 云服务器选购完毕后,安装Xshell软件,输入用户名密码即可远程登陆登录(centos用户名默认是root). 1,下载安装java(这里使用的是yum软件包管理器,他会自动配置好环境变量) yum –y install java 2,安装tomcat和appache yum –y install tomcat tomcat-admin-webapps tomcat-docs-webapp tomcat-javad

腾讯云CentOS 7.6 64位之docker的镜像和容器练习

本文使用的Docker是社区版,版本是19.03.2,这个版本是本文写时的最新版. 首先总结下容器和镜像的概念: 容器是用镜像创建的,一个镜像可以创建多个容器. 一般来说,一个容器就是一个应用,把应用在容器中运行称之为应用容器化. 删除镜像的时候,如果由这个镜像创建的容器还存在则会删除失败. 容器和镜像的关系就是:容器是镜像的实例化的可运行实体. 以下是我的练习内容: 1. 拉取镜像  docker pull centos:latest  或者按照版本拉取:docker pull centos:

腾讯云CentOS搭建JavaWeb运行环境(简易版)

腾讯云上购买的服务器快到期了,最后用来记录下怎么搭建JavaWeb运行环境. 在腾讯云上购买云主机后,进入云主机-控制台,会看到以下界面 点击更多,重装系统 弹出以下界面,选择服务市场-->基础镜像,选择你所需要的环境(如果购买的时候已选好环境可以略过..),我这里选的是Java多版本环境(Tomcat JDK MySql). 选完后输入密码,然后点击开始重装 系统开始重装,等待系统重装完毕. 重装成功后,登录云主机去查看配置的环境,这里推荐两个软件 WinSCP PuTTY 用WinSCP跟云

腾讯云CentOS服务器安装StrongSwan与Juniper防火墙搭建Ipsec***

StrongSwan简介它也完全支持新的IKEv2协议的Linux 2.6内核.结合IKEv1和IKEv2模式与大多数其他基于IPSec的×××产品.重点项目是strongSwan强认证机制,使用X.509公 开密钥证书和可选的安全储存私钥对智能卡通过一个标准化的PKCS # 11接口.一个特点是使用的X.509属性证书实现了先进的访问控制方案的基础上组的成员 配置目的:实现线下IDC与腾讯云内网打通,腾讯云端未购买(×××网关.云市场第三方×××产品等等)site-to-site 上菜:***

腾讯云CentOS 7.2 64位安装Mongodb

一.安装步骤: 1.配置MongoDB的yum源: 创建yum源文件:vim  /etc/yum.repos.d/mongodb-org-3.4.repo 2.mongodb-org-3.4.repo文件添加的内容: [mongodb-org-3.4] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/ gpgcheck=1 enabled=

ssh长时间连接腾讯云centos服务器

 通过ssh连接腾讯云服务器时,稍微隔一段时间未操作连接便会断开,要解决这个问题需要对配置文件做一些调整.参照网上的介绍,尝试了两种方案,经过测试第二种方案对我的机器没有效果(也许对其它系统的机器有效),第一种方案可行.1.编辑/etc/ssh/sshd_config文件取消上图红框中两个参数的注释,并按上图调整参数. ClientAliveInterval:服务端每隔几秒向客户端发送一个心跳数据 ClientAliveCountMax:客户端多少次没有响应,服务端自动断掉连接 参数调整后,断开

腾讯云CentOS 7.6 64位安装docker

本文使用的Docker是社区版,版本是19.03.2,这个版本是本文写时的最新版. 昨天新购了腾讯云的Linux服务器,所以记录下第一次安装Docker.直接用WebShell登录linux在浏览器执行命令即可. 1. 安装deltarpm  yum provides '*/applydeltarpm'  yum install deltarpm 2. 安装docker  wget -qO- https://get.docker.com/ | sh 3. 添加用户到Docker组中(your-u

腾讯云Centos搭建web运行环境

需要上传或者下载,需要使用rz和sz命令.如果linux上没有这两个命令工具,则需要先安装.可以使用yum安装.运行命令yum install lrzsz. rz是上传,sz是下载. 在win上下载好jdk和tomcat 把jdk放在/usr/java,tomcat放在/usr tar -xvf jdk1.8.0----  //解压 然后编辑vim ./etc/profile添加环境变量 解压好tomcat到指定的目录之后,开启 安装好之后,开始打开端口: 防火墙服务: 到这里,应该可以看到访问