How to install apt-get package in Amazon Linux machine - unix

How to install apt-get in amazon linux machine,using yum or wget ,i searched extensively but didnt find relvant ..getting below message
[ec2-user#ip-172-31-33-94 ~]$ sudo apt-get update -y && sudo apt-get install -y
linux-image-extra-$(uname -r)
sudo: apt-get: command not found

well figured out these commands hence answering,these commands will install apt-get and run docker as ec2 user
sudo yum update -y
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker info
docker run -it --rm tarunkumard/gatling:FirstScript

Related

Cannot install dotnet-sdk2.1 on Ubuntu 16.04 server

I was trying to install dotnet-sdk2.1.101 on my Ubuntu 16.04 server today but following error occured:
"dotnet-sdk-2.1.101 : Depends: aspnetcore-store-2.0.6 but it but it is not going to be installed"
Steps taken: (followed instructions on microsoft website):
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1
Any help is much appreciated :)
Following a guide on Upgrading to dotnet core 2.1.4 on Ubuntu 16.04 resolved this issue on my end:
First, Setup the package manager.
$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
$ sudo apt-get update
Next, Install .NET Core 2.x
$ sudo apt-get install dotnet-sdk-2.1.4
I have fixed my own issue following these below steps:
wget -q packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update –y
sudo apt-get install dotnet-sdk-2.1.101
For me previous didn't help.
But for me worked the next:
wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u2_amd64.deb
sudo dpkg -i libicu57_57.1-6+deb9u2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu60_60.2-6ubuntu1_amd64.deb
sudo dpkg -i libicu60_60.2-6ubuntu1_amd64.deb
sudo apt-get install dotnet-sdk-2.1
I don't quite understand did I need 2 versions of libicu, but after 1st it required the 2nd one.

Installing R and RStudio on Chromebook Samsung 3

I have been trying to but struggling to install R and RStudio on my Chromebook Samsung 3. I have it set-up with Crouton with XFCE/Xiwi and use Trusty. I can install R just fine but either can't install Rstudio at all or can get the icon for Rstudio to show up but nothing happens when I click on it. Can someone give me a process on how to install these effectively on my device?
UPDATE 2020:
I am no longer using Crouton, but rather the built in Linux option (Crostini). In the Linux terminal, I did the following:
sudo apt-get update; sudo apt-get upgrade; sudo apt-get update --fix-missing; sudo apt autoclean; sudo apt-get clean; sudo apt-get autoremove
sudo apt install -y gnupg2
sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
sudo vi /etc/apt/sources.list
Add this line. Can use a different mirror if desired. (Note: older versions of Crostini were running Stretch by default instead of Buster)
deb http://cran.rstudio.com/bin/linux/debian buster-cran35/
Then back in the terminal
sudo apt-get install xclip
sudo apt install -y r-base r-base-dev
sudo apt-get install gdebi-core
sudo apt install -y libgstreamer1.0 libgstreamer-plugins-base1.0 libxslt-dev libnss3
sudo apt --fix-broken install
sudo curl -o rstudio.deb https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5033-amd64.deb
sudo dpkg -i rstudio.deb
sudo apt-get update; sudo apt-get upgrade; sudo apt --fix-broken install; sudo apt-get update --fix-missing; sudo apt autoclean; sudo apt-get clean; sudo apt-get autoremove
ORIGINAL ANSWER:
It admittedly took me a long time, but I was finally able to install R and RStudio on my Chromebook Samsung 3. I have it set-up with Crouton with XFCE/Xiwi and use Trusty. After setting up Crouton, etc. here is what I had to do in the Linux terminal:
sudo apt-get install software-properties-common
sudo apt-get install selinux-policy-default
sudo apt-get install libqpol1
Add these lines:
deb https://<FOO>/bin/linux/ubuntu trusty/
deb https://<FOO>/ trusty-backports main restricted universe
to file
/etc/apt/sources.list
(replace FOO with the CRAN mirror of your choice and replace trusty if applicable)
Terminal:
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rrutter
sudo apt update
sudo apt upgrade
sudo apt upgrade r-base r-base-dev
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.1.442-amd64.deb
sudo gdebi rstudio-server-1.1.442-amd64.deb
wget https://download1.rstudio.org/rstudio-0.99.896-amd64.deb
sudo apt-get install libxslt1-dev
sudo gdebi rstudio-0.99.896-amd64.deb
cd /usr/bin/
rstudio
source
source
source
source

Log in RStudio with AWS EC2 instance

I managed to follow all the steps to create EC2 instance and install R Server on it.
But now when I go to RStudio to connect (which looks something like "ec2-[Public IP]-.eu-west-3.compute.amazonaws.com:8787")
I am asked a username and a password but I did not configure any:
I tried rstudio (username) and rstudio (password) but it does not work.
Anyone knows how I can find the username and the password to connect?
Thanks.
M
If this is using the AMI from http://www.louisaslett.com/RStudio_AMI/, the default password recently changed to the instance ID of the EC2. A code starting with i- and 17 alphanumeric characters, for example.
Username is still rstudio.
You can create a user/password in Linux and use it to log in
#add user(s)
useradd username
echo username:password | chpasswd
here is a detailed blog from on running R on AWS
I was having the same issue (I believe there is no ubuntu password for an AWS EC2 Instance and R studio requires one).
You can add a new user by typing the following: sudo adduser YOURUSERNAME and follow the terminal instructions (press enter to skip the info you do not want to give). Head over to the IP xxx.xxx.xxx.xxx:8787 and you should be able to log in now.
How to install R studio 3.4.4, upgrade to 3.6.0 and add a username (Ubuntu 18):
sudo apt update
sudo apt-get install -y r-base r-base-dev
sudo apt install gdebi-core
wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.1335-amd64.deb
sudo gdebi rstudio-server-1.2.1335-amd64.deb
sudo chmod 777 -R /usr/local/lib/R/site-library
sudo adduser YOURUSERNAME
#########
# Upgrade R
echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" | sudo tee -a /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y r-base r-recommended r-base-dev
# Rstudio dependency issues (when installing devtools) - I installed from an AWS EC2 account so I need to change my root password.
sudo passwd root
su root
apt-get -y build-dep libcurl4-gnutls-dev

How to upgrade openresty with or without downtime

All,
I have few servers that have openresty installed and the version running on it is nginx version: openresty/1.9.7.2
How can i upgrade it to 1.11.5.2.
I have seen the documentation but things are not getting clear. Can someone please provide the detailed steps of the same.
This is a pretty late reply, but I just performed an upgrade from OpenResty 1.13.6.2 to 1.15.8.2. I'm running OpenResty in AWS/EC2 on Ubuntu 16.04.6 LTS. I just followed the Ubuntu guide to install at OpenResty
I did this on a backup instance to make sure everything worked, then applied the upgrade to my Live instance. All of my configs were intact and unchanged.
# install some prerequisites needed by adding GPG public keys (could be removed later)
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates
# import our GPG key:
wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
# for installing the add-apt-repository
sudo apt-get -y install --no-install-recommends software-properties-common
# add the our official APT repository:
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
# to update the APT index:
sudo apt-get update
# Then you can install openresty:
sudo apt-get -y install openresty
# check the new version:
openresty -v
# restart openresty
sudo service openresty restart

Docker - R creates multiple processes

I'm creating a docker container and I'm installing R in it.
The problem is, that when running R in the container, the main R process create ncores - 1 subprocesses.
So when running the docker on my laptop with 8 cores, I get 1 R process and 7 R subprocesses.
I also tried to configure my Docker file similar to this:
https://github.com/rocker-org/rocker/blob/eeb9c8a5f416f7cfe982734440e39fa72abbcb33/r-base/Dockerfile
but is still not working.
Docker-file:
FROM ubuntu:14.04
RUN sed -e 's/archive\.ubuntu/at\.archive\.ubuntu/g' -i /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install libatlas3-base
RUN apt-get -y install libopenblas-base
RUN apt-get -y install r-base
RUN apt-get -y install r-base-dev
RUN apt-get -y install apt-utils
RUN echo "deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ trusty/" >> /etc/apt/sources.list
RUN gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
RUN gpg -a --export E084DAB9 | apt-key add -
RUN apt-get update
RUN apt-get -y --with-new-pkgs upgrade
Did someone encountered this problem?
I don't know why, but the whole problem was caused by installing libopenblas-base.
After removing the line
RUN apt-get -y install libopenblas-base
everything worked fine!

Resources