How to setup node.js, mongodb, and git server with Debian 7 "Wheezy".
Installing Linux is not a complex task, what you need is only to follow instructions and have basic understanding on the computer software and hardware. Of course, correct installation and maintaining of a Linux server may be complicated but nobody starts with a large datacenter - everyone starts from something smaller and here is an instruction on how to setup a Debian web-server and do not damage your computer.
If you are a software developer (like the most of my site readers), you may know that server side scripts are executed by the web server. Most famous of them is Apache, but many people nowadays consider nginx as alternative and some even use node.js with its build-in server.
In this set of instructions I will show how to quickly install and configure Debian Linux server with node.js behind nginx with mongodb backend.
Experimenting with a real hard disk, especially with the hard disk of your primary computer, usually is not a good idea. I recommend using some virtualization software (VirtualBox, VMWare Player, or Virtual PC) to install the Debian Linux on the virtual machine.
Some notes on the server infrastructure:
- nginx - installed from the nginx.org repository and sends requests to node.js applications.
- node.js - installed from sources, application ports start from 3001
- mongodb - installed from official mongodb repository
- one user per application (virtual host)
- deploying applications via git
- Creating Virtual Machine for Debian Linux
- Installing Base System
- Secure the Server
- Send-only Mail Server with Exim
- Install nginx
- Install node.js
- Install mongodb
- Install PHP and MySQL
Working with the server: