VMware Images:
|
Installing Nginx With PHP5 And MySQL Support On Debian Etch
Installing Nginx With PHP5 And MySQL Support On Debian EtchVersion 1.0 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 Etch server with PHP5 support (through FastCGI) and MySQL support. I do not issue any guarantee that this will work for you!
1 Preliminary NoteIn this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate. I've compiled this guide from three different sources and filled in my own bits and pieces:
2 Installing MySQL 5.0First we install MySQL 5.0 like this: apt-get install mysql-server mysql-client Create a password for the MySQL user root (replace yourrootsqlpassword with the password you want to use): mysqladmin -u root password yourrootsqlpassword Then check with netstat -tap | grep mysql on which addresses MySQL is listening. If the output looks like this: tcp 0 0 localhost.localdo:mysql *:* LISTEN 2713/mysqld which means MySQL is listening on localhost.localdomain only, then you're safe with the password you set before. But if the output looks like this: tcp 0 0 *:mysql *:* LISTEN 2713/mysqld you should set a MySQL password for your hostname, too, because otherwise anybody can access your database and modify data: mysqladmin -h server1.example.com -u root password yourrootsqlpassword
3 Installing NginxNginx is available as a package for Debian Etch, but it's ancient (version 0.4.13), while the latest stable version is 0.6.34. Therefore I build nginx from the sources. First we install some prerequisites: apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev build-essential Then we download nginx and uncompress it (you can find the latest stable release on http://nginx.net/): cd /tmp You can run ./configure --help to find out about all configuration options. I use the following configure statement... ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module ... and run make afterwards to complete the installation. This will create the directory /usr/local/nginx which contains the configuration files, logs, and the default web site (in /usr/local/nginx/html). Next we create the nginx init script: vi /etc/init.d/nginx
Make the file executable and start nginx: chmod 755 /etc/init.d/nginx Type in your web server's IP address or hostname into a browser (e.g. http://192.168.0.100), and you should see the nginx welcome page: To make nginx start at boot time, run update-rc.d nginx defaults
|





print: 
Recent comments
15 hours 58 min ago
17 hours 12 min ago
20 hours 28 min ago
22 hours 35 min ago
1 day 58 min ago
1 day 1 hour ago
1 day 6 hours ago
1 day 6 hours ago
1 day 10 hours ago
1 day 10 hours ago