NGINX 1.9.11 z modułami na Debian / Ubuntu / CentOS i innych

LA36089LOGO

Witam was,

nginx znowu wydał aktualizację, tym razem postanowiłem zaktualizowć także moduły.
Z racji iż nowa wersja GooglePageSpeed (1.10.x) wymaga do kompilacji minimum gcc w wersji 4.8 – zabrakło tutaj Debana 7.

Ponadto – dodane zostały nowe moduły: srcache-nginx-module, memc-nginx-module

Przygotowałem dla was gotowe pliki (źródła) z moimi konfiguracjami.

 

Całośc opracowana do pracy z systemami: Debian 8 / Ubuntu 12.04 / Ubuntu 14.04 / Ubuntu 15.10 / Fedora 19 / Fedora20 / CentOS 7 / CentOS 6 oraz OpenSUSE

  • mail, mail_ssl_module
  • stream
  • stream_ssl_module
  • threads
  • ore-nginx-module
  • auth-pam
  • cache-purge
  • dav-ext-module
  • development-kit
  • echo
  • fancyindex
  • http-push
  • lua
  • upload-progress
  • upstream-fair
  • ubstitutions_filter
  • module-vts
  • pagespeed-1.9.32.10
  • redis2
  • srcache-nginx-module
  • memc-nginx-module
  • pcre-jit
  • with-ipv6
  • ssl_module
  • stub_status
  • realip
  • auth_request
  • addition
  • dav
  • flv
  • geoip
  • gunzip
  • gzip_static
  • image_filter
  • mp4
  • perl
  • random_index
  • secure_link
  • xslt
  • sub
  • http/2

 

Ubuntu 12.04 – nginx 1.9.11 (mainline)

add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev unzip curl libcurl4-openssl-dev libossp-uuid-dev autotools-dev libexpat-dev libgd2-noxpm-dev libgeoip-dev liblua5.1-dev libmhash-dev libpam0g-dev libperl-dev libxslt1-dev debhelper -y

apt-get install gcc-4.8 g++-4.8 -y
update-alternatives --remove-all gcc 
update-alternatives --remove-all g++
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
update-alternatives --config gcc
update-alternatives --config g++

cd /root/
mkdir ~/custom-nginx
cd ~/custom-nginx
wget http://repo.linuxiarz.pl/NGINX-1.9.11-UNIX_NEW.tar.gz
tar xvf NGINX-1.9.11-UNIX_NEW.tar.gz
rm -rf NGINX-1.9.11-UNIX_NEW.tar.gz
cd nginx-*
./configure.sh
make
make install
cd ~

wget http://pliki.linuxiarz.pl/01-2016/nginx_start -O /etc/init.d/nginx
chmod +x /etc/init.d/nginx

rm -rf /etc/nginx/
cd /root/ ; mkdir nginx
cd nginx ; wget http://pliki.linuxiarz.pl/01-2016/nginx_cfg1.zip
unzip nginx_cfg1.zip ; cd /root
mv nginx /etc/
mkdir -p /var/www/
mkdir -p /var/cache/nginx/client_temp

service nginx start

Domyślny katalog www: /var/www/em

Debian 8 / Ubuntu 14.04 – nginx 1.9.11

apt-get update
apt-get update; apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev unzip curl libcurl4-openssl-dev libossp-uuid-dev nano curl git autotools-dev debhelper dh-systemd libexpat-dev libgd-dev libgeoip-dev libluajit-5.1-dev liblua5.1-0-dev libmhash-dev libpam0g-dev libperl-dev libxslt1-dev po-debconf libssl-dev -y

wget http://repo.linuxiarz.pl/NGINX-1.9.11-custom.tar.gz
tar xvf  NGINX-1.9.11-custom.tar.gz
rm NGINX-1.9.11-custom.tar.gz 
cd nginx-1.9.* 
dpkg-buildpackage -b
cd .. 
dpkg -i nginx-common_1.9.*.deb nginx_1.9.*.deb nginx-extras_1.9.*.deb

# START - DEBIAN 8
systemctl start nginx

# START - UBUNTU 14.04
service nginx start

Domyślny katalog www: /usr/share/nginx/html

Ubuntu 15.04/15.10 – nginx 1.9.11

sudo apt-get update
sudo apt-get install fontconfig-config fonts-dejavu-core libfontconfig1 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 liblua5.1-0 libperl5.20 libtiff5 libxpm4 libxslt1.1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python2.7 python2.7-minimal fcgiwrap ssl-cert libossp-uuid16 -y

## PACZKI: 
# http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.11-OUT-OF-THE-BOX-linuxiarz.pl/

# MAINLINE
wget http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.11-OUT-OF-THE-BOX-linuxiarz.pl/nginx-common_1.9.11-1-linuxiarz.pl_all.deb
wget http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.11-OUT-OF-THE-BOX-linuxiarz.pl/nginx_1.9.11-1-linuxiarz.pl_all.deb
wget http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.11-OUT-OF-THE-BOX-linuxiarz.pl/nginx-extras_1.9.11-1-linuxiarz.pl_amd64.deb
wget http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.11-OUT-OF-THE-BOX-linuxiarz.pl/nginx-doc_1.9.11-1-linuxiarz.pl_all.deb
sudo dpkg --install *.deb
sudo service nginx restart

Domyślny katalog www: /usr/share/nginx/html

CentOS 6 – nginx 1.9.11

http://linuxiarz.pl/1874/centos-6-nginx-mariadb-phpmyadmin/

CentOS 7 – nginx 1.9.11

setenforce 0
useradd nginx
yum install epel-release -y 
yum install wget curl unzip gcc-c++ pcre-devel zlib-devel openssl-devel lua-devel make -y
cd /root/
mkdir ~/custom-nginx
cd ~/custom-nginx
wget http://repo.linuxiarz.pl/NGINX-1.9.11-UNIX_NEW.tar.gz
tar xvf NGINX-1.9.11-UNIX*.tar.gz
rm -rf NGINX-1.9.11-UNIX*.tar.gz
cd nginx-*
wget http://pliki.linuxiarz.pl/11-2015/configure_c7_ng_0.sh -O configure.sh
chmod +x configure.sh
bash configure.sh
make
make install
cd ~
mkdir -p /var/www
chown nginx:nginx -R /var/www

rm -rf /etc/nginx/
cd /root/ ; mkdir nginx
cd nginx ; wget http://pliki.linuxiarz.pl/01-2016/nginx_cfg2.zip
unzip nginx_cfg2.zip ; cd /root
mv nginx /etc/

wget http://pliki.linuxiarz.pl/11-2015/nginx-init.d_centos -O  /etc/init.d/nginx
chmod +x /etc/init.d/nginx
/etc/init.d/nginx start

Domyślny katalog www: /var/www

Fedora 19 – nginx 1.9.11

useradd nginx
yum install epel-release -y 
yum install wget curl unzip gcc-c++ pcre-devel zlib-devel openssl-devel lua-devel make -y
cd /root/
mkdir ~/custom-nginx
cd ~/custom-nginx
wget http://repo.linuxiarz.pl/NGINX-1.9.11-UNIX_NEW.tar.gz
tar xvf NGINX-1.9.11*.tar.gz
rm -rf NGINX-1.9.11*.tar.gz
cd nginx-*
rm configure.sh -rf
wget http://pliki.linuxiarz.pl/01-2016/nginx_config_fedora2.sh -O configure.sh
chmod +x configure.sh
bash configure.sh
make
make install
cd ~
mkdir -p /var/www
useradd nginx
chown nginx:nginx -R /var/www
rm -rf /etc/nginx/
cd /root/ ; mkdir nginx
cd nginx ; wget http://pliki.linuxiarz.pl/01-2016/nginx_cfg2.zip
unzip nginx_cfg2.zip ; cd /root
mv nginx /etc/

wget http://pliki.linuxiarz.pl/11-2015/nginx-init.d_centos -O  /etc/init.d/nginx
chmod +x /etc/init.d/nginx
/etc/init.d/nginx start

Domyślny katalog www: /var/www

Fedora 20 – nginx 1.9.11

useradd nginx
yum install epel-release -y 
yum install wget curl unzip gcc-c++ pcre-devel zlib-devel openssl-devel lua-devel make -y
cd /root/
mkdir ~/custom-nginx
cd ~/custom-nginx
wget http://repo.linuxiarz.pl/NGINX-1.9.11-UNIX_NEW.tar.gz
tar xvf NGINX-1.9.11*.tar.gz
rm -rf NGINX-1.9.11*.tar.gz
cd nginx-*
rm configure.sh -rf
wget http://pliki.linuxiarz.pl/01-2016/nginx_config_fedora2.sh -O configure.sh
chmod +x configure.sh
bash configure.sh
make
make install
cd ~

rm -rf /etc/nginx/
cd /root/ ; mkdir nginx
cd nginx ; wget http://pliki.linuxiarz.pl/01-2016/nginx_cfg2.zip
unzip nginx_cfg2.zip ; cd /root
mv nginx /etc/

mkdir -p /var/www
chown nginx:nginx -R /var/www

Domyślny katalog www: /var/www

Fedora 23 – nginx 1.9.11

useradd nginx
dnf install wget curl unzip gcc-c++ pcre-devel zlib-devel openssl-devel lua-devel make -y
cd /root/
mkdir ~/custom-nginx
cd ~/custom-nginx
wget http://repo.linuxiarz.pl/NGINX-1.9.11-UNIX_NEW.tar.gz
tar xvf NGINX-1.9.11*.tar.gz
rm -rf NGINX-1.9.11*.tar.gz
cd nginx-*
rm configure.sh -rf
wget http://pliki.linuxiarz.pl/01-2016/nginx_config_fedora2.sh -O configure.sh
chmod +x configure.sh
bash configure.sh
make
make install
cd ~

rm -rf /etc/nginx/
cd /root/ ; mkdir nginx
cd nginx ; wget http://pliki.linuxiarz.pl/01-2016/nginx_cfg2.zip
unzip nginx_cfg2.zip ; cd /root
mv nginx /etc/
wget http://pliki.linuxiarz.pl/02-2016/nginx.service -O /lib/systemd/system/nginx.service

mkdir -p /var/www
mkdir "/var/cache/nginx/client_temp" -p
chown nginx:nginx -R /var/www

sed -i s'/fastcgi_pass unix:\/var\/run\/php5-fpm.sock/fastcgi_pass unix:\/run\/php-fpm\/www.sock/' /etc/nginx/php.conf

Domyślny katalog www: /var/www

OpenSUSE – nginx 1.9.11

zypper install nano wget curl unzip gcc-c++ pcre-devel zlib-devel openssl-devel make -y

mkdir ~/custom-nginx
cd ~/custom-nginx
wget http://repo.linuxiarz.pl/NGINX-1.9.11-UNIX_NEW.tar.gz
tar xvf NGINX-1.9.11-UNIX*.tar.gz
cd nginx-*
rm configure.sh
wget wget http://nginx.linuxiarz.pl/opensuse/config.sh -O configure.sh
chmod +x configure.sh
bash configure.sh
make
make install

rm -rf /etc/nginx/
cd /root/ ; mkdir nginx
cd nginx ; http://pliki.linuxiarz.pl/01-2016/nginx_cfg3.zip
nginx_cfg3.zip ; cd /root
mv nginx /etc/
mkdir -p /var/www/
mkdir /var/cache/nginx/client_temp -p

nginx -c /etc/nginx/nginx.conf

Domyślny katalog www: /var/www

Poradnik powstał dzięki OVH.pl/cloud:
cloud