IP python3 -m pip install - ip

I am installing
pip install -r requirements.txt
Security settings all ip addresses on the server are closed.
What ip addresses need to be unblocked to install packages?

Related

Can't Get RStudio Server to Run on EC2

I need to create an AMI with a clean install of R and RStudio Server. I have tried this on Amazon Linux 2 AMI (HVM), Amazon Linux AMI 2018.03.0 (HVM), and Ubuntu Server 18.04 LTS (HVM) but none of them work. I do not get any errors (that I notice) in my installs but when I try to access RStudio Server via http://ec2-XX-XX-XX-XX.compute-1.amazonaws.com:8787 there's nothing to connect to. I have even tried opening all ports to all IPs to make sure it wasn't a networking issue.
My Amazon API install scripts are below
Amazon Linux AMI 2018.03.0 (HVM)
sudo yum install -y R
wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.1335-x86_64.rpm
sudo yum install -y rstudio-server-rhel-1.2.1335-x86_64.rpm
rm rstudio-server-rhel-1.2.1335-x86_64.rpm
Amazon Linux 2 AMI
sudo amazon-linux-extras install -y R3.4
wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.1335-x86_64.rpm
sudo yum install -y rstudio-server-rhel-1.2.1335-x86_64.rpm
rm rstudio-server-rhel-1.2.1335-x86_64.rpm
I get this as part of the result:
Running transaction
Installing : rstudio-server-1.0.153-1.x86_64 1/1
groupadd: group 'rstudio-server' already exists
rsession: no process found
rstudio-server start/running, process 4990
Verifying : rstudio-server-1.0.153-1.x86_64 1/1
Installed:
rstudio-server.x86_64 0:1.0.153-1
Complete!
I think the issue is the rsession: no process found portion but I can't figure out how to resolve it.

Install RStudio on AWS EC2 instance

I managed to create an EC2 instance Amazon Linux AMI 2017.09.1 (randomly chosen) on Amazon Web Services (AWS).
I can send and receive files from my local desktop to AWS properly.
Now I would like to install R (RStudio Server) on AWS.
When searching for an answer, I found the script below that is to be written into Putty:
# install R base
$ sudo yum install r-base
#install RStudio-Server 1.1.442
$ sudo yum install gdebi-core
$ wget https://download2.rstudio.org/rstudio-server-1.1.442-amd64.deb
$ sudo gdebi rstudio-server-1.1.442-amd64.deb
#add user(s)
useradd username
echo username:password | passwordtest
But the answer I get each time is: "No package r-base available" or also "No package gdebi-core available".
Are they some prerequisite steps that I am missing?
Thanks.
M
Amazon Linux AMI 2017.09.1 is based on Centos 6 and the step you got is for Ubuntu(gdebi is an Ubuntu installer), Here are the steps from the official documentation.
$ sudo yum install R
$ wget https://download2.rstudio.org/rstudio-server-rhel-1.1.442-x86_64.rpm
$ sudo yum install rstudio-server-rhel-1.1.442-x86_64.rpm

Shiny server on virtual machine

I configure an Ubuntu VM in oracle VM in a windows server. I want to install shiny server in this machine so I made the following steps in the terminal:
sudo su - \ -c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""
sudo apt-get install gdebi-core
wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb
sudo gdebi shiny-server-1.5.6.875-amd64.deb
After that what command I need to open/run the server? I tried to type in the web browser http://10.10.88:3838 but it is not working.
I tried in the terminal sudo systemctl start shiny-server but nothing happening nothing opened or in terminal
if I type sudo start shiny server I receive this error:
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

How to install PHP 7.1 on EC2 running on Amazon Linux AMI 2018.03 having nginx as web server?

How to install PHP 7.1 on Amazon EC2 t2.micro Instance running Amazon Linux AMI 2018.03 having nginx as web server?
Reference to PHP7
With reference to this answer, change Step 1 to the following:
1. Install Apache 2.4 and PHP 7.1 on Amazon Linux AMI
# Remove current apache & php
sudo yum remove httpd* php*
# Install Apache 2.4
sudo yum install httpd24
# Install PHP 7.1
sudo yum install php71
# Install additional commonly used php packages
sudo yum install php71-gd
sudo yum install php71-imap
sudo yum install php71-mbstring
sudo yum install php71-mysqlnd
sudo yum install php71-opcache
sudo yum install php71-pdo
sudo yum install php71-pecl-apcu
Basically replacing php70 with php71.
Continue with step 2 and the rest as per the original tutorial.
I followed below steps to install PHP7.1 which had already Nginx as web server for Amazon Linux AMI 2018.03
#Remove Old PHP
yum remove php*
#Update Reposistory
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
#Update Amazon AMI
yum upgrade -y
#Install PHP
#List of PHP packages https://webtatic.com/packages/php71/
yum install php71w php71w-cli php71w-fpm
yum install php71w-mysql php71w-xml php71w-curl
yum install php71w-opcache php71w-pdo php71w-gd
yum install php71w-pecl-apcu php71w-mbstring php71w-imap
yum install php71w-pecl-redis php71w-mcrypt
#change listen mode to CGI
sed -i 's/127.0.0.1:9000/\/tmp\/php5-fpm.sock/g' /etc/php-fpm.d/www.conf
/etc/init.d/php-fpm restart
touch /tmp/php5-fpm.sock
chmod 777 /tmp/php5-fpm.sock
service nginx restart
The reason I am still using /tmp/php5-fpm.sock file so that I do not need to change PHP7 sock file in all website nginx conf and assuming server do not have PHP5 as as on first step it has been removed.
A reliable way to achieve the same output is by following commands on Amazon Linux AMI 2.
# Remove current php & apache
sudo service httpd stop
sudo yum remove httpd* php*
sudo yum install httpd
amazon-linux-extras install php7.1

opencpu cloud server installation guide on ubuntu 16.04

Would anyone know or like to share their note on installing opencpu cloud server on ubuntu 16.04?
I thought it is easy, but we saw many error here and there when following the instructions. I am new to opencpu. And, I don't have much experience on apache and nignx.
Here is the long story:
I created a new and clean ubuntu 16.04 server from microsoft azure vm, and installed opencpu cloud server following:
# Requires Ubuntu 14.04 (Trusty) or 16.04 (Xenial)
sudo add-apt-repository -y ppa:opencpu/opencpu-1.6
sudo apt-get update
sudo apt-get upgrade
# Installs OpenCPU server
sudo apt-get install -y opencpu
The server reported insserv error when running opencpu init script
update-rc.d: error: insserv rejected the script header dpkg
We then did some goolge and fix around, we got apache2 running, but when called:
curl http://localhost/ocpu/info
received 404 error.
FYI, the single user server runs fine.
The solution we found is that opencpu need mod_R to be turned on from apache2:
sudo a2enmod R
You need first to change to dir:
/etc/apache2/mods-available
And, make sure R.load file exists.
After running a2enmod command, should see a link to R.load (R module) in
/etc/apache2/mods-enable
Thank you y g for your question and response .. I had the same problem i try what you have mentioned in your comment but
curl http://localhost/cpu/info
takes along time without no response.
Thank you.
I used opencpu 1.5 works without bugs on ubuntu 16.04
sudo add-apt-repository -y ppa:opencpu/opencpu-1.5
sudo apt-get update
sudo apt-get upgrade
Install R and then install opencpu
sudo apt-get install r-base r-base-dev
sudo apt-get install -y opencpu
Also you should probably install Rstudio for IDE access
sudo apt-get install rstudio-server
To login to R you'll need to make a new user - follow the prompts
sudo adduser myname
Now just to make sure its all working
sudo service opencpu restart
sudo service rstudio-server restart
And try something like to check if its working
curl -L -v localhost/ocpu/library/
which should return a list of packages now installed on Ubuntu like this
Final Screenshot

Resources