yum couln't fund Mariadb Package on CentoOS 7 - centos

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

Related

Not all pre-reqs install correctly for Hyperledger Composer

I've been following the Hyperledger Composer tutorial. I managed to install Ubuntu 16.04 on Hyper-V on my Windows 10 Enterprise. I then started on the following pre-req installation instructions:
https://hyperledger.github.io/composer/installing/installing-prereqs.html
I ran the prereqs-ubuntu.sh script. It ran fine with no errors. I examined the logs and saw that it had successfully installed npm 5.6.0, node 8.9.4, docker 17.12.x, docker composer 1.13.x, and Python 2.7.12.
However, when I run run $ sudo npm --version
it tells me that the npm command is not found
Same with $ sudo node --version
Not found...?!
Why would that be when the log clearly shows that npm and node where successfuly installed?!
Well, what I did and managed through:
--> install nodejs and npm:
sudo snap install node --classic --channel=8
so you get the latest node8.
--> then to solve "sudo" problem with node specify the npm prefix:
npm config set prefix ~/.node_modules
add the following to .bash_profile
export PATH=$HOME/.node_modules/bin:$PATH
Now the packages will install into your user directory and no permissions will be harmend.
--> install nvm (to get exactly node 8.9 version on the next step):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Verify:
node -v nvm
which should output 'nvm' if the installation was successful.
--> get and set node 8.9 version:
nvm install v8.9.0
nvm use 8.9.0
--> reset PATHs:
echo export PATH="$HOME/npm/bin:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
--> at this stage the docker previous setup shall be destroyed:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
--> Installing the rest of prereqs:
sudo apt-add-repository -y ppa:git-core/ppa
sudo apt-get update
# install git
sudo apt-get install -y git
# Ensure that CA certificates are installed
sudo apt-get -y install apt-transport-https ca-certificates
# Add Docker repository key to APT keychain
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Update package lists
sudo apt-get update
# Verifies APT is pulling from the correct Repository
sudo apt-cache policy docker-ce
# Install Docker
echo "# Installing Docker"
sudo apt-get -y install docker-ce
# Add user account to the docker group
sudo usermod -aG docker $(whoami)
# Install docker compose
echo "# Installing Docker-Compose"
sudo curl -L "https://github.com/docker/compose/releases/download/1.13.0/docker-compose-$(uname -s)-$(uname -m)" \
-o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Install unzip, required to install hyperledger fabric.
sudo apt-get -y install unzip
--> now you can install Fabric dev. env. (assuming the rest of prereq components stand available):
npm install -g composer-cli
etc.
I think you need to log out and close the shell. And then restart with the new session, as the shell stores your session.
Also, after installation, the use of sudo is not recommended as mentioned on IBM hyperledger website.

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

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??

Setting up Django with GeoDjango Support in AWS Beanstalk or EC2 Instance

So I have at one point had this going via Beanstalk, using Amazon Instance (2013.09) ami-35792c5c . At the time this ebextension scripts worked great when placed in the root of your repo in .ebextensions/
00_repo.config
packages:
rpm:
pgdg-redhat93-9.3-1: 'http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm'
remi: 'http://rpms.famillecollet.com/enterprise/remi-release-6.rpm'
files:
"/etc/yum.repos.d/pgdg-93-redhat.repo":
mode: "000644"
owner: root
group: root
content: |
[pgdg93]
name=PostgreSQL 9.3 $releasever - $basearch
baseurl=http://yum.postgresql.org/9.3/redhat/rhel-6-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-93
[pgdg93-source]
name=PostgreSQL 9.3 $releasever - $basearch - Source
failovermethod=priority
baseurl=http://yum.postgresql.org/srpms/9.3/redhat/rhel-6-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-93
commands:
epel_repo:
command: yum-config-manager -y --enable epel
remi_repo:
command: yum-config-manager -y --enable remi
01_app.config
packages:
yum:
libtiff-devel: ''
libjpeg-devel: ''
libzip-devel: ''
freetype-devel: ''
postgresql-devel: ''
gdal: ''
gdal-python: ''
geos: ''
proj: ''
libmemcached: ''
libmemcached-devel: ''
cyrus-sasl-devel: ''
zlib-devel: ''
container_commands:
01_collectstatic:
command: 'PYTHONPATH=.:..:../lib cd site/kpmkhv && ./manage.py collectstatic -c --noinput && cd ../..'
leader_only: true
02_syncdb:
command: 'PYTHONPATH=.:..:../lib cd site/kpmkhv && ./manage.py syncdb --noinput && cd ../..'
leader_only: true
03_migrate:
command: 'PYTHONPATH=.:..:../lib cd site/kpmkhv && ./manage.py migrate --noinput && cd ../..'
leader_only: true
option_settings:
- namespace: aws:elasticbeanstalk:container:python
option_name: WSGIPath
value: site/kpmkhv/wsgi.py
- namespace: aws:elasticbeanstalk:container:python:staticfiles
option_name: /static/
value: site/kpmkhv/static/
- option_name: DJANGO_SETTINGS_MODULE
value: settings_prod
So now when I use the same instance and launch my environment, I get this error regarding a dependency.
Error: Package: gdal-libs-1.9.2-5.rhel6.x86_64 (pgdg93)
Requires: libpoppler.so.5()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Looks like the same repo is now returning a newer version of poppler, it was 12.x and now its 22.x and gdal needs the old version.
I also tested this out on an EC2 Instance and got the same error. But then I ran into this document from amazon on locking an AMI to its original repository version.
So adding this to User Options via the EC2 Console when you launch fixes the problem on EC2:
#cloud-config
repo_releasever: 2014.03
What is the best way to always have this option when your Beanstalk launches the EC2 Instance on your behalf? I read about cloud-init and perhaps a script deployed via ebextensions would be the best bet?
Any insight on this is appreciated, thanks.
My solution to a 2017.03 image was to:
commands:
01_yum_update:
command: sudo yum -y update
02_epel_repo:
command: sudo yum-config-manager -y --enable epel
03_install_gdal_packages:
command: sudo yum -y install gdal gdal-devel
files:
"/etc/httpd/conf.d/wsgihacks.conf":
mode: "000644"
owner: root
group: root
content: |
WSGIPassAuthorization On
packages:
yum:
git: []
postgresql95-devel: []
gettext: []
libjpeg-turbo-devel: []
libffi-devel: []
So I now have a working ebextensions workflow on 2013.09 stack ami ami-35792c5c. For the 2014.09 stack see the other solution. The solution below works with postgis by installing the needed gdal component, 00_repo.config needs to look like this:
files:
"/etc/yum.repos.d/pgdg-93-redhat.repo":
mode: "000644"
owner: root
group: root
content: |
[pgdg93]
name=PostgreSQL 9.3 $releasever - $basearch
baseurl=http://yum.postgresql.org/9.3/redhat/rhel-6-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-93
[pgdg93-source]
name=PostgreSQL 9.3 $releasever - $basearch - Source
failovermethod=priority
baseurl=http://yum.postgresql.org/srpms/9.3/redhat/rhel-6-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-93
commands:
epel_repo:
command: yum-config-manager -y --enable epel
remi_repo:
command: yum-config-manager -y --enable remi
packages:
rpm:
pgdg-redhat93-9.3-1: 'http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm'
remi: 'http://rpms.famillecollet.com/enterprise/remi-release-6.rpm'
qt4-devel: 'http://mirror.centos.org/centos/6/os/x86_64/Packages/qt-4.6.2-28.el6_5.x86_64.rpm'
The 2nd extension stays in tact. This works on Amazon Instance (2013.09) ami-35792c5c, I haven't tried the newer containers yet with it.
Alternative 1:
If you want less dependencies on repos / rpms from the ebextensions file, you could upload all required rpms to S3 and update the ebextensions 'packages' to point to your s3 rpms. Setup your S3 bucket for public get access using CORS headers.
Alternative 2:
Create a custom AMI where you compile all dependencies from source. This way there will be no rpm conflicts and you don't have to temper with the default repos supplied by the AMI you are customizing. See this answer:
Configuring Amazon Elastic Beanstalk with PostGIS
Also check out the tool I made:
https://github.com/radlws/django-awseb-tasks
I had a similar issue on the 2014.09 stack, ami id ami-246ed34c and got around the problem like this:
I found and downloaded the required dependencies online here and here. These are the versions that work:
lib64jpeg8-8b-5.1.mga1.x86_64.rpm
lib64poppler5-0.12.4-2.1mdv2010.1.x86_64.rpm
Zipped both .rpm files
Uploaded the .zip files to S3 and make sure the server can access them.
Added to ebextensions/00_sources.config the following code:
/etc/mylibs/jpeg8/ : https://s3.amazonaws.com/path-to-first-rpm-file.rpm.zip
/etc/mylibs/poppler/ : https://s3.amazonaws.com/path-to-second-rpm-file.rpm.zip
Installed via yum in ebextensions/01_packages.config. I had to use these commands to be able to install them.
commands:
jpeg8_repo:
command: yum -y install /etc/mylibs/jpeg8/lib64jpeg8-8b-5.1.mga1.x86_64.rpm
ignoreErrors: true
poppler_repo:
command: yum -y install /etc/mylibs/poppler/lib64poppler5-0.12.4-2.1mdv2010.1.x86_64.rpm
ignoreErrors: true
I was finally able to get this to work on the 2015.03 image and PostgreSQL 9.4 with a suggestion I found on the PostgreSQL yum mailing list (http://www.postgresql.org/message-id/1429688221.3808.17.camel#gunduz.org)
Specifically, I installed libpoppler straight from a CentOS 6 mirror. I also used Mike Edward's suggestion of the Amazon Linux specific pgdg rpm. In whole, it ended up being a rather simple solution, which looked like:
yum -y install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-ami201503-94-9.4-1.noarch.rpm
yum --enablerepo=epel -y install postgis2_94 http://centos-distro.cavecreek.net/centos/6.6/os/x86_64/Packages/poppler-0.12.4-3.el6_0.1.x86_64.rpm
For the 2015.03 image, I had good luck using this value for the pgdg repo:
pgdg-redhat93-9.3-1: 'http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-ami201503-93-9.3-1.noarch.rpm'
With that, I was able to install gdal without needing to bring in libpoppler, etc., as separate rpms from S3.

unable to install haproxy 1.5 on centos 6.5

I am trying to install haproxy on my centos 6.5 server. I am using the command
yum install haproxy
This command installs a version 1.4.x. I have also looked at the following links, but could not get it to work
http://virtuallyhyper.com/2013/05/configure-haproxy-to-load-balance-sites-with-ssl/
http://blog.haproxy.com/2012/09/10/how-to-get-ssl-with-haproxy-getting-rid-of-stunnel-stud-nginx-or-pound/
https://github.com/bluerail/haproxy-centos
how do i install it?
You can build the RPM as follows:
mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
sudo yum -y install pcre-devel openssl-devel
cd rpmbuild/SOURCES
curl -L -O http://www.haproxy.org/download/1.5/src/haproxy-1.5.3.tar.gz
tar zxf haproxy-1.5.3.tar.gz
cd ..
cp -p SOURCES/haproxy-1.5.3/examples/haproxy.spec SPECS/haproxy153.spec
sed -i 's/Release: .*/Release: %{?_release:%{_release}}%{!?_release:1}/' SPECS/haproxy153.spec
sed -i 's/USE_PCRE=1 /USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 /' SPECS/haproxy153.spec
rpmbuild --define "_topdir `pwd`" --define "_release 2" -bb SPECS/haproxy153.spec
(I use a local directory and set the release number otherwise it is the same as http://qiita.com/uemura/items/e822c1ed505b9fe0208f)
Install
scp RPMS/x86_64/haproxy-1.5.3-2.x86_64.rpm root#somewhere:~/
somewhere# yum localinstall ~/haproxy-1.5.3-2.x86_64.rpm
You could install from source using one of these tar bundles:
http://www.haproxy.org/download/1.5/src/
You will probably need to install the following bundles to compile from source:
yum openssl-devel pcre-devel make gcc
Here's also a script which I presume would work on your environment

MongoDB installation on CentOS

I tried installing MongoDB on a minimal CentOS 6.8 image.
My shell script is the following:
#!/bin/sh
MONGODB_V="2.6.1"
cat > /etc/yum.repos.d/10gen.repo <<EOL
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
EOL
sudo yum install "mongodb-org-$MONGODB_V"
sudo yum install "mongodb-org-server-$MONGODB_V"
sudo yum install "mongodb-org-shell-$MONGODB_V"
sudo yum install "mongodb-org-mongos-$MONGODB_V"
sudo yum install "mongodb-org-tools-$MONGODB_V"
mkdir -p /data/db
Everything works well on the installation side but I can't seem to start MongoDB.
I tried:
sudo service mongod start # mongod: unrecognized service
/opt/mongo/bin/mongod
/usr/local/bin/mongod
Any ideas ? Thanks in advance !
Ok, I made a stupid mistake:
/etc/yum.repos.d/10gen.repo
should've been:
/etc/yum.repos.d/mongodb.repo
The repository changed since the 10gen company changed their name to Mongodb inc..