1.先查看linux的bash版本
bash --version
If your version of bash is 4.3 or higher, use folder 4.3-0-91
If your version of bash is 4.2 or higher, use folder 4.2-0.8
If your version of bash is 4.1 or higher but less than 4.2 use folder 4.1-0.5
If your version of bash is 4.0 or higher but less than 4.1 use folder 4.0-0.4
If your version of bash is 3.1 or higher and less than 4.0, use folder 3.1-0.09.
If your version of bash is 3.0 or higher but less than 3.1, use the folder 3.00-0.05
2.下載
wget https://sourceforge.net/projects/bashdb/files/bashdb/4.1-0.5/bashdb-4.1-0.5.tar.gz
根據不同的bash版本下載相應的bashdb版本
wget https://sourceforge.net/projects/bashdb/files/bashdb/4.2-0.8/bashdb-4.2-0.8.tar.gz
3.解壓到制定路徑
tar zxvf bashdb-4.1-0.5.tar.gz -C /路徑名
4.進入到解壓的源碼包裏,進行配置
./configure 路徑(要安裝到哪裏的路徑)
5.編譯並安裝
make && make install
6.安裝完成,查看是否可用
bashdb --debug 腳本文件
或者
bashdb -c 腳本文件