当前位置: 首页 > 工具软件 > MoChat > 使用案例 >

Linux Centos 7 安装 mochat

佟和平
2023-12-01

Linux Centos 7 安装 mochat

升级Linux 包

yum -y update && yum -y upgrade

安装PHP

  1. 安装依赖
yum install -y gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers sqlite-devel oniguruma-devel
  1. 下载安装包
    安装包可以在 https://www.php.net/downloads.php 查看并选择合适的版本
cd /usr/local
wget https://www.php.net/distributions/php-7.4.28.tar.gz
  1. 检查当前的环境是否满足要安装软件的依赖关系
cd php-7.4.28
 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pear --with-png-dir --with-xmlrpc --with-zlib --with-zlib-dir --with-mhash --with-mcrypt --with-openssl-dir --with-jpeg-dir --enable-gd-jis-conv --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip && make && make install

出现缺少包
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
解决方法

yum -y install sqlite-devel
  1. 编译安装
make
make install

安装 mySql

见文章:https://blog.csdn.net/zengxx1989/article/details/123640884

未完,待续

 类似资料: