Installed Nginx with passenger-install-nginx-module. How do I uninstall it? - nginx

I'm on Mac OSX. Nginx is installed in /opt/nginx.
How do I uninstall it? Any thoughts?

gem uninstall passenger
will remove passenger and all these dependencies
passenger, passenger-install-apache2-module,
passenger-install-nginx-module, passenger-config, passenger-status,
passenger-memory-stats, passenger-make-enterprisey

Passenger's documentation covers this:
To uninstall Phusion Passenger, please first remove all Phusion Passenger configuration directives from your web server configuration file(s). After you’ve done this, you need to remove the Phusion Passenger files.
If you installed Phusion Passenger through Homebrew, then run brew uninstall passenger.
If you installed Phusion Passenger via a Ruby gem, then run gem uninstall passenger (or, if you’re a Phusion Passenger Enterprise user, gem uninstall passenger-enterprise-server). You might have to run this as root.
If you installed Phusion Passenger via a source tarball, then remove the directory in which you placed the extracted Phusion Passenger files. This directory is the same as the one pointed to the by PassengerRoot/passenger_root configuration directive.
If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.
Nginx does not have to be recompiled after uninstalling Phusion Passenger. Altough Nginx will contain the Phusion Passenger Nginx module, the module will not do anything when all Phusion Passenger configuration directives are removed.
At that point you can remove nginx by running
sudo rm -rf /opt/nginx
if you installed it using source.
Use your package manager to remove it if you installed it that way.

Run following command from your terminal:
For Debian/Ubuntu
sudo apt-get remove -y passenger
Red Hat/CentOS
sudo yum remove -y passenger
macOS + Homebrew
brew uninstall passenger
Ruby gem
gem uninstall passenger

Related

php7.0-mcrypt can't install on ubuntu14.04

phpmyadmin show error [ The mcrypt extension is missing. Please check your PHP configuration.] on nginx. My PHP version is PHP 7.0.33-1+ubuntu14.04.1+deb.sury.org+1 (cli).
When I install php7.0-mcrypt, package doesn't exist.How to install php7.0-mcrypt?
As I understand from your message, you're using ubuntu 14.04. I recommend you upgrade your system. You could find this package in some latest reseases.
Or you could install this package manually wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/p/php7.0/php7.0-mcrypt_7.0.33-0ubuntu0.16.04.4_amd64.deb && sudo dpkg -i php7.0-mcrypt_7.0.33-0ubuntu0.16.04.4_amd64.deb. But be careful, you could face some dependency hell and damage your OS.

Should I be installing Nginx from source or PPA?

Nginx source seems far different from the Nginx PPA. Mostly the way PHP is configured, and the different sites-available config. Should I be installing the source version, or the Nginx from the PPA?
It's up to your need as per the reason below.
from PPA. This is a quick and easy way to install NGINX Open Source. The package includes almost all NGINX official modules and is available for most popular operating systems. See Installing a Pre-Built Package for details.
compiled from the sources. This way is more flexible: you can add particular modules including 3rd party modules or apply latest security patches. See Compiling and Installing From the Sources for details.
I almost always select PPA option as I just need it as is, and I don't have to deal with compilation dependencies or ./configure command line options :-).
Here is what I did for installing on Ubuntu 14.04
$ sudo vi /etc/apt/sources.list
>>> add 'deb http://nginx.org/packages/ubuntu/ trusty nginx' to your package source list
$ wget -q http://nginx.org/keys/nginx_signing.key -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install nginx
Just replace trusty with with whatever Ubuntu version codename applicable.

Symfony 2.8 issue when i run config.php

when i access config.php in my browser i have following issue.
Configuration Checker
This script analyzes your system to check whether is ready to run Symfony applications.
RECOMMENDATIONS
To enhance your Symfony experience, it’s recommended that you fix the following:
intl ICU version installed on your system is outdated (4.2.1) and does not match the ICU data bundled with Symfony (57.1)
To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.
Try to install driver by :
if you use php5 do:
sudo apt-get install php5-intl
if you use php7 :
sudo apt-get install php7.0-intl
After restart apache
sudo /etc/init.d/apache2 restart

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

C compiler gcc not found while installing passenger and nginx

I'm trying to install Passenger and Nginx on my VPS.
I followed these instructions and replaced all links of all sources to the current version.
But when i ran the Phusion Passenger installer for Nginx, something with gcc compiler went wrong:
Compiling and installing Nginx...
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --add-module='/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/ext/nginx'
checking for OS
+ Linux 2.6.32-220.el6.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler gcc is not found
What should I do?
OBS: My VPS works with CentOS 6.2 x64
Have the same problem and the following commands solve it; (on ubuntu server)
sudo apt-get install linux-kernel-headers
sudo apt-get install build-essential
If you do have gcc installed, the problem stems from /tmp being mounted as noexec. The error doesn't exactly help, but if you remount /tmp as exec you can install passenger properly.
mount -o remount,rw,exec,nosuid /tmp
Got the same error. Just installed gcc and it started working:
yum install gcc
same problem here and I found out that I am not able to run command as root
has to use
sudo
and it worked like charm
Be sure that you sudo, if applicable.
Example:
sudo ./configure ...
One quick hack (I struggled a lot with it and finally install pre-built) is to install the pre-built package of Nginx rather than compiling it from source.
For RHEL/CentOS create the file named /etc/yum.repos.d/nginx.repo with the following contents:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
gpgcheck=0
enabled=1
In above baseurl replace “OS” with “centos” and “OSRELEASE” with “6”.
Finally execute yum install nginx
Reference https://nginx.org/en/linux_packages.html#stable

Resources