Skip to content

Instantly share code, notes, and snippets.

@julesbou
Last active September 9, 2019 09:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save julesbou/3636113 to your computer and use it in GitHub Desktop.
Save julesbou/3636113 to your computer and use it in GitHub Desktop.
Debian 6.0 (Squeeze) 64 bits - (NodeJS/Nginx/Mongodb) - Suited for Frontend/Backend
###
### Debian configuration
###
# --- Bashrc ---
echo "
# Prompt colors
NM=\"\[\033[0;38m\]\"
HI=\"\[\033[0;37m\]\"
HII=\"\[\033[0;36m\]\"
SI=\"\[\033[0;33m\]\"
IN=\"\[\033[0m\]\"
export PS1=\"\$NM[ \$HI\u \$HII\h \$SI\w\$NM ] \$IN\"
# List colors
export LS_OPTIONS='--color=auto'
eval \"\`dircolors\`\"
alias ls='ls \$LS_OPTIONS'
alias ll='ls \$LS_OPTIONS -l'
alias l='ls \$LS_OPTIONS -lA'
" >> ~/.bashrc
# --- Essentials
dpkg --configure -a
apt-get update && apt-get install rake curl build-essential openssl libssl-dev
# --- Gem ---
apt-get install gem
aptitude install libgemplugin-ruby
apt-get install ruby-dev
gem install rake
# --- Git ---
apt-get install git
# TODO add .gitconfig with aliases
# --- Java ---
echo -e "\ndeb http://ftp2.de.debian.org/debian squeeze main non-free\n" >> /etc/apt/sources.list
apt-get update
apt-cache search sun-java6
apt-get install sun-java6-bin sun-java6-javadb sun-java6-jdk sun-java6-plugin
update-java-alternatives -s java-6-sun
java -version
# --- NodeJs ---
cd /usr/local/lib
git clone https://github.com/joyent/node.git
cd node
git checkout v0.8.8
./configure --openssl-libpath=/usr/lib/ssl
make
make test
sudo make install
ln -s /usr/local/lib/node/out/Release/node /usr/local/bin/node
node -v
curl https://npmjs.org/install.sh | sh
npm install -g recess
npm -v
# --- PHP ---
apt-get install php5
php -v
curl -s https://getcomposer.org/installer | php
echo "
suhosin.executor.include.whitelist = phar" >> /etc/php5/cli/php.ini
# --- PHP FPM ---
echo "
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
" > /etc/apt/sources.list
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | sudo apt-key add -
apt-get update
apt-get install php5-fpm
# --- Nginx ---
apt-get install nginx
# --- Mongodb ---
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo -e "\ndeb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen\n" >> /etc/apt/sources.list.d/10gen.list
apt-get update
apt-get install mongodb-10gen
/etc/init.d/mongodb start
# --- Locales ---
export LC_ALL="en_US.UTF-8"
locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment