Nginx update on ubuntu fails - nginx

I am not nginx expert and having problems in configuring it.
Examples I found on web are slightly different so I wanted to update nginx 1.05 to 1.4.1 to see if it helps.
I have found instructions to install nginx from PPA as
apt-get install python-software-properties
add-apt-repository ppa:nginx/stable
apt-get update
apt-get install nginx
It seems as is it has installed but nginx -v is still telling me I have 1.0.5
What I missed?
Using ubuntu 11.10
Thanks

NGINX maintains is own apt repository which means you don't need to use the PPA.
Firstly remove the added ppa:
sudo add-apt-repository --remove ppa:nginx/stable
Then, if you're not running anything critical through nginx I would suggest running apt-get remove --purge nginx to completely remove nginx.
To use NGINX's repository add the following to `/etc/apt/sources.list.d/nginx.list':
deb http://nginx.org/packages/ubuntu/ oneiric nginx
deb-src http://nginx.org/packages/ubuntu/ oneiric nginx
Then run apt-get update. Then reinstall using apt-get install nginx.
Hope that works.

Related

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

NginX still running when uninstalled it

I have tried to uninstall NGinX from my Ubuntu using following command:
sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras nginx-common
I have used below command as well
sudo apt-get remove --purge nginx*
And still see below screen when I check NginX processes running.
What is happening??
Try to run sudo killall nginx.
Try to clear the web browser cache. It works for me.

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

Upgrading nginx on Centos 6.8

I'm trying to update Nginx on Centos 6.8. I tried
sudo vi /etc/yum.repos.d/nginx.repo
and then changing the nginx.repo to
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
and then ran:
sudo yum update && sudo yum install nginx
But when I check the version with nginx -v, it's still version 1.9.2.
I also tried quitting and reloading, but neither did anything.
Also tried:
cd /opt
wget http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.10.1-1.el6.ngx.x86_64.rpm
yum update nginx-1.10.1-1.el6.ngx.x86_64.rpm
Could someone point me in the right direction?
Download the latest epel-release rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/
Install epel-release rpm:
# rpm -Uvh epel-release*rpm
Install nginx rpm package:
# yum --enablerepo=epel-testing install nginx

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/ .

Resources