在 Linux 下卸载 Informix,通常分为 使用安装工具卸载 和 手动清理 两种方式。下面以 IBM Informix Dynamic Server(IDS) 为例,按常见场景说明。
一般默认在:
/opt/IBM/informix
或:
/usr/informix
查看环境变量:
echo $INFORMIXDIR
echo $INFORMIXSERVER
installer 安装ls $INFORMIXDIR/install
ids_install / uninstall 脚本进入 Informix 安装目录:
cd $INFORMIXDIR/_uninst
执行卸载脚本:
./uninstall
或:
./uninstaller
如果是图形界面安装,可能需要:
./uninstall -i console
如果当初是用 Installation Manager 安装的:
/opt/IBM/InstallationManager/eclipse/IBMIM
或者命令行:
/opt/IBM/InstallationManager/eclipse/tools/imcl listInstalledPackages
卸载:
imcl uninstall com.ibm.informix.ids
(包名以实际 listInstalledPackages 输出为准)
onmode -ky
确认进程已停止:
ps -ef | grep oninit
userdel -r informix
groupdel informix
若系统还有其他数据库用户,请谨慎操作。
rm -rf /opt/IBM/informix
或:
rm -rf $INFORMIXDIR
编辑相关配置文件:
vi ~/.bash_profile
vi /etc/profile
删除以下内容:
INFORMIXDIR=
INFORMIXSERVER=
PATH=$INFORMIXDIR/bin:$PATH
LD_LIBRARY_PATH=$INFORMIXDIR/lib
使配置生效:
source ~/.bash_profile
chkconfig --list | grep informix
chkconfig --del informix
或 systemd:
systemctl disable informix
rm -f /etc/systemd/system/informix.service
如果不再需要数据:
rm -rf /informix/data
rm -rf /informix/logs
⚠ 数据删除不可恢复,请提前备份!
which oninit
oninit -V
若提示 command not found,说明已卸载干净。
oninit?说明 $PATH 或残留目录未清理干净。
ontape / onbar)onstat -c)如果你能提供:
我可以给你 精确的卸载步骤。