ням установить tomcat8 CentOS 6 - PullRequest
0 голосов
/ 28 февраля 2019

Я хочу остаться в экосистеме yum, чтобы мне было легче перехватывать обновления, поэтому мне хотелось установить более позднюю версию tomcat на мою машину CentOS 6.9.Но, конечно же, CentOS 6.9 не предоставляет вам tomcat, кроме tomcat6 через yum:

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

Так какой самый безопасный способ позволить мне установить любую версию tomcat, которую я хочу, используя yum?Нужно ли добавлять еще один репозиторий для каждого случая?

3/4/2019 обновление, основанное на совете от пользователя 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

Ответы [ 2 ]

0 голосов
/ 03 марта 2019

Репо epel-тестирование предоставляет Tomcat-7.0.92 .

$yum info tomcat
Installed Packages
Name        : tomcat
Arch        : noarch
Version     : 7.0.92
Release     : 1.el6
Size        : 314 k
Repo        : installed
From repo   : epel-testing
Summary     : Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
URL         : http://tomcat.apache.org/
License     : ASL 2.0

Проверьте /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 как обычно для любых новых версий.

0 голосов
/ 28 февраля 2019

для меня рекомендуемый и самый безопасный способ - установить нужную версию вручную.Нам пришлось столкнуться с тем же самым в производственной среде (rhel6 и rhel7), и мы приняли решение загрузить официальную версию tomcat и упаковать ее как rpm со всем необходимым (создание пользователей и групп tomcat и сценарий инициализации systemd), вы делаете это один рази это все.Я могу выслать вам пример сценария сборки rpm и файл спецификации.

...