Recently in 窗外 Category

  在Linux服务器运维过程中,rm -rf * 命令因其不可逆的破坏性始终伴随着高危风险。不同于桌面环境的回收站机制,该指令一旦执行将直接导致物理存储层面的数据删除。根据文件系统原理,即便使用专业恢复工具,成功恢复的概率仍与磁盘写入状态密切相关,这使得误操作极易造成永久性数据丢失。

  下面是一次在Linux下对数据库执行rm -rf *后的恢复过程。涉及两个数据库共240张表,约5GB数据,数据库版本为MySQL 8.0.37。

过程:

  很诡异的问题,刚刚软件还能正常的执行,装了“Chinese Support”包之后,软件就报错了:

[root@vm-18-174 data-integration]# ./spoon.sh 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
process 25734: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
  D-Bus not built with -rdynamic so unable to print a backtrace
./spoon.sh: line 229: 25734 Aborted                 "$_PENTAHO_JAVA" $OPT -jar "$STARTUP" -lib $LIBPATH "${1+$@}" 2>&1

RHEL: Can't open display:

| No Comments

  一个全新安装的RHEL6.x的系统,尝试使用GUI程序时报错:Can't open display:。折腾了一整天,发现是最小化安装缺少xorg-x11-xauth包导致的。

  解决方法:

大量rcuos和rcuob进程

| No Comments

  一台服务器安装了CentOS7,系统里有128个rcuos进程和128个rcuob进程,导致新添加的Zabbix一直提示系统的进程数过多,而服务器的CPU并没有这么多核心。

  记录一下解决办法:

Directadmin:升级到MySQL5.5

| No Comments

  升级操作前,请做好备份。如果你的VPS服务商提供快照功能的话,给VPS做个快照最方便了。

  使用DirectAdmin的custombuild来升级MySQL,非常的简单方便:

cd /usr/local/directadmin/custombuild
./build clean
./build set mysql 5.5
./build update
./build mysql
./build php d

  又一个安装DirectAdmin时出现的错误

./directadmin: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory 
./directadmin: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory

  和前面DirectAdmin bad ELF interpreter的错误有点相似,libssl.so.6对应的应该是libssl.so.0.9.8e,也就是openssl098e.i686这个包。

  安装DirectAdmin时出现bad ELF interpreter的错误:

./install.sh: ./directadmin: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
./install.sh: ./directadmin: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

  下面有说找不到directadmin.conf:

  安装webalizer时遇到错误,提示找不到gd库:webalizer:configure: error: gd library not found。

configure: error: gd library not found.. please install libgd
Trying to make webalizer...
make: *** No targets specified and no makefile found.  Stop.

*** The make has failed, would you like to try to make again? (y,n): n