首先,在SSH状态下,依次执行以下代码:
yum install libmcrypt libmcrypt-devel mcrypt mhash wget http://pecl.php.net/get/mcrypt-1.0.1.tgz tar xf mcrypt-1.0.1.tgz cd mcrypt-1.0.1 /www/server/php/72/bin/phpize ./configure --with-php-config=/www/server/php/72/bin/php-config && make && make install
安装执行成功后,在 宝塔面板-软件管理-PHP7.2设置-配置文件 的最底部,
添加一行:extension=mcrypt.so 之后重启服务器的PHP服务即可完成mcrypt扩展的安装。
转载自:https://www.gen.so/docs/server/40.html