Results 1 to 6 of 6
-
15th Oct 2011, 03:58 AM #1OPMemberWebsite's:
vjetnamnet.com nguoihaiduong.com filezdown.comHowsto: Step-by-step Installing Nginx work with DLE 9.3
In this tutorial, I will do step-by-step guide you can manually install a web server using nginx with php5 and mysql server and to configure nginx to run a website using DLE. This article is suitable for what you are using linux vps with debian 6.0 system (Squeeze) and want to run your website using DLE script.Installing Nginx With PHP5 (Use spawn-fcgi program as FastCGI Daemon) And MySQL Support On Debian Squeeze
Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on a Debian Squeeze server with PHP5 support (through FastCGI) and MySQL support.
Step 1: Installing MySQL 5
To install MySQL, we run:
Code:#apt-get install mysql-server mysql-client
You will be asked to provide a password for the MySQL root user and enter your password.
Step 2: Installing PHP5
We can make PHP5 work in nginx through FastCGI. Fortunately, Debian Squeeze provides a FastCGI-enabled PHP5 package which we install like this (together with some PHP5 modules like php5-mysql which you need if you want to use MySQL from your PHP scripts):
Code:#apt-get install php5-cgi php5-mysql
And you can install add more packet support for php5
Code:#apt-get install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
Installing APC
APC is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It's similar to other PHP opcode cachers, such as eAccelerator and XCache. It is strongly recommended to have one of these installed to speed up your PHP page.
APC can be installed as follows:
Code:#apt-get install php-apc
Code:#vi /etc/php5/cgi/php.ini
Code:; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting ; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting ; of zero causes PHP to behave as before. Default is 1. You should fix your scripts ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. ; http://php.net/cgi.fix-pathinfo cgi.fix_pathinfo=1 [...]
Step 3: Installing Nginx (Web Server)
Nginx is available as a package for Debian Squeeze which we can install as follows:
Code:#apt-get install nginx
Start nginx afterwards:
Code:#/etc/init.d/nginx start
The default nginx document root is /var/www which does not exist yet; therefore we must create it as follows:
Code:#mkdir /var/www #chown www-data:www-data /var/www
Type in your web server's IP address or hostname into a browser (e.g. http://192.168.1.10), and you should see the following page:
Step 4: Install spawn-fcgi and make Spawning a FastCGI Process
Code:#apt-get install spawn-fcgi
Code:#vi /etc/init.d/php-fastcgi
Code:#!/bin/bashBIND=127.0.0.1:9000USER=www-dataPHP_FCGI_CHILDREN=15PHP_FCGI_MAX_REQUESTS=1000 PHP_CGI=/usr/bin/php-cgiPHP_CGI_NAME=`basename $PHP_CGI`PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"RETVAL=0 start() { echo -n "Starting PHP FastCGI: " start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS RETVAL=$? echo "$PHP_CGI_NAME."}stop() { echo -n "Stopping PHP FastCGI: " killall -q -w -u $USER $PHP_CGI RETVAL=$? echo "$PHP_CGI_NAME."} case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "Usage: php-fastcgi {start|stop|restart}" exit 1 ;;esacexit $RETVAL
Code:http://pastebin.com/mDK9J2en
Save this to /etc/init.d/ (or wherever your init scripts are) as php-fcgi. Install the usual way (e.g. for Debian/Ubuntu: update-rc.d php-fcgi defaults) and start it.
Code:#chmod +x /etc/init.d/php-fastcgi #update-rc.d php-fastcgi defaults # /etc/init.d/php-fastcgi start
The nginx configuration is in /etc/nginx/nginx.conf which we open now:
Code:#vi /etc/nginx/nginx.conf
The configuration is easy to understand (you can learn more about it here: http://wiki.codemongers.com/NginxFullExample and here: http://wiki.codemongers.com/NginxFullExample2)
First (this is optional) increase the number of worker processes and set the keepalive_timeout to a reasonable value:
Code:[...]worker_processes 5;[...] keepalive_timeout 2;[...]
Code:#vi /etc/nginx/sites-available/default
To view this code click this link:Code:http://pastebin.com/8zY5P3C1
Now save the file and restart nginx:
Code:#/etc/init.d/nginx restart
I am currently selling cheap vps installed operating system debian to install webserver Nginx.
if you need can contact me through yahoo. My Y!M id: thanhtodaythanhlangso Reviewed by thanhlangso on . Howsto: Step-by-step Installing Nginx work with DLE 9.3 Installing Nginx With PHP5 (Use spawn-fcgi program as FastCGI Daemon) And MySQL Support On Debian Squeeze In this tutorial, I will do step-by-step guide you can manually install a web server using nginx with php5 and mysql server and to configure nginx to run a website using DLE. This article is suitable for what you are using linux vps with debian 6.0 system (Squeeze) and want to run your website using DLE script. Nginx (pronounced "engine x") is a free, open-source, high-performance Rating: 5
-
15th Oct 2011, 04:41 AM #2Member
Thanks bro, very nice share
=> Selling ==> Top Level Domains ==>FileHosting.pro and CyberLocker.pro
-
30th Oct 2011, 02:42 AM #3MemberWebsite's:
host4offshore.comdude what about dle mod_rewrite code you have dle mod_rewrite code for nginx?
|| Host4Offshore :: Reliable, Quality, Fast Offshore Hosting Solution (USA/Netherlands/Sweden/Russia/Romania)
|| Shared , Reseller Hosting Sales Thread
|| Rapidleech Hosting Sales Thread
|| Current Promotion
-
30th Oct 2011, 02:46 AM #4
-
30th Oct 2011, 06:21 AM #5Banned
i am Using a shell script to install nignx php mysql,but it is for centos
-
3rd Nov 2011, 08:08 PM #6BannedWebsite's:
LeechJungle.infonice dude.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Creating an Online Business - Step By Step Formula to Make Money
By GarryField in forum Webmasters, Money MakingReplies: 0Last Post: 4th Mar 2014, 11:48 AM -
[Tutorial] How To Rip **Upscalling DVD to 720p** Step By Step Guide
By CyberAff in forum Tutorials and GuidesReplies: 28Last Post: 8th Nov 2012, 06:53 AM -
How To Encode Movies *700MB To 300MB* Step By Step
By CyberAff in forum Tutorials and GuidesReplies: 246Last Post: 28th Oct 2012, 07:02 AM -
Add Bank Account to Alert pay ? ( offer 5$ for step by step guide)
By ashokbansal in forum PayzaReplies: 8Last Post: 18th Apr 2012, 01:58 PM -
Step-by-Step Guide to Changing Web Hosting Providers
By navnum in forum Tutorials and GuidesReplies: 0Last Post: 7th Jan 2012, 01:22 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...