2009. 7. 1. 21:41
select count(*) from flows;
select count( distinct SRCADDR) from flows;
delect from flows;
drop netflow;
drop table flows;
SELECT column_name(s) 
FROM table_name 
ORDER BY column_name(s) ASC|DESC
select * from table limit 5    처음부터 5개까지
select * from table limit 5,5    5개에서 10개 사이
select * from table limit 5,-1    5개에서 마지막까지
select * from tableA order by reg_dt desc limit 10;  내림차순으로 정렬해서 최상위 10개만 가져오기

Posted by 두장

vi /etc/gdm/custom.conf



[daemon]

[security]
AllowRemoteRoot=true    => root로 로그인 허용

[xdmcp]
Enable=1                      => xmanager 접속 허용

[gui]

[greeter]

[chooser]

[debug]

Posted by 두장
snort 사이트 http://snort.org/ 에서  snort 소스를 다운 받아 압축을 푼다.

snort를 mysql에 연동하지 않고 컴파일 할때는 
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install
위와 같이 특별한 옵션 없이 컴파일후 사용하면 된다.

하지만 mysql에 연동을 하기 위해서는 
[root@localhost ~]# ./configure --with-mysql
[root@localhost ~]# make
[root@localhost ~]# make install
위와 같이 mysql 옵션을 포함시켜서 configure를 해야 한다.
하지만 mysql의 위치를 제대로 찾지 못할경우..
[root@localhost ~]# ./configure --with-mysql="/usr/lib/mysql"
                            --with-mysql-include="/usr/include/mysql"




snort에서 제공하는 create_mysql을 통해 snort database에 table을 작성한다.
mysql -u root -p snort < schemas/create_mysql
Posted by 두장