【LNMP】RHEL8.3安装LNMP并配置freetds连接MSSQL

本文详细介绍了在RHEL8.3系统上安装LNMP环境,并通过freetds配置连接MSSQL数据库的步骤,包括MYSQL的安装、LNMP的搭建、freetds的配置以及PHP对MSSQL的支持,解决了中文乱码、PHP执行外部脚本和页面自动刷新等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

【RHEL8.3安装LNMP并配置freetds连接MSSQL】
1.1.安装MYSQL(安装LNMP前置条件):
rpm -ivh mysql-community-client-8.3.0-1.el8.x86_64.rpm
rpm -ivh mysql-community-common-8.3.0-1.el8.x86_64.rpm
rpm -ivh mysql-community-icu-data-files-8.3.0-1.el8.x86_64.rpm
rpm -ivh mysql-community-libs-8.3.0-1.el8.x86_64.rpm
rpm -ivh mysql-community-server-8.3.0-1.el8.x86_64.rpm


链接: https://pan.baidu.com/s/1Es9_FmZPcD2hbMvPCYt44g?pwd=svqu 提取码: svqu 复制这段内容后打开百度网盘手机App,操作更方便哦

1.2.安装LNMP:
tar -xzvf lnmp2.0-full.tar.gz;cd lnmp2.0-full;bash install.sh lnmp;根据配置精准选择安装组件...

2.1配置PHP支持freetds连接MSSQL:(转自——http://www.csuper.cn/?id=604)
./configure --prefix=/LNMP/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld --enable-shared --enable-static
make && make install
tsql -C

vi /LNMP/freetds/etc/freetds.conf
[mssql_info]
host = 10.233.233.8
port = 1433
tds version = 7.1

测试链接
tsql -H ip -p 1433 -U sa -P pw

下载对应版本的freetds:Version: freetds v1.00.47,VS 
https://www.freetds.org/userguide/ChoosingTdsProtocol.html

2.2配置php支持mssql
cd /LNMP/lnmp2.0-full/src/php-5.3.29/ext/mssql (这步很关键,进入LNMP对应版本的php src目录,去编译mssql.so)
/usr/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-mssql=/LNMP/freetds
./configure --with-php-config="/usr/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值