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

LA36089LOGO

Witam was,

nginx 24.02.2016 – został zaktualizowany do wersji 1.9.12

Changelog:

Changes with nginx 1.9.12                                        24 Feb 2016

    *) Feature: Huffman encoding of response headers in HTTP/2.
       Thanks to Vlad Krasnov.

    *) Feature: the "worker_cpu_affinity" directive now supports more than
       64 CPUs.

    *) Bugfix: compatibility with 3rd party C++ modules; the bug had
       appeared in 1.9.11.
       Thanks to Piotr Sikora.

    *) Bugfix: nginx could not be built statically with OpenSSL on Linux;
       the bug had appeared in 1.9.11.

    *) Bugfix: the "add_header ... always" directive with an empty value did
       not delete "Last-Modified" and "ETag" header lines from error
       responses.

    *) Workaround: "called a function you should not call" and "shutdown
       while in init" messages might appear in logs when using OpenSSL
       1.0.2f.

    *) Bugfix: invalid headers might be logged incorrectly.

    *) Bugfix: socket leak when using HTTP/2.

    *) Bugfix: in the ngx_http_v2_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.10.33.4
  • 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.12 (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.12-UNIX.tar.gz
tar xvf NGINX-1.9.1*.tar.gz
rm -rf NGINX-1.9.1*.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.12

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.12-custom.tar.gz
tar xvf  NGINX-1.9.1*.tar.gz
rm NGINX-1.9.1*.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.12

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.12-OUT-OF-THE-BOX-linuxiarz.pl/

# MAINLINE
wget http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.12-OUT-OF-THE-BOX-linuxiarz.pl/nginx-common_1.9.12-1-linuxiarz.pl_all.deb
wget http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.12-OUT-OF-THE-BOX-linuxiarz.pl/nginx_1.9.12-1-linuxiarz.pl_all.deb
wget http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.12-OUT-OF-THE-BOX-linuxiarz.pl/nginx-extras_1.9.12-1-linuxiarz.pl_amd64.deb
wget http://kompilacje.linuxiarz.pl/Ubuntu_15.10/nginx-1.9.12-OUT-OF-THE-BOX-linuxiarz.pl/nginx-doc_1.9.12-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.12

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

CentOS 7 – nginx 1.9.12

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.12-UNIX.tar.gz
tar xvf NGINX-1.9.1*.tar.gz
rm -rf NGINX-1.9.1*.tar.gz
cd nginx-*
./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.12

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.12-UNIX.tar.gz
tar xvf NGINX-1.9.1*.tar.gz
rm -rf NGINX-1.9.1*.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.12

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.12-UNIX.tar.gz
tar xvf NGINX-1.9.1*.tar.gz
rm -rf NGINX-1.9.1*.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.12

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.12-UNIX.tar.gz
tar xvf NGINX-1.9.1*.tar.gz
rm -rf NGINX-1.9.1*.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.12

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.12-UNIX.tar.gz
tar xvf NGINX-1.9.1*.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