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

Monday, January 28, 2013

good linux tools


http://www.shutterstock.com/pic-108551444/stock-photo-intruder-detection-concept-in-word-tag-cloud-on-black-background.html

http://alienvps.com/vps-hosting/

http://www.cyberciti.biz/faq/howto-check-linux-rootkist-with-detectors-software/

Zeppoo Software

Zeppoo - Zeppoo allows you to detect rootkits on i386 and x86_64 architecture under Linux, by using /dev/kmem and /dev/mem. Moreover it can also detect hidden tasks, connections, corrupted symbols, system calls and so many other things. Download source code here

Chkrootkit Software

Chkrootkit - chkrootkit is a tool to locally check for signs of a rootkit. Type the following command to install chkrootkit
$ sudo apt-get install chkrootkit
Start looking for rootkits, enter:
$ sudo chkrootkit
Look for suspicious strings, enter:
$ sudo chkrootkit -x | less
You need to specify the path for the external commands used by chkrootkit such as awk, grep and others. Mount /mnt/safe using nfs in read-only mode and set /mnt/safe binaries PATH as trusted one, enter:
$ sudo chkrootkit -p /mnt/safe

rkhunter software

rkhunter - rkhunter (Rootkit Hunter) is a Unix-based tool that scans for rootkits, backdoors and possible local exploits. rkhunter is a shell script which carries out various checks on the local system to try and detect known rootkits and malware. It also performs checks to see if commands have been modified, if the system startup files have been modified, and various checks on the network interfaces, including checks for listening applications. Type the following command to install rkhunter:
$ sudo apt-get install rkhunter
The following command option tells rkhunter to perform various checks on the local system:
$ sudo rkhunter --check
The following command option causes rkhunter to check if there is a later version of any of its text data files:
$ sudo rkhunter --update
The following option tells rkhunter which directories to look in to find the various commands it requires:
$ sudo rkhunter --check --bindir /mnt/safe


Friday, January 25, 2013