Letsencrypt how to use --preferred-challenges - lets-encrypt

This command:
$ letsencrypt certonly --manual --preferred-challenges dns --email foo#bar.com --domains test001.bar.com
outputs:
letsencrypt: error: unrecognized arguments: --preferred-challenges dns
From the documentation here: https://certbot.eff.org/docs/using.html#certbot-command-line-options
I find:
--preferred-challenges PREF_CHALLS
A sorted, comma delimited list of the preferred
challenge to use during authorization with the most
preferred challenge listed first (Eg, "dns" or "tls-
sni-01,http,dns"). Not all plugins support all
challenges. See
https://certbot.eff.org/docs/using.html#plugins for
details. ACME Challenges are versioned, but if you
pick "http" rather than "http-01", Certbot will select
the latest version automatically. (default: [])
Why do I get this error?

Found the answer, although the website states that letsencrypt and certbot are the same. It seems to not be the case.
$ apt-get install letsencrypt
$ apt-get install python-pip
$ pip install --upgrade pip
$ pip install certbot
$ certbot certonly --manual --preferred-challenges dns --email foo#bar.com --domains test001.bar.com
Does the trick

Related

How to install wildcard SSL certificate in ubuntu AWS EC2 instance

Installed JITSI but unable to enable audio and video ...it throw an error saying SSL certificate is required. Can I get the exact steps to install SSL in ubuntu 16.04 instance in AWS EC2.
In ubuntu you can find the nginx conf file in the directory /etc/nginx/sites-available and you will find <your_domain>.conf file.
Edit the config file to point the SSL certificate
ssl_certificate /etc/ssl/<your_domain>.crt;
ssl_certificate_key /etc/ssl/<your_domain>.key;
More information on how to setup SSL certificate with Nginx: http://nginx.org/en/docs/http/configuring_https_servers.html
Install certbot, it will place correctly your certificates.
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx
Jitsi only works if it have SSL.

Brew installation fails on macos

How could I install brew on macos 10.15.6:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
yields:
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Is this a question for StackOverflow or AskDifferent?
git clone brewrepowhereveritis
mv brew Library /usr/local

Error on install SSL in EC2 with Let's Encrypt

I'm pretty new on aws ec2, I'm trying to get a free ssl with Let's Encrypt. I've watched a video in youtube to learn it, but I have a problem, my terminal says sudo: add-apt-repository: command not found, always when I type the command add-apt-repository ppa:certbot/certbot
I'm using Amazon Linux AMI 2018.03.0 (HVM), is it the problem? If it is the problem, how can I fix it? Which command I need to use to install?
apt is the package manager for Debian-based Linux distros. Amazon Linux is CentOS/RHEL-based distro, it uses yum as package manager.
To install Let's Encrypt SSL certificate on Amazon Linux you can follow the step-by-step tutorial by AWS: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html#letsencrypt
You will have to import EPEL repository from Fedora (instead of PPA), then install Certbot from Let's Encrypt and issue an SSL certificate using Certbot.
Minimal command set for Amazon Linux:
sudo wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/
sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-*.rpm
sudo yum-config-manager --enable epel*
sudo yum install -y certbot python2-certbot-apache
sudo certbot

Install ElasticSearch APM

I am trying to setup ElasticSearch APM, my OS is Ubuntu 16.04,
I installed ElasticSearch and Kibana on the system,
I am referring the following site for installation steps -
https://jee-appy.blogspot.com/2018/02/setup-kibana-elastisearch.html
The installation commands for ElasticSearch and Kibana are as follows-
# Install Elasticsearch-6
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.1.tar.gz
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get install elasticsearch
ls /etc/init.d/elasticsearch
sudo service elasticsearch status
Change bind address and JVM heap option as per requirement
Change network.host to 0.0.0.0 in elasticsearch.yml and set -Xms 4g & -Xmx 4g in jvm.options
sudo vi /etc/elasticsearch/elasticsearch.yml
sudo vi /etc/elasticsearch/jvm.options
Setting read replicas to 0 if you are creating single node cluster
curl -XPUT H 'Content-Type: application/json' 'http://localhost:9200/_all/_settings?preserve_existing=false' -d '{"index.number_of_replicas" : "0"}'
Install Kibana
sudo apt-get update && sudo apt-get install kibana
sudo service kibana restart
Install nginx
sudo apt-get -y install nginx
Add nginx config file for kibana
sudo vi /etc/nginx/conf.d/kibana.conf
Replace mykibana.com with your server_name or IP. We will setup auth in next step, hence we have placed a line for auth_basic in kibana.conf
server {
listen 80;
server_name mykibana.com;
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/htpasswd.users;
location / {
proxy_pass http://localhost:5601;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Setup auth
After installing apache2-utils when you run htpasswd, it will ask for a password, provide a password. This username and password would be useful when you try to access kibana from browser.
sudo apt-get install apache2-utils
sudo htpasswd -c /etc/nginx/htpasswd.users efkadmin
sudo service nginx restart
Web view of Kibana
After successful Setup, hit http://localhost:5601. Put username and password and you will see kibana web as shown below.
APM setup
After installing ElasticSearch and Kibana,
I am trying to install APM server into it.
I used the following commands to install it -
curl -L -O https://artifacts.elastic.co/downloads/apm-server/apm-server-6.3.1-amd64.deb
sudo dpkg -i apm-server-6.3.1-amd64.deb
Import dashboard -
./apm-server setup
On firing the above command I get the following error -
bash: ./apm-server: No such file or directory
Please help to setup APM
If the command following command is executed sucessfully
> sudo dpkg -i apm-server-6.3.1-amd64.deb
The apm-server must have been installed.
You are trying to run apm-server by ./apm-server, where you specifying that the binary apm-server is present in current directory.
But that is not the case, by installing via dpkg cmd the package is installed somewhere in /usr directory.
So you just need to run apm-server -e cmd in the shell.
No need to add ./
If you get permission deniod error.
Run the command with sudo

Cannot install ruby using RVM in Cygwin - curl SSL cert problem

I'm trying to install ruby using RVM in Cygwin, but I'm getting the error:
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
i've looked at this question: Curl Certificate Error when Using RVM to install Ruby 1.9.2
but unfortunately the solution doesn't work for me because curl-config --ca doesn't show anything. I checked with curl-config --configure and it seems the package was compiled with the --without-ca-bundle
how can I work around this?
this is the same question. open ~/.rvm/scripts/fetch and edit every "fetch_command=..." line to have a -k option.
It seems curl in cygwin isn't shipped with its CA certificates bundle. You can download it at http://curl.haxx.se/ca/cacert.pem then use:
CURL_CA_BUNDLE=</path/to/cacert.pem> rvm install <ruby>
If you don't have ~/.rvm directory then do which rvm and then edit [rvm-path]/../scripts/fetch. Each curl command need -k. Ie:
...
fetch_command="curl -k -x${rvm_proxy} -f -L --create-dirs -C - " # -s for silent
else
fetch_command="curl -k -f -L --create-dirs -C - " # -s for silent
...
This worked for Cygwin.

Resources