搭建LAMP
1、配置网卡、配置本地YUM


2、安装Apache

编译安装后建立软连接、复制apache启动服务脚本到系统启动的目录里、编辑系统启动的脚本


把httpd脚本添加到系统自启服务里并启动后检查


3、安装MySQL
安装依赖包


编译安装cmake

创建mysql:mysql用户、组


存在警告、安装bison解决

编译安装MySQL



设置归属、删除原配置文件并复制新的配置文件、初始化数据库、设置环境变量并立即执行、复制并给予权限、把mysql添加到系统自启动服务里,然后启动mysqld并查看
4、编译安装PHP




解决依赖包

./configure --prefix=/data/server/php --with-mcrypt --with-apxs2=/data/server/httpd/bin/apxs --with-mysql=/data/server/mysql --with-config-file-path=/data/server/php --enable-mbstring

开始编译安装PHP

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-aHWHddXY-1645101920329)(C:/Users/zanyi/AppData/Roaming/Typora/typora-user-images/image-20220217204106931.png)]
第266行

784
修改PHP配置文件




安装并配置ZendGuardLoader-php

53

168
编辑HTTP配置文件

启动服务并查看

<?php
phpinfo();
?>


<?php
$link=mysql_connect('localhost','root','123')
if($link) echo "成功";
mysql_close();
?>
?

创建index页面并测试、创建test网页并测试


安装并配置phpMyAdmin

 
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-kxgA8NlR-1645101920335)(C:/Users/zanyi/AppData/Roaming/Typora/typora-user-images/image-20220217204440331.png)]
配置Discuz

|