Thursday, February 21, 2013

Install pynids-0.6.1 in centos

Error:
Package requirements (glib-2.0 >= 2.2.0) were not met.

Fix:
1, do
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig


2, download  libnids-1.24
do:
./configure
make
make install

3, go to pynids-0.6.1

 python setup.py build
python setup.py install

Thursday, February 14, 2013

sed find and replace all file

[root@govd drupal]# find /var/www/drupal/ -type f -exec sed -i "s/Any\ unauthorized/AnyUnauthorized/g" {} \;
[root@govd drupal]# find /var/www/drupal/ -exec grep -l "Any unauthorized" {} \;

Thursday, February 7, 2013

install LAMP in ubuntu

a, update ubuntu
1 apt-get update
2 apt-get upgrade

b, install LAMP
apt-get install apache2 php5 libapache2-mod-php5 mysql-server php5-cli

Tuesday, February 5, 2013

node.js+mongoDB+bootStrap+ angularjs

 nodejs book
http://visionmedia.github.com/masteringnode/book.html

expressjs
http://expressjs.com/guide.html

================
1, install node.js
   29  wget http://nodejs.org/dist/v0.8.18/node-v0.8.18.tar.gz
   35  ./configure
   36  make
   32  yum search gcc
   33  yum install gcc-c++
   38  yum install mlocate
   40  updatedb
   54  /usr/local/bin/node
   55  /usr/local/bin/node --help
   56  /usr/local/bin/node -v

2,

centos 6 repo



File name:
 /etc/yum.repos.d/CentOS-Base.repo:


# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6