2016年5月22日 星期日

Error: failed to fetch from registry: debug

http://stackoverflow.com/questions/12913141/message-failed-to-fetch-from-registry-while-trying-to-install-any-module

Error: failed to fetch from registry: debug


sudo apt-get purge nodejs npm
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs

sudo: unable to resolve host

https://blog.longwin.com.tw/2008/11/linux-sudo-unable-to-resolve-host-2008/



/etc/hosts 原始內容

##################################################################################################################################################################

127.0.0.1       localhost
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
##################################################################################################################################################################
127.0.0.1       localhost dev
# 或 改成下面這兩行
#127.0.0.1       localhost
#127.0.0.1       dev
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

check show used port linux


sudo lsof -i
sudo netstat -lptu
sudo netstat -tulpn



ps -fp 1289
sudo netstat -plnt | grep ':80'

2016年4月17日 星期日

ufw, firewall ubuntu, uncomplicated firewall

sudo ufw disable
sudo ufw enable
sudo ufw status verbose

Even if error occurs, you can check that ufw is running.
sudo ufw status verbose

sudo service ufw status

2016年4月12日 星期二

mongo error Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.

 Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.


solution:
export LC_ALL=C

mongo --version


from:
http://askubuntu.com/questions/536875/error-in-installing-mongo-in-virtual-machine/537324

MEAN install ubuntu

2016/4/13

from:
https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

mongodb:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

sudo apt-get update


sudo apt-get install -y mongodb-org