Using rpm to install linux kernel and i get some Failed dependencies which is newer than the yum list ones - centos

i am trying to upgrade kernel on centos and i use rpm to install the kernel.rpm,i got some errors
[datacenter#fonova-app-dc01 ~]$ sudo rpm -ivh kernel-
3.10.327.3.1.el7.x86_64.rpm
warning: kernel-3.10.0-327.3.1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature,
key ID 192a7d7d: NOKEY
error: Failed dependencies:
module-init-tools >= 3.16-2 is needed by kernel-3.10.0-
327.3.1.el7.x86_64
grubby >= 8.28-2 is needed by kernel-3.10.0-327.3.1.el7.x86_64
dracut >= 033-283 is needed by kernel-3.10.0-327.3.1.el7.x86_64
linux-firmware >= 20150904-43 is needed by kernel-3.10.0-
327.3.1.el7.x86_64
/usr/sbin/new-kernel-pkg is needed by kernel-3.10.0-327.3.1.el7.x86_64
[datacenter#fonova-app-dc01 ~]$ sudo yum update
Setting up Update Process
No Packages marked for Update
[datacenter#fonova-app-dc01 ~]$ sudo yum list module-init-tools
Installed Packages
module-init-tools.x86_64 3.9-26.el6 #base
[datacenter#fonova-app-dc01 ~]$
erro says that i need module-init-tools >= 3.16 but when i type
sudo yum update
sudo yum list module-init-tools
it says that hte newest version of module-init-tools is 3.9.
why will it be like this??

Related

yum couln't fund Mariadb Package on CentoOS 7

I tried to install MariaDB
$ sudo yum -y install MariaDB-server MariaDB-client
but yum return error
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.halifax.rwth-aachen.de
* epel: mirror.imt-systems.com
* extras: mirror.imt-systems.com
* remi-php72: mirror.23media.com
* remi-safe: mirror.23media.com
* updates: mirror.alpix.eu
No package MariaDB-server available.
No package MariaDB-client available.
Error: Nothing to do
I also add Mariadb repo in /etc/yum.repos.d/MariaDB.repo
MariaDB.repo is:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
http://yum.mariadb.org/5.5/centos6-amd64 in .repo is not match with CentOS 7 this instead:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos7-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
then:
sudo yum clean all
sudo yum update
sudo yum -y install MariaDB-server MariaDB-client
To match case-sensitive names of servers a.k.a. MariaDB-server not mariadb-server, You must have correct mariadb server repos added. Thus - You will also have latest Maria DB server versions (be careful with this, if not intended).
For Centos 7 version worth using official installation manual - much safer and easy: https://mariadb.com/resources/blog/installing-mariadb-10-on-centos-7-rhel-7/
$ cd ~
$ sudo yum install wget
$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
$ chmod +x mariadb_repo_setup
$ sudo ./mariadb_repo_setup
$
$ # Installation
$ sudo yum install MariaDB-server

check percona-xtrabackup installed?

I installed percona-xtrabackup on my OEL 7 but how to check whether its installed or not
[root#M1 ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
[root#M1 ~]# su - mysql
[mysql] sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
[mysql] sudo percona-release enable-only tools release
[mysql] sudo yum install percona-xtrabackup-80
[mysql] rpm -qa | grep xtrabackup
percona-xtrabackup-80-8.0.7-1.el7.x86_64
You can use this command to check whether it's installed or not
[root#tester ~]# yum list installed | grep xtrabackup
if it's installed it will display like this :
[root#tester ~]# yum list installed | grep xtrabackup
percona-xtrabackup-24.x86_64 2.4.18-1.el6 #percona-release-x86_64
or you can just run the software with argument like this :
[root#tester ~]# xtrabackup --version
if it's installed it will display content like this :
xtrabackup version 2.4.18 based on MySQL server 5.7.26 Linux (x86_64) (revision id: 29b4ca5)

Install php 7.2 specific version 7.2.0 instead last version from apt

I need install PHP 7.2.0. But the problem is, when i execute apt-get install the last version 7.2.17:
apt install php7.2-fpm php7.2 php7.2-common php7.2-gmp php7.2-curl php7.2-soap php7.2-bcmath php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip
Theres a easy way to install this specific version?
I'm running a vps with Ubuntu 16
apt-get didnt work for me. The solution was install PHP 7.2.0 from sources.
# curl -O -L https://github.com/php/php-src/archive/php-7.2.0.tar.gz
# tar -zxvf php-7.2.0.tar.gz
# cd php-src-php-7.2.0/
# ./configure --prefix=/usr/local/php --enable-fpm --disable-short-tags --with-openssl --with-pcre-regex --with-pcre-jit --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif
--with-gd --enable-intl --enable-mbstring --with-mysqli --enable-pcntl --with-pdo-mysql --enable-soap --enable-sockets --with-xmlrpc --enable-zip --with-webp-dir --with-jpeg-dir --with-png-dir --with-xls --enable-fpm
# make
# make install

MongoDB not able to uninstall(Ubuntu 14.04 and MongoDB 2.6.4.)

I am using Ubuntu 14.04 and MongoDB 2.6.4. I have installed packages - mongodb-org=2.6.4 mongodb-org-server=2.6.4 mongodb-org-shell=2.6.4 mongodb-org-mongos=2.6.4 mongodb-org-tools=2.6.4
I can see MongoDB directory on /opt/bitnami/mongodb path
I tried following command but not getting any packages
sudo dpkg -l | grep mongo
Can you please help me how to uninstall MongoDB ?
Use command :
sudo apt-get purge --auto-remove package-name
In your case :
sudo apt-get purge --auto-remove mongodb mongodb-clients mongodb-server mongodb-dev
It will purge required packages along with dependencies that are installed with mongodb.
--auto-remove option work similar to sudo apt-get autoremove
Run below command to search for installed mongo packages with dpkg :
sudo dpkg -l | grep mongo
If the above command still returns a list of packages with mongo in the name.
Then try using a wildcard search for the name:
sudo apt-get remove mongodb* --purge

How to programmatically install the latest epel-release rpm, without knowing its version number?

My first post here, but I googled around and cannot find a simple way to do this.
I have a program which automatically configures new CentOS Linux servers as they come online. As part of the process it installs the latest version of epel-release rpm.
The command I use looks like this:
$ rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm && \
yum clean all
This works great... until they change the rpm file to epel-release-6-8.noarch, then epel-release-6-9.noarch, and so on. They seem to update the version every 3-4 months. This is a problem, because if the repository updates the epel-release version number, my scripts will fail because it has no idea what that version should be.
I failed to find a link that might redirect to the latest epel rpm file, so I have no choice but to hard-code the version into my install scripts, and change it when they fail.
Anyone know a simple (non-hard-coded) way to download the latest epel rpm without knowing the version number? I'm hoping for a way that does not involve dong a curl on the repo file list and grep'ing the url, but curious what anyone might suggest?
The following script will do the trick:
cat <<EOM >/etc/yum.repos.d/epel-bootstrap.repo
[epel]
name=Bootstrap EPEL
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-\$releasever&arch=\$basearch
failovermethod=priority
enabled=0
gpgcheck=0
EOM
yum --enablerepo=epel -y install epel-release
rm -f /etc/yum.repos.d/epel-bootstrap.repo
It should work on RHEL/CentOS 5 and 6. I didn't test version 4.
The EPEL project has recently implemented "latest" symlinks for the epel-release package.
https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
​https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
See https://fedorahosted.org/epel/ticket/8#comment:12
Do it right from the shell:
$ EPEL_BASEURL=http://dl.fedoraproject.org/pub/epel/$(awk '/rhel/ {print $2}' /etc/rpm/macros.dist)/$(uname -p)/
$ rpm -ivh $EPEL_BASEURL$(curl -s $EPEL_BASEURL | grep epel-release | awk -F'<|>' '{print $5}')
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.zRXE1U: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
I've tested this on CentOS 6.4, 6.5 and 6.6 and RHEL 6.5 and 6.6, but the contents of /etc/rpm/macros.dist and the HTML code from http://dl.fedoraproject.org should be consistent on all platforms, so this should work on all platforms.
For posterity's sake, here it is with more detail:
$ EPEL_BASEURL=http://dl.fedoraproject.org/pub/epel/$(awk '/rhel/ {print $2}' /etc/rpm/macros.dist)/$(uname -p)/
# http://dl.fedoraproject.org/pub/epel/6/x86_64/
$ EPEL_RELEASE_RPM=$(curl -s $EPEL_BASEURL | grep epel-release | awk -F'<|>' '{print $5}')
# epel-release-6-8.noarch.rpm
$ EPEL_RELEASE_RPMURL=$EPEL_BASEURL$EPEL_RELEASE_RPM
# http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -ivh $EPEL_RELEASE_RPMURL
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.ep6xy3: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]