当前位置:网站首页>源码构建LAMP环境-3
源码构建LAMP环境-3
2022-08-02 20:51:00 【小猴子_xiao】
写作目标:
使用源码方式基于 LAMP 架构搭建 BBS 论坛或者博客
思考:
基础班使用 yum 工具搭建了 LAMP 的环境,为什么还要用源码包再搭建一次呢?
rpm 版本
安装方便,升级、卸载都灵活,很难或者无法定制主要组件的功能,适合批量部署
源码包编译 根据业务需求 定制 ,前提是需要对平台的功能需要非常了解;卸载、升级、安装并不是很方便灵
活
生产环境如何做?
上线前,在测试环境中编译安装并且调试完毕后,把编译后的源码同步到其余软硬环境一样的机器,直
接 make install 即可。
部署环境:linux centos 7.9
五、编译安装PHP
版本:php-5.6.11.tar.xz
1. 下载软件
2. 解压
3. 进入到解压的目录里
1) 配置
[[email protected] php-5.6.11]# vim php.sh
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/mysql25/base_dir/ \
--with-mysqli=/mysql25/base_dir/bin/mysql_config \
--with-pdo-mysql=/mysql25/base_dir \
--with-zlib \
--with-zlib-dir=/mysql25/base_dir/zlib \
配置错误:
checking for cURL support... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
解决:
yum -y install libcurl-devel
2)编译
make //make成功后,会显示让你make test,不用做
3)安装
make install
//确认php成功安装:
[[email protected] php-5.6.11]# ls /usr/local/apache2/modules/libphp5.so
注意:确认有这个libphp5.so模块文件,就表示编译php成功
PHP常见参数介绍:
--with-config-file-path 和 --with-config-file-scan-dir //在指定 php 配置文件的路径
--with-mysql 和 --with-mysqli //在指定你的 mysql 的位置和它的相关工具
--with-iconv-dir
--with-freetype-dir
--with-jpeg-dir
--with-png-dir
--with-gd
--with-zlib
--with-libxml-dir //这些都是在启用对某种文件的支持
--with-curl 和 --with-curlwrappers //用于支持 curl 函数,此函数允许你用不同的协议连接和沟通
不同的服务器
--with-openssl,--with-mhash,--with-mcrypt //这都是和加密有关的参数,启用它们是为了让php可以
更好的支持各种加密
边栏推荐
- 汉源高科千兆4光4电工业级网管型智能环网冗余以太网交换机防浪涌防雷导轨式安装
- 五大维度解读软件测试分类
- 你所不知道的C#中的细节
- SublimeText3 安装、配置项、包管理、常用必备插件、常用快捷键以及修改
- 如何成为一名正义黑客?你应该学习什么?
- ORB SLAM3加载Vocabulary更快ORBvoc.bin
- Digital twins help visualize the construction of smart cities
- 信息学奥赛一本通(1256:献给阿尔吉侬的花束)
- 解道9-编程技术6
- Informatics Olympiad All-in-One (1260: [Example 9.4] Intercepting Missiles (Noip1999))
猜你喜欢
随机推荐
汇编语言中b和bl关键字的区别
C# Barrier类
ACE JET NPOI
golang刷leetcode:最大波动的子字符串
五大维度解读软件测试分类
Tencent YunMeng every jie: I experienced by cloud native authors efficiency best practices case
Electrical diagram of power supply system
golang刷leetcode:拼接数组的最大分数
信息学奥赛一本通(1257:Knight Moves)
什么是幂等
人尽皆知的云原生,到底是大势所趋还是过度炒作?
你是几星测试/开发程序员?技术型选手王大拿......
正则表达式
y85.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶、pushgateway和prometheus存储(十六)
ORB SLAM3加载Vocabulary更快ORBvoc.bin
js how to get the browser zoom ratio
Day35 LeetCode
Li Mu hands-on deep learning V2-BERT pre-training and code implementation
2022年金九银十,Android面试中高频必问的问题汇总
STP生成树协议