|
usr/local –with- gd 注意:這些為一行,中間不要有回車。 cp php.ini-dist /www/php/php.ini 編輯httpd.conf(/www/conf): 加入兩行 LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php .php httpd.conf中相關(guān)內(nèi)容如下: # # LoadModule foo_module modules/mod_foo.so LoadModule php4_module modules/libphp4.so # AddType allows you to tweak mime.types without actually editing it, or ?$ # make certain files to be certain types. # AddType application/x-tar .tgz AddType image/x- icon .ico AddType application/x-httpd-php .php 設(shè)置Apache為自啟動: cp /www/bin/apachectl /etc/init.d/httpd cd /etc/rc3.d ln -s /etc/init.d/httpd S85httpd ln -s /etc/init.d/httpd K85httpd cd /etc/rc5.d ln -s /etc/init.d/httpd S85httpd ln -s /etc/init.d/httpd K85httpd 測試一下 PHP: cd /etc/init.d /httpd start 在/www/htdocs下建立文件 test.php cd /www/htdocs vi test.php 加入 lt;?php hpinfo(); ?> 用瀏覽器訪問http://IP_address/test.php,成功的話,出現(xiàn)一些 系統(tǒng),apache,php信息 5.安裝 Snort2.0 5.1建立snort配置文件和日志目錄 mkdir /etc/snort mkdir /var/log/snort tar -zxvf snort-2.x.x.tar.gz cd snort-2.x.x /configure –with-mysql=/usr/local/mysql make make install 5.2安裝規(guī)則和配置文件 cd rules (在snort安裝目錄下) cp * /etc/snort cd ./etc cp snort.conf /etc/snort cp *.config /etc/snort 5.3修改snort.conf(/etc/snort/snort.conf) var HOME_NET 10.2.2.0/24 (修改為你的內(nèi)部網(wǎng)網(wǎng)絡(luò)地址,我的是 192.168.0.0/24) var RULE_PATH ./rules 修改為 var RULE_PATH /etc/snort/ 改變記錄日志數(shù)據(jù)庫: output database: log, mysql, user=root password=your_password dbname=snort host=localhost 5.4設(shè)置snort為自啟動: 在snort安裝目錄下 cd /contrib cp S99snort /etc/init.d/snort vi /etc/init.d/snort 修改snort如下: CONFIG=/etc/snort/snort.conf #SNORT_GID=nogroup (注釋掉) #8194;$SNORT_PATH/snort -c ?$CONFIG -i ?$IFACE ?$OPTIONS (去掉原文件中的 -g ?$SNORT_GID ) chmod 755 /etc/init.d/snort cd /etc/rc3.d ln -s /etc/init.d/snort S99snort ln -s /etc/init.d/snort K99snort cd /etc/rc5.d ln -s /etc/init.d/snort S99snort ln -s /etc/init.d/snort K99snort 四.在mysql中建立數(shù)據(jù)庫 /usr/local/mysql/bin/mysql mysql>SET PASSWORD FOR root@localhost=PASSWORD(’your_password’); mysql>create database snort; mysql>grant INSERT,SELECT on root.* to snort@localhost; mysql>quit; 進(jìn)入snort安裝目錄:/usr/local/mysql/bin/mysql -p 本新聞共 4頁,當(dāng)前在第 2頁 1 2 3 4 |
|
【收藏】【打印】【進(jìn)入論壇】 |
|
|
|
|
|
|
|