yum安装tomcat8 CentOS 6

yum安装tomcat8 CentOS 6,tomcat,centos6,yum,Tomcat,Centos6,Yum,我希望保留在百胜生态系统中,以便更轻松地捕获更新,因此希望在我的CentOS 6.9计算机上安装更高版本的tomcat。当然,CentOS 6.9不会通过yum提供tomcat6以外的任何tomcat: sudo yum search tomcat Loaded plugins: auto-update-debuginfo, fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile

我希望保留在百胜生态系统中,以便更轻松地捕获更新,因此希望在我的CentOS 6.9计算机上安装更高版本的tomcat。当然,CentOS 6.9不会通过yum提供tomcat6以外的任何tomcat:

sudo yum search tomcat
Loaded plugins: auto-update-debuginfo, fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.jaleco.com
 * epel: reflector.westga.edu
 * epel-debuginfo: reflector.westga.edu
 * extras: mirror.jaleco.com
 * rpmforge: mirror.lstn.net
 * rpmfusion-free-updates: mirror.math.princeton.edu
 * rpmfusion-free-updates-debuginfo: mirror.math.princeton.edu
 * rpmfusion-nonfree-updates: mirror.math.princeton.edu
 * rpmfusion-nonfree-updates-debuginfo: mirror.math.princeton.edu
 * updates: ftp.osuosl.org
===================================================== N/S Matched: tomcat =====================================================
apache-tomcat-apis.noarch : Tomcat Servlet and JSP APIs
jakarta-commons-collections-tomcat5.noarch : Jakarta Commons Collection dependency for Tomcat5
jakarta-commons-dbcp-tomcat5.noarch : DBCP dependency for Tomcat5
jakarta-commons-pool-tomcat5.i686 : Pool dependency for Tomcat5
jglobus-ssl-proxies-tomcat.noarch : Globus Java - SSL and proxy certificate support for Tomcat
tomcat-admin-webapps.noarch : The host-manager and manager web applications for Apache Tomcat
tomcat-docs-webapp.noarch : The docs web application for Apache Tomcat
tomcat-javadoc.noarch : Javadoc generated documentation for Apache Tomcat
tomcat-jsp-2.2-api.noarch : Apache Tomcat JSP API implementation classes
tomcat-jsvc.noarch : Apache jsvc wrapper for Apache Tomcat as separate service
tomcat-lib.noarch : Libraries needed to run the Tomcat Web container
tomcat-native.i686 : Tomcat native library
tomcat-native-debuginfo.i686 : Debug information for package tomcat-native
tomcat-servlet-3.0-api.noarch : Apache Tomcat Servlet API implementation classes
tomcat-webapps.noarch : The ROOT and examples web applications for Apache Tomcat
tomcat6-admin-webapps.noarch : The host-manager and manager web applications for Apache Tomcat
tomcat6-debuginfo.i686 : Debug information for package tomcat6
tomcat6-docs-webapp.noarch : The docs web application for Apache Tomcat
tomcat6-javadoc.noarch : Javadoc generated documentation for Apache Tomcat
tomcat6-jsp-2.1-api.noarch : Apache Tomcat JSP API implementation classes
tomcat6-lib.noarch : Libraries needed to run the Tomcat Web container
tomcat6-log4j.noarch : Log4J support for Apache Tomcat
tomcat6-servlet-2.5-api.noarch : Apache Tomcat Servlet API implementation classes
tomcat6-webapps.noarch : The ROOT and examples web applications for Apache Tomcat
tomcatjss.noarch : JSSE implementation using JSS for Tomcat
tomcat.noarch : Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
tomcat-el-2.2-api.noarch : Expression Language v1.0 API
tomcat6.noarch : Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API
tomcat6-el-2.1-api.noarch : Expression Language v1.0 API
那么,使用yum安装任何tomcat版本最安全的方法是什么呢?我是否需要按机会添加另一个存储库

2019年3月4日更新,基于用户3788685的建议:

sudo yum-config-manager --enable epel-testing
Loaded plugins: auto-update-debuginfo, fastestmirror, refresh-packagekit
=============================================================================================== repo: epel-testing ===============================================================================================
[epel-testing]
bandwidth = 0
base_persistdir = /var/lib/yum/repos/i386/6
baseurl = 
cache = 0
cachedir = /var/cache/yum/i386/6/epel-testing
cost = 1000
enabled = 1
enablegroups = True
exclude = 
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/i386/6/epel-testing/gpgcadir
gpgcakey = 
gpgcheck = True
gpgdir = /var/lib/yum/repos/i386/6/epel-testing/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
hdrdir = /var/cache/yum/i386/6/epel-testing/headers
http_caching = all
includepkgs = 
keepalive = True
mdpolicy = group:primary
mediaid = 
metadata_expire = 21600
metalink = 
mirrorlist = https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=i386
mirrorlist_expire = 86400
name = Extra Packages for Enterprise Linux 6 - Testing - i386
old_base_cache_dir = 
password = 
persistdir = /var/lib/yum/repos/i386/6/epel-testing
pkgdir = /var/cache/yum/i386/6/epel-testing/packages
proxy = False
proxy_dict = 
proxy_password = 
proxy_username = 
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert = 
sslclientcert = 
sslclientkey = 
sslverify = True
throttle = 0
timeout = 30.0
username = 


sudo yum search tomcat        
Loaded plugins: auto-update-debuginfo, fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.metrocast.net
 * epel: archive.linux.duke.edu
 * epel-debuginfo: archive.linux.duke.edu
 * epel-testing: archive.linux.duke.edu
 * epel-testing-debuginfo: archive.linux.duke.edu
 * extras: ftp.osuosl.org
 * rpmforge: mirror.lstn.net
 * rpmfusion-free-updates: mirror.math.princeton.edu
 * rpmfusion-free-updates-debuginfo: mirror.math.princeton.edu
 * rpmfusion-nonfree-updates: mirror.math.princeton.edu
 * rpmfusion-nonfree-updates-debuginfo: mirror.math.princeton.edu
 * updates: mirror.steadfastnet.com
============================================================================================== N/S Matched: tomcat ===============================================================================================
apache-tomcat-apis.noarch : Tomcat Servlet and JSP APIs
jakarta-commons-collections-tomcat5.noarch : Jakarta Commons Collection dependency for Tomcat5
jakarta-commons-dbcp-tomcat5.noarch : DBCP dependency for Tomcat5
jakarta-commons-pool-tomcat5.i686 : Pool dependency for Tomcat5
jglobus-ssl-proxies-tomcat.noarch : Globus Java - SSL and proxy certificate support for Tomcat
tomcat-admin-webapps.noarch : The host-manager and manager web applications for Apache Tomcat
tomcat-docs-webapp.noarch : The docs web application for Apache Tomcat
tomcat-javadoc.noarch : Javadoc generated documentation for Apache Tomcat
tomcat-jsp-2.2-api.noarch : Apache Tomcat JSP API implementation classes
tomcat-jsvc.noarch : Apache jsvc wrapper for Apache Tomcat as separate service
tomcat-lib.noarch : Libraries needed to run the Tomcat Web container
tomcat-native.i686 : Tomcat native library
tomcat-native-debuginfo.i686 : Debug information for package tomcat-native
tomcat-servlet-3.0-api.noarch : Apache Tomcat Servlet API implementation classes
tomcat-webapps.noarch : The ROOT and examples web applications for Apache Tomcat
tomcat6-admin-webapps.noarch : The host-manager and manager web applications for Apache Tomcat
tomcat6-debuginfo.i686 : Debug information for package tomcat6
tomcat6-docs-webapp.noarch : The docs web application for Apache Tomcat
tomcat6-javadoc.noarch : Javadoc generated documentation for Apache Tomcat
tomcat6-jsp-2.1-api.noarch : Apache Tomcat JSP API implementation classes
tomcat6-lib.noarch : Libraries needed to run the Tomcat Web container
tomcat6-log4j.noarch : Log4J support for Apache Tomcat
tomcat6-servlet-2.5-api.noarch : Apache Tomcat Servlet API implementation classes
tomcat6-webapps.noarch : The ROOT and examples web applications for Apache Tomcat
tomcatjss.noarch : JSSE implementation using JSS for Tomcat
tomcat.noarch : Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
tomcat-el-2.2-api.noarch : Expression Language v1.0 API
tomcat6.noarch : Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API
tomcat6-el-2.1-api.noarch : Expression Language v1.0 API

  Name and summary matches only, use "search all" for everything.

more /etc/yum.repos.d/epel-testing.repo 
[epel-testing]
name=Extra Packages for Enterprise Linux 6 - Testing - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-testing-debuginfo]
name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-testing-source]
name=Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/testing/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

对我来说,推荐的最安全的方法是手动安装所需的版本。我们必须在生产中处理同样的事情(rhel6和rhel7),我们决定下载正式的tomcat版本,并将其打包为rpm,包括所有必要的(tomcat用户和组创建以及systemd init脚本),您只需执行一次即可。我可以向您发送一个rpm构建脚本和规范文件示例。

repo提供

签入
/etc/yum.repos.d/epel.repo
并查看是否有该文件,如果确实在内部检查/set
enabled=1
,则应该能够安装

如果您缺少该文件,您需要的部分如下

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-testing]
name=Extra Packages for Enterprise Linux 6 - Testing - $basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

在那里,您可以对任何新版本执行正常的
yum update

你说的“最安全的方式”是什么意思?一种不会伤害其他任何东西的方式。我不明白CentOS为什么要通过Yum限制tomcat。这是我困惑的一部分。不起作用,我正在用这些新信息更新我的原始帖子请参见“立即编辑”(在提交评论后立即被调用),但没有其他版本的tomcat出现。@user3329922通过
yum info tomcat
仔细检查版本号,它应该是7。据我所知,在任何回购协议中都没有Tomcat8,Tomcat7的名字也不像Tomcat6那样,我明白了,谢谢。不确定这是否能满足我的需要(不确定Tomcat7是否足够晚),但您肯定回答了我的问题,所以选择您的答案。
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-testing]
name=Extra Packages for Enterprise Linux 6 - Testing - $basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6