certbot-auto (2021) for Amazon Linux release 2 (Karoo) and nginx - nginx

I checked my ec2 system version:
cat /etc/system-release
Amazon Linux release 2 (Karoo)
cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
The new version of certbot seems to require snapd to install, but Amazon Linux release 2 does not seem to support the installation of snapd.
sudo yum install snapd
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00
No package snapd available.
Error: Nothing to do
I did not see the relevant system version in the installation teaching of snapd:
I don’t know if Amazon Linux release 2 should be classified in CentOS?
Amazon Linux release 2 is not included in the options, nor did I see the related words.
Epel-release and dnf are mentioned in the CentOS teaching, but they don’t seem to support installation.
Or ec2 just used other methods to install certbot?

AWS has another way to install certbot, instructions are here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html#letsencrypt

Related

How to install R language version 4 in AWS EMR - Amazon linux 2

We have an AWS EMR cluster. By default it comes with
Amazon Linux version 2
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
I like to install latest R version 4..
Tried following :
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install R
But it doesn't upgrade R version to v4.0. It only offers to upgrade it to 3.4.3-1.amzn2.0.1
Amazon Linux 2 - uses EPEL version 7. EPEL v7 doesn't seem to have R v4.
But EPEL version 8 has R v4
I am planning to install R from source. But like to know if this is a way to install binary.
Is there any option to install latest R binary on AWS Linux 2 ?
Found a way to install the R v4 binary from AWS extras repo
sudo amazon-linux-extras install R4
In future, if some one is hunting for AWS Linux specific software package., this command list the packages that can be installed from AWS extras
amazon-linux-extras list
Reference - Amazon Linux User Guide
Install miniconda https://docs.conda.io/en/latest/miniconda.html
conda install r-base or conda install r-essentials

How to install R on the Cloud 9 IDE?

I have recently started using the Cloud 9 IDE and migrated my code from Windows 7 Professional system. Cloud 9 provides an Ubuntu VM pre-configured with Node.js, Python, etc. I am unable to install my favorite programming language, R, using the set of instructions provided on the CRAN site.
This is the set of instructions here.
I am unable to get this off the ground and have tripped over the very first step of downloading R from a CRAN mirror. I have tried:
somebody:~/workspace $ deb https://cran.stat.auckland.ac.nz/bin/linux/ubuntu trusty/
bash: deb: command not found
Clearly, I am a noob when it comes to Linux. Any help?
Update:
Downloaded with
wget http://cran.r-project.org/src/base/R-3/R-3.0.3.tar.gz
tar -xzf R-3.0.3.tar.gz
cd R-3.0.3
Installed with
sudo apt-get update
sudo apt-get install r-base
Launched as
someone:~/workspace/R-3.0.3 $ R

How to install a specific version of nginx on Debian 7?

I did the following to nstall nginx on Debian 7
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx
sudo service nginx start
This installed the latest version of nginx , How do I install another version?
Doing sudo apt-get install nginx=1.2 or sudo apt-get install nginx-1.2 does not work. It fails saying version not found?
Older version of Nginx is not available in Debian repository, you need configure Nginx Debian repository http://nginx.org/en/linux_packages.html or find the deb package and install manually.
A distribution of Debian is a set of software packages that was tested to run well together. Every change imposes a risk to break somethign somewhere since that change may not have been prepared for by another software also installed.
When you are for a newever version than what the distributions ships, then a look at the package "tracker" will present an overview of what is currently available, which includes so-called backports to your distribution: https://packages.qa.debian.org/n/nginx.html but indeed the packages directly provided by nginx.org should be just fine. For looks into the past, check out http://snapshot.debian.org/package/nginx/ .

Upgrading NGINX: apt-get candidate version

I've installed nginx-light on my Google Compute Engine instance (Debian Wheezy). I installed with apt-get install nginx-light, which installed NGINX version 1.2.1 (specifically: 1.2.1-2.2+wheezy3).
Its working fine, but I was just over at NGINX and realized this is a very old version from like 2012, and that the latest stable version is 1.6.2. But apt-get upgrade nginx-light doesn't upgrade the release it seems. I'm not that familiar with apt-get so I've been searching for tips. I found a reference to the command: apt-cache policy nginx-light. Running that I get:
nginx-light:
Installed: 1.2.1-2.2+wheezy3
Candidate: 1.2.1-2.2+wheezy3
Version table:
1.6.2-5~bpo70+1 0
100 http://gce_debian_mirror.storage.googleapis.com/ wheezy-backports/main amd64 Packages
100 http://http.debian.net/debian/ wheezy-backports/main amd64 Packages
*** 1.2.1-2.2+wheezy3 0
500 http://gce_debian_mirror.storage.googleapis.com/ wheezy/main amd64 Packages
500 http://security.debian.org/ wheezy/updates/main amd64 Packages
500 http://http.debian.net/debian/ wheezy/main amd64 Packages
100 /var/lib/dpkg/status
So it shows 1.6.2 as available in the version table. A little more research indicates that the pin-value (100) of this version correlates to "NoAutomatic" and "ButAutomaticUpgrades". A little more searching tells me these states indicate that the upgrade to that version isn't automatic, it must be explicit.
It seems the solution has to do with version pinning, but I'm not finding clear enough info on that to be confident about exactly what to do. So I have a few questions if anybody has any insight.
Do you know of a good reason the upgrade to 1.6.2 wouldn't be
automatic? Any reason to stay on 1.2.1? This will be a production
web server for a fairly small web site (basically a startup home
page) running PHP / Wordpress.
How do I force apt-get upgrade to use 1.6.2 as the candidate
release?
What brought me here was setting up Google PageSpeed modules. The
instructions involve building NGINX 1.6.2 from sources with the GPSM
linked in. But I don't want to confuse the package manager or mess
anything up by building my own NGINX if I don't have to. Will I need
to build from sources if I want to install GPSM into NGINX?
The website is already running great, and super fast with CloudFlare. But I thought I would experiment with Google Page Speed- but not if its going to be too much trouble.
OK I figured it out myself. Maybe not the most efficient, but I had to:
Backup my nginx config (not too complicated, just nginx.conf was
overwritten with a new version)
sudo apt-get remove nginx-light
sudo apt-get autoupdate
sudo apt-get install nginx-common=1.6.2-5~bpo70+1
sudo apt-get install nginx-light=1.6.2-5~bpo70+1
Then I had to change one line in my site config in /etc/nginx/sites-available...
(because PHP files stopped working after the upgrade)
I changed: include fastcgi_params;
to: include fastcgi.conf;
I still don't know if this upgrade was really necessary, or if I can (or should) install google pagespeed into it, but at least I've got the latest stable nginx running with my current setup.
FYI, the correct way to do this is (using the wheezy-backports line for example) is
apt-get install -t wheezy-backports nginx-light
As for your question:
Do you know of a good reason the upgrade to 1.6.2 wouldn't be automatic?
The answer is simple, so that you don't upgrade to a version newer than the version in wheezy by accident. Most of the time, you don't want to do that.
Also, you ask:
Will I need to build from sources if I want to install GPSM into NGINX?
Building a custom Debian package from nginx sources may be an option. But I'm not sure of the details of what you are trying to do.

Install R 3+ on Redhat 6.3

I want to install R on my Red hat cluster which has the version below:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
When I went to R's homepage and this is what in their repository:
I am wondering there is only redhat version 4 and 5 there and I don't know which version will best fit my operating system.
Texinfo Problem Goes Here
Since I have asked more than 6 questions today. Stackoverflow doesn't like me to ask more questions. So I will put the following questions into this question, sorry about that.
Hi, I was trying to use Expect to automatically log into a remote server and install R.
When I install R, they came up with all kinds of prompts asking 'The package will take xx MB Is that OK with you'?
The command to install:
su -c 'yum install R R-core R-core-devel R-devel'
You need to type in Yes for a few times to finish the installation.
My question is:
Is there a flag for yum install that you can tell the machine to install everything I want you to install. Don't ask me. So I can install those four packages without any prompt.
If that is hard to install in the 'quiet mode', how to write a while loop in Expect so it will send the Y automatically:
Pseudo Code Not Working!
send -- "sudo su -c yum install ...."
while ("Expect '*Is it OK [Y/N]*'"){
send 'Y\r'
# if (expect 'user$')
{break}
}
Thanks a lot in advance.
This is likely due to there being R RPMs in the Extra Packages for Enterprise Linux (EPEL) repos for RHEL6. You can find out more about EPEL on the Fedora website.
You need to configure yum to use EPEL. The easiest way to do this is to install the epel-release package for your platform, eg
su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
or
su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm'
for example. The you can use yum to install R, e.g. you will probably want
su -c 'yum install R R-core R-core-devel R-devel'
so that you pull in the packages needed to build other add-on packages as most CRAN package are not in EPEL.
At the moment, the latest version of R in EPEL is 3.0.1, so one patch release point behind the latest version 3.0.2.

Resources