顯示具有 centos 6 標籤的文章。 顯示所有文章
顯示具有 centos 6 標籤的文章。 顯示所有文章

2020/12/01

 原來跑在centos 6的二個軟体

nm

ipaudit

因為centos 6 的EOL 要處理

本來是想直接停止使用

但因為還是有些資訊需要從這裡拿到

所以找找升級方案

這二個軟体都是 32位元的版本

無法在64位元的OS上執行 所以只能找32位元的OS

centos 8 已經沒有64位元的版本

ubuntu server 版本看來是還有提供 可是都一直無法下載

最後決定使用debian 10 support 到 2024


Debian 10 “Buster”


i386, amd64, armel, armhf and arm64


July, 2022 to June, 2024


再來先說明nm

nm是單純的執行檔 不用compile

執行後會出現找不到 libstdc++-libc6.2-2.so.3

到/user/lib 做一個link

ln -s  /usr/lib/i386-linux-gnu/libstdc++.so.6 libstdc++-libc6.2-2.so.3

執行就沒問題了

記得要配合使用環境更改 config 

再來處理操作介面的問題

安裝apache2後 要更改document root 跟 cgi

sudo a2enmod cgid

接下來

vi /etc/apache2/sites-enabled/000-default.conf


更改 DocumentRoot "/usr/local/nm/html"

新增以下內容

#for nm use

<Directory "/usr/local/nm/html">

Options All

AllowOverride All

Require all granted

</Directory>


vi /etc/apache2/conf-enabled/serve-cgi-bin.conf

加上

<Directory "/usr/local/nm/html/">

Options +ExecCGI

AddHandler cgi-script .cgi .pl

</Directory>

改完後重啟 apache2

以上

http://blog.sina.com.cn/s/blog_40c09b550100inbh.html

2018/05/09

今天有個新需求
要把apache 的log丟到graylog
找到很多文件
以下的方式算是最簡單的做法

apache跑在centos 上

把以下的內容加到 /etc/rsyslog.conf 或在/etc/rsyslog.d/裡加上一個新的檔案 如 apachelog.conf

$ModLoad imfile

# apache error.log
$InputFileName /var/log/httpd/error_log
$InputFileTag apache-errors:
$InputFileStateFile state_file_error_apache
$InputFileFacility local6
$InputFileSeverity info
$InputRunFileMonitor
$InputFilePollInterval 10

# apache access.log
$InputFileName /var/log/httpd/access_log
$InputFileTag apache-access:
$InputFileStateFile state_file_access_apache
$InputFileFacility local6
$InputFileSeverity info
$InputRunFileMonitor
$InputFilePollInterval 10

if $programname == 'apache-access' then @1.2.3.4:514
& stop
if $programname == 'apache-errors' then @1.2.3.4:514
& stop

依需求修改 log檔的路徑
外部 log server 的ip及port

改完後rsyslogd要重啟



2014/07/09

不知道為什麼原來安裝在centos6 x64裡的openvas rule不能更新也不能scan了
花了不少時間找問題
但還是沒辦法處理
最後決定放棄重裝
依照原廠網站的方法
一次就ok了
目前還是使用v6的版本 因為v7還沒有人做出package
但有個問題就是開机時port 9392是有起來的
但連進9392 port時就掛了
在log上看到的訊息如下

gsad main:WARNING:2014-07-08 17h33.31 utc:1051: MHD: Failed to receive data: The TLS connection was non-properly terminated.

看起來是https有問題
再找了一下資料
把預設的https改成http

vi /etc/init.d/gsad
找到 daemon $EXEC #PARAMS
改成如下
daemon $EXEC #PARAMS "--http-only"  > 補上 --http-only 即可
service gsad restart

目前運作正常

http://www.i-uix.com/kevin/centos6-5%E5%AE%89%E8%A3%9Dopenvas/

2014/02/10

昨天host重開
有一個guest一直停在

Booting from Hard Disk...

倒回之前的backup也沒用
想不到是grub壞了
修復方法如下
到底是誰搞壞的
Orz

單單利用 grub 安裝開機程式

你也可利用 grub 這個指令來安裝開機程式,它卻不會在 /boot/grub 內安裝 Grub 的檔案。要是開機程式被蓋過或損壞了,此方法可修復 Grub 的安裝。

執行 grub。
你可選擇執行 find /boot/grub/stage1 尋找哪個分割區在 /boot/grub 內含有 Grub 所需的檔案。如果你的 /boot 採用獨立分割區,請執行 find /grub/stage1。
執行 root [按 Grub 方式命名的分割區] 來指定哪個分割區的 /boot/grub 內含有 Grub 檔案及備有 /boot/grub/grub.conf。
利用 setup [按 Grub 方式命名的開機程式位置] 來安裝開機程式。
執行 quit 來離開 Grub 程式。
範例:


[root@localhost ~]# grub
Probing devices to guess BIOS drives. This may take a long time.

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]

grub> find /boot/grub/stage1
 (hd0,5)
 (hd0,9)

grub> root (hd0,5)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p
(hd0,5)/boot/grub/stage2
/boot/grub/grub.conf"... succeeded
Done.

grub> quit

http://wiki.centos.org/zh-tw/HowTos/GrubInstallation