Skip to content

Instantly share code, notes, and snippets.

View snmp.sh
# manual
http://wiki.ubuntuusers.de/SNMP
# install
# http://l3net.wordpress.com/2013/05/12/installing-net-snmp-mibs-on-ubuntu-and-debian/
sudo apt-get install snmp snmpd
sudo nano /etc/snmp/snmp.conf
# comment out this line
> # mibs :
sudo nano /etc/snmp/snmptrapd.conf
@andineck
andineck / kill_process.sh
Created Nov 22, 2013
list node processes
View kill_process.sh
# kill specific process, check with 'ps -aufx | grep node'
kill <pidnr>
# kill all node processes
killall -9 node
# terminate forever process, check with 'forever list'
forever stop <number 0..n>
View starter.sh
touch starter.sh
chmod 754 starter.sh
nano starter.sh
# file content:
#!/bin/sh
if [ $(ps aux | grep $USER | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ]
then
export PATH=/usr/local/bin:$PATH
View hosteurope_apache.sh
nano /etc/apache2/ports.conf
>NameVirtualHost *:3080
>Listen 3080
nano /etc/apache2/sites-available/default
> <VirtualHost *:3080>
sudo service apache2 restart
View nginx.ini
# allow multiple domains
nano /etc/nginx/nginx.conf
# uncomment or add this in the http section:
> server_names_hash_bucket_size 64;
# configure new site
nano /etc/nginx/conf.d/intesso.com.conf
View nodejs_virtual_host
https://www.digitalocean.com/community/articles/how-to-host-multiple-node-js-applications-on-a-single-vps-with-nginx-forever-and-crontab
https://www.digitalocean.com/community/articles/how-to-install-nginx-on-ubuntu-12-04-lts-precise-pangolin
@andineck
andineck / forever.sh
Created Nov 21, 2013
Start node.js app with forever
View forever.sh
npm install forever -g
cd /path/to/your/node/app/
forever start --spinSleepTime 10000 app.js
# Where --spinSleepTime 10000 refers to the minimum uptime (in milliseconds) between launches of a crashing script. This command will work for almost all cases.
# Now point your browser to http://[your-vps-ip]:[port] and see your app running.
@andineck
andineck / locale.sh
Created Nov 21, 2013
add locale to ubuntu
View locale.sh
# error message when connected via ssh to virtual host
Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "de_CH.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
# add locale
sudo locale-gen de_CH.UTF-8
@andineck
andineck / git.sh
Created Nov 21, 2013
install git on ubuntu
View git.sh
# other things that you might need as well
# git
sudo apt-get install git-core
# configure git via file
sudo nano ~/.gitconfig
# or configure git via commands
git config --global user.name "NewUser"
git config --global user.email newuser@example.com
@andineck
andineck / nodejs_install_on_ubuntu.sh
Last active Dec 28, 2015
node.js installation on ubuntu virtual hosts like hosteurope.de
View nodejs_install_on_ubuntu.sh
# connect to virtual host
ssh root@<ip address>
> <root password>
# install node.js with apt-get
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make nano
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs