Mudanças entre as edições de "Nginx"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
Linha 2: Linha 2:
  
 
<source lang="bash">
 
<source lang="bash">
apt-get install libpcre3-dev libssl-dev build-essential php5-cgi
+
apt-get install libpcre3-dev libssl-dev build-essential php5-cgi
cd /usr/src
+
cd /usr/src
wget -c http://nginx.org/download/nginx-0.8.54.tar.gz
+
wget -c http://nginx.org/download/nginx-0.8.54.tar.gz
tar zxvf nginx-0.8.54.tar.gz
+
tar zxvf nginx-0.8.54.tar.gz
cd nginx-0.8.54/
+
cd nginx-0.8.54/
wget http://download.snake.de/dist/ngx-fancyindex-0.3.tar.gz
+
wget http://download.snake.de/dist/ngx-fancyindex-0.3.tar.gz
tar zxvf ngx-fancyindex-0.3.tar.gz
+
tar zxvf ngx-fancyindex-0.3.tar.gz
./configure --prefix=/usr/local/nginx --user=www-data --group=www-data \
+
./configure --prefix=/usr/local/nginx --user=www-data --group=www-data \
--without-mail_pop3_module --without-mail_imap_module --with-sha1=/usr/lib \
+
--without-mail_pop3_module --without-mail_imap_module --with-sha1=/usr/lib \
--without-mail_smtp_module --with-http_stub_status_module \
+
--without-mail_smtp_module --with-http_stub_status_module \
--with-http_ssl_module --http-log-path=/var/log/nginx/access.log \
+
--with-http_ssl_module --http-log-path=/var/log/nginx/access.log \
--conf-path=/etc/nginx/nginx.conf  --pid-path=/var/run/nginx.pid \
+
--conf-path=/etc/nginx/nginx.conf  --pid-path=/var/run/nginx.pid \
--add-module=ngx-fancyindex-0.3
+
--add-module=ngx-fancyindex-0.3
make
+
make
make install
+
make install
cd /usr/src
+
cd /usr/src
wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
+
wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
tar -xf spawn*
+
tar -xf spawn*
cd spawn*
+
cd spawn*
./configure
+
./configure
make
+
make
cp src/spawn-fcgi /usr/bin/spawn-fcgi
+
cp src/spawn-fcgi /usr/bin/spawn-fcgi
wget http://pub.nkosi.org/nginx/iredmail/nginx-init
+
wget http://pub.nkosi.org/nginx/iredmail/nginx-init
wget http://pub.nkosi.org/nginx/iredmail/php-fastcgi-bin
+
wget http://pub.nkosi.org/nginx/iredmail/php-fastcgi-bin
wget http://pub.nkosi.org/nginx/iredmail/php-fastcgi-init
+
wget http://pub.nkosi.org/nginx/iredmail/php-fastcgi-init
wget http://pub.nkosi.org/iredmail/nginx-logrotate
+
wget http://pub.nkosi.org/iredmail/nginx-logrotate
wget http://pub.nkosi.org/iredmail/nginx.conf
+
wget http://pub.nkosi.org/iredmail/nginx.conf
mkdir /etc/nginx/sites-enabled
+
mkdir /etc/nginx/sites-enabled
mv nginx.conf /etc/nginx/
+
mv nginx.conf /etc/nginx/
mv nginx-init /etc/init.d/nginx
+
mv nginx-init /etc/init.d/nginx
mv php-fastcgi-bin /usr/bin/php-fastcgi
+
mv php-fastcgi-bin /usr/bin/php-fastcgi
mv php-fastcgi-init /etc/init.d/php-fastcgi
+
mv php-fastcgi-init /etc/init.d/php-fastcgi
mv nginx-logrotate /etc/logrotate.d/nginx
+
mv nginx-logrotate /etc/logrotate.d/nginx
chmod 755 /etc/init.d/nginx
+
chmod 755 /etc/init.d/nginx
chmod a+x /usr/bin/php-fastcgi
+
chmod a+x /usr/bin/php-fastcgi
chmod 755 /etc/init.d/php-fastcgi
+
chmod 755 /etc/init.d/php-fastcgi
update-rc.d php-fastcgi defaults
+
update-rc.d php-fastcgi defaults
update-rc.d nginx defaults
+
update-rc.d nginx defaults
 
</source>
 
</source>
  

Edição das 12h58min de 5 de janeiro de 2011

-> nginx (compilado) + spawn-fcgi (php-fastcgi)

apt-get install libpcre3-dev libssl-dev build-essential php5-cgi
cd /usr/src
wget -c http://nginx.org/download/nginx-0.8.54.tar.gz
tar zxvf nginx-0.8.54.tar.gz
cd nginx-0.8.54/
wget http://download.snake.de/dist/ngx-fancyindex-0.3.tar.gz
tar zxvf ngx-fancyindex-0.3.tar.gz
./configure --prefix=/usr/local/nginx --user=www-data --group=www-data \
--without-mail_pop3_module --without-mail_imap_module --with-sha1=/usr/lib \
--without-mail_smtp_module --with-http_stub_status_module \
--with-http_ssl_module --http-log-path=/var/log/nginx/access.log \
--conf-path=/etc/nginx/nginx.conf  --pid-path=/var/run/nginx.pid \
--add-module=ngx-fancyindex-0.3
make
make install
cd /usr/src
wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
tar -xf spawn*
cd spawn*
./configure
make
cp src/spawn-fcgi /usr/bin/spawn-fcgi
wget http://pub.nkosi.org/nginx/iredmail/nginx-init
wget http://pub.nkosi.org/nginx/iredmail/php-fastcgi-bin
wget http://pub.nkosi.org/nginx/iredmail/php-fastcgi-init
wget http://pub.nkosi.org/iredmail/nginx-logrotate
wget http://pub.nkosi.org/iredmail/nginx.conf
mkdir /etc/nginx/sites-enabled
mv nginx.conf /etc/nginx/
mv nginx-init /etc/init.d/nginx
mv php-fastcgi-bin /usr/bin/php-fastcgi
mv php-fastcgi-init /etc/init.d/php-fastcgi
mv nginx-logrotate /etc/logrotate.d/nginx
chmod 755 /etc/init.d/nginx
chmod a+x /usr/bin/php-fastcgi
chmod 755 /etc/init.d/php-fastcgi
update-rc.d php-fastcgi defaults
update-rc.d nginx defaults

iniciando serviços

/etc/init.d/php-fastcgi start
/etc/init.d/nginx start

parando serviços

/etc/init.d/php-fastcgi stop
/etc/init.d/nginx stop