Installing Docker on CentOS 6.6 - linux

I'm trying to install Docker on CentOS 6.6 64 bit version. When execute
sudo yum install docker
I get this
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.psychz.net
* extras: centos-distro.cavecreek.net
* updates: distro.ibiblio.org
No package docker available.
Error: Nothing to do

Epel repository is not installed.
Run
sudo yum install epel-release
and then run
sudo yum install docker-io

I found the answer here
I needed to add the EPEL repository where Docker can be found.

Log into your machine as a user with sudo or root privileges.
Make sure your existing yum packages are up-to-date.
$ sudo yum update
Run the Docker installation script.
$ curl -sSL https://get.docker.com/ | sh
This script adds the docker.repo repository and installs Docker.
Start the Docker daemon.
$ sudo service docker start

If you are coming here for the same issue with RedHat, use
sudo yum install yum-utils
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
sudo yum install docker

Related

Git Large File Storage / How to install git lfs on AWS EC2 Linux 2 / "No package git-lfs available."

How to install git-lfs on an Amazon EC2 (Amazon Linux 2) instance?
Based on https://github.com/git-lfs/git-lfs/blob/main/INSTALLING.md did I tried:
sudo yum install git -y;
cd /home/ec2-user;
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
-> which tells me afterwards:
The repository is setup! You can now install packages.
sudo yum install git-lfs
-> gives me:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package git-lfs available.
Error: Nothing to do
Future commands (not possible yet duo git: 'lfs' is not a git command. See 'git --help'. after git lfs install) would than be based on https://git-lfs.github.com/
git lfs install
...
git clone https://yourrepo.git;
Amazon Linux 2 AMI (HVM) - Kernel 5.10, SSD Volume Type / Arm
With Amazon Linux 2, you can use the Extras Library to install application and software updates on your instances. These software updates are known as topics.
Below are the steps:
Connect to your EC2 Linux instance using SSH.
Use the which command to confirm that the amazon-linux-extras package is installed:
$ which amazon-linux-extras
/usr/bin/amazon-linux-extras
If the amazon-linux-extras package isn't installed, you can use yum to install it:
$ sudo yum install -y amazon-linux-extras
To list the available topics, you can use the following command:
$ amazon-linux-extras list
git-lfs usually comes as part of the epel-release, so you need to first to install epel release for Amazon Linux:
$ sudo amazon-linux-extras install epel -y
For the Amazon Linux AMI, access to the Extra Packages for Enterprise Linux (EPEL) repository is configured, but it is not enabled by default.
sudo yum-config-manager --enable epel
Now you can install git-lfs or whatever else you like from epel-release:
$ sudo yum install git-lfs
As described on packagecloud[1], you need to run:
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
to install the dependencies and the repos. Alternatively you can take the script from [1] directly. You can then simply install with yum:
sudo yum install git-lfs
[1] https://packagecloud.io/github/git-lfs/install#bash-rpm
You need to directly install the ARM64 git-lfs binaries:
wget https://github.com/git-lfs/git-lfs/releases/download/v3.1.2/git-lfs-linux-arm64-v3.1.2.tar.gz
sudo yum install git -y
tar -xvf git-lfs-linux-arm64-v3.1.2.tar.gz
sudo ./install.sh
git lfs install
Now, enjoy your GIT-LFS on ARM64.

Issues installing Docker on RHEL 7 Linux Server

I have been constantly running into this issue more and more lately, and finally need some assistance because I'm completely stuck.
I just got access to a RHEL EC2 Linux server and I am just simply trying to install Docker. This process has been extremely painful lately. Tons of 404 HTTP Not Found errors when trying to follow the processes mentioned online
According to https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html, you can just simply run one of the following two commands:
sudo amazon-linux-extras install docker
sudo yum install docker
However, neither one of these comands work, as shown in the output below:
[root#d8de679d27f2454 myuser]# sudo amazon-linux-extras install docker
sudo: amazon-linux-extras: command not found
[root#d8de679d27f2454 myuser]# yum install docker
Loaded plugins: amazon-id, search-disabled-repos
No package docker available.
Error: Nothing to do
[root#d8de679d27f2454 myuser]#
Here is a list of things I've tried to do :
First Attempt (RE: How to install docker on Amazon Linux2)
The second answer proposed in that you can just run the following:
sudo yum update -y
sudo yum -y install docker
However, that doesn't work either, as shown in the output below:
[root#d8de679d27f2454 myuser]# yum update -y
Loaded plugins: amazon-id, search-disabled-repos
No packages marked for update
[root#d8de679d27f2454 myuser]# yum -y install docker
Loaded plugins: amazon-id, search-disabled-repos
No package docker available.
Error: Nothing to do
[root#d8de679d27f2454 myuser]#
Second Attempt: Installing via get.docker.com
When running curl https://get.docker.com | bash, that doesn't work either
Third Attempt: https://computingforgeeks.com/install-docker-ce-on-rhel-7-linux/
Part of this article suggests running the following two commands:
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
However, that doesn't work either:
# yum install -y yum-utils device-mapper-persistent-data lvm2
Loaded plugins: amazon-id, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
One of the configured repositories failed (Docker CE Stable - x86_64),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=docker-ce-stable ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable docker-ce-stable
or
subscription-manager repos --disable=docker-ce-stable
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=docker-ce-stable.skip_if_unavailable=true
failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try.
https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Here's the output of my cat /etc/os-release command
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
Any help would be greatly appreciated. It seems nearly impossible to install docker at this point.
Ran the following commands and this worked:
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch.rpm
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm
Download latest version of these 3 packages from internet and
[root#test_hostame docker19.03_rpm]# ll
total 93904
-rw-r--r-- 1 root root 30381608 Jan 20 18:19 containerd.io-1.3.9-3.1.el7.x86_64.rpm
-rw-r--r-- 1 root root 25519432 Jan 20 18:19 docker-ce-19.03.14-3.el7.x86_64.rpm
-rw-r--r-- 1 root root 40247412 Jan 20 18:19 docker-ce-cli-19.03.14-3.el7.x86_64.rpm
run command in folder where only these 3 packages are present
yum localinstall *rpm
It is surely gonna work. If it doesnt, share your error.

Unable to install libsasl2-devel on Amazon Linux 2 machine

I am running Ansible playbook and trying to install OS dependencies packages for python. I am trying to run the following:
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
However, it fails at installing libsasl2-devel with the message:
"No package matching 'libsasl2-devel' found available, installed or updated"
All my instances are Amazon Linux 2 machines. Is there any alternative package for this? I tried to look into this but I found solutions for Ubuntu only.
I was able to get it to work in a series of steps. Its a yum issue after other databases are installed and not cleaned up before installing mysql
clear sasl first: sudo yum remove cyrus-sasl
if you have installed maria, there will be conflicts, remove that as well
sudo yum remove mariadb mariadb-server mariadb-libs
take note of anything uninstalled by this to re-add later. If this is too much, you can take a risk and not remove sasl, but it might not reset the availability of the package.
Start here to clean up the dependency issues: https://serverfault.com/questions/873955/how-solve-mysql-5-7-dependency follow the command given by clean all as sudo rm -rf /var/cache/yum/*
This can possibly resolve your issues right there, if not continue the installation below.
delete all data left in /var/lib/mysql/ or you may have upgrade issues.
resinstall sasl:
sudo yum install cyrus-sasl cyrus-sasl-devel and any other packages removed above.
Establish mysql5.7 with the yum services.
wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
sudo yum localinstall -y mysql57-community-release-el6-11.noarch.rpm
sudo yum repolist enabled | grep "mysql.*-community.*"
sudo yum repolist enabled | grep mysql
sudo yum install -y mysql-community-common mysql-community-libs mysql-community-server mysql-community-client
if that doesn't work, re-clear the yum cache again and re-run sudo yum install -y mysql-community-server
if that works, then
sudo service mysqld start
IF the /var/lib/mysql is empty, it will have created a temporary password in the /var/log/mysqld.log (use sudo to read)
run sudo mysql_secure_installation and establish your real password and security settings.
now you should have access via mysql -u root -p

Installing MySQL on CentOS using shell script

I am writing a script where I should install MySQL on my Centos hard disk when I run it.
I downloaded the following :
mysql-apt-config_0.8.5-1_all.deb
But I don't figure out how to install it from the shell script.
I am new to Linux and any help is appreciated !!
Since Centos is yum package manager just run the following commands to install MySql
If you are using Centos 7, you need to first add the repository as follows
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update
To install MySql on Centos, we run
sudo yum install mysql-server
sudo systemctl start mysqld
Note: .deb files are only used for Debian based Linux Distros. Centos uses .rpm files.
Try to save following command in a shell file(extension with .sh) and run with sudo.
#!/bin/bash**strong text**
export http_proxy= $Write proxy
export https_proxy= $ write proxy
sudo -E yum -y update
sudo -E yum -y install wget
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
sudo -E yum -y update
sudo -E yum -y install mysql-server
sudo systemctl start mysqld
sleep 1s
mysql -u root <<-EOF
UPDATE mysql.user SET Password=PASSWORD('123') WHERE User='root';
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
DELETE FROM mysql.user WHERE User='';
DELETE FROM mysql.db WHERE Db='test' OR Db='test_%';
FLUSH PRIVILEGES;
EOF

VPS add repository error

I would like to install Bitcoind under (VPS) linu system. I got a step by step tutorial how can i do this installation, but everytime when i tried to add repository i got the following error message on console "sudo: add-apt-repository: command not found"
commands for installation
sudo aptitude install python-software-properties
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo aptitude update
sudo aptitude install bitcoind
mkdir ~/.bitcoin/
These commands are appropriate for an Ubuntu distribution and not CentOS.
The analogous commands that CentOS uses are yum install / yum update, etc.

Resources