快速搭建LAMP架构

article/2025/9/22 12:52:23

快速搭建LAMP架构

  • 1.安装apache
  • 2.部署mysql
  • 3.部署php结合apache
  • 4.验证
  • 5.部署一个论坛disuz


1.安装apache

[root@localhost ~]# yum install httpd -y
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
软件包 httpd-2.4.6-#启动apache
systemctl start httpd[root@localhost ~]# netstat -tunlp |grep "httpd"
tcp6       0      0 :::80                   :::*                    LISTEN      1789/httpd

2.部署mysql

#安装
yum install mariadb -y
#启动
systemctl start maridb
#验证
[root@localhost ~]# netstat -tunlp |grep "mysql"
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1581/mysqld
#使用访问
[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.68-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
MariaDB [mysql]> excite-> Ctrl-C -- exit!
Aborted 、

3.部署php结合apache

#解决php安装的依赖开发环境
[root@localhost ~]# yum install -y zlib-devel libxml2-devel libjpeg-devellibjpeg-turbo-devel libiconv-devel freetype-devel libpng-develgd-devel libcurl-devel libxslt-devel libtool-ltdl-devel pcrepcre-devel apr apr-devel zlib-devel gcc make
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
#安装php,以及php连接mysql数据库的驱动
[root@localhost ~]# yum install php php-fpm php-mysql -y
#编辑apache配置文件
vim /etc/httpd/conf/httpd.conf
:set nu 显示行号 120119 DocumentRoot "/var/www/html"
120  TypesConfig /etc/mime.types
121  AddType application/x-httpd-php .php
122  AddType application/x-httpd-php-source .phps
123  DirectoryIndex index.php index.html

4.验证

#编写一个php脚本,放在
vim /etc/var/www/html/index.php
<meta charset=utf8>
test
<?php
phpinfo();
?>
#重启httpd
systemct restart httpd

看到phpinfo的页面后,表示lamp架构搭建完成

5.部署一个论坛disuz

#下载论坛代码
wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip# 解压缩
yum install unzip -y
# 拷贝upload,到apache目录下即可访问
[root@ceph discuz]# cp -r upload/* /var/www/html/
cp: overwrite ‘/var/www/html/index.php’? y
# 
[root@ceph discuz]# chmod -R 777 /var/www/html/*

在这里插入图片描述


http://chatgpt.dhexx.cn/article/kWR9QZWS.shtml

相关文章

LAMP架构简介与配置

文章目录 前言LAMP 简介与概述LAMP平台概述 构建LAMP平台顺序编译安装的优点各组件的主要作用 编译安装 Apache编译安装mysql安装PHP 前言 LAMP 简介与概述 LAMP平台概述 LAMP架构是目前成熟的企业网站应用模式之一&#xff0c;指的是协同工作的一整台系统和相关软件&#x…

搭建LAMP架构

搭建LAMP架构 一、LAMP架构概述 1、LAMP简介 LAMP架构是目前成熟的企业网站应用模式之一&#xff0c;指的是协同工作的一整台系统和相关软件&#xff0c;能够提供动态web站点服务及其应用开发环境。 LAMP是一个缩写词&#xff0c;具体包括Linux操作系统&#xff0c;Apache网…

LAMP架构简介与概述 及服务安装

目录 1、LAMP平台概述 &#xff08;1&#xff09;LAMP平台概述 &#xff08;2&#xff09;构建LAMP平台顺序 &#xff08;3&#xff09;编译安装的优点 &#xff08;4&#xff09;各组件的主要作用 2、Apache概述 &#xff08;1&#xff09; 安装Apache服务&#xff1a;…

什么是LAMP架构?

LAMP架构介绍 LAMP动态网站架构 LAMP是指一组通常一起使用来运行动态网站或者服务器的自由软件名称首字母缩写。 1、LAMP分别代表什么&#xff1f; L代表服务器操作系统使用Linux A代表网站服务使用的是Apache软件基金会中的httpd软件 M代表网站后台使用的数据库是MySQL数…

【ubuntu】搭建lamp架构

文章目录 一、准备工作1、更新源2、更新软件3、防火墙UFW 二、安装apache21、安装apache包2、网页浏览查看 三、安装mysql1、安装mysql2、查看mysql3、设置mysql数据库的密码 四、安装PHP1、安装php包以及插件2、测试php包 五、安装wordpress1、获取wordpress的压缩包2、上传压…

腾讯云— LAMP 架构个人实践分享

LAMP 环境通常指Linux 环境下&#xff0c;由ApacheMySQL/MariaDBPHP 以及其它相关组件组成的网站服务器架构。目前以LAMP组成的Web 应用程序平台广泛被应用&#xff0c;70%以上的访问流量由LAMP提供&#xff0c;所以我们也认同LAMP是最强大的网站解决方案。 关于LAMP的环境部署…

一:LAMP 架构简介

一&#xff1a;LAMP 架构简介 LAMP 是目前成熟的一种企业网站应用模式之一&#xff0c;指的是协同工作的一套系统和相关软件的整合&#xff0c;可提供PHP动态web站点应用及开发环境&#xff0c;LAMP 经过十年的完善各个组件间的兼容性&#xff0c;协作能力&#xff0c;稳定等方…

php lamp架构,lamp架构搭建

lamp架构搭建(yum) 环境&#xff1a;一台主机&#xff0c;centos7.5 lamp安装 yum -y install httpd php-fpm php-mysql mariadb-server 启动php-fpm服务 systemctl start php-fpm 配置httpd生成配置文件&#xff0c;提示http&#xff0c;php-fpm服务在本地 vim /etc/httpd/con…

LAMP架构介绍及配置

1.LAMP简介与概述 1.1 LAMP平台概述 LAMP架构是目前成熟的企业网站应用模式之一&#xff0c;指的是协同工作的一整台系统和相关软件&#xff0c;能够提供动态web站点服务及其应用开发环境 LAMP是一个缩写词&#xff0c;具体包括Linux操作系统&#xff0c;Apache网站服务器&a…

lamp

文章目录 1. LAMP架构介绍2. web服务器工作流程2.1 cgi与fastcgi2.2 httpd与php结合的方式2.3 web工作流程 3. lamp平台构建3.1 安装httpd3.2 安装mysql3.3 安装php3.4 配置apache3.4.1 启用代理模块3.4.2 配置虚拟主机 3.5 验证 1. LAMP架构介绍 lamp&#xff0c;其实就是由L…

LAMP架构简介

一、LAMP架构介绍 现如今打开浏览器&#xff0c;搜索LAMP关键词&#xff0c;出现大量的关于LAMP的介绍&#xff0c;包括LAMP的一键脚本、LAMP的yum安装、LAMP的编译安装&#xff0c;但是对于一个非开发或非专业人员有可能根据网络参考资源实现LAMP的搭建并成功运行各种服务&am…

LAMP架构简述

阅读目录 图片架构详解               LAMP架构以及通信过程 LNMP架构优缺点Nginx/APACHE tomcat MySQL 图片架构详解               LAMP/LNMP&#xff1a;是有Linux系统&#xff0c;Apache网络服务器或者Nginx服务器&#xff0c;MySQL数据库…

LAMP架构

目录 一、LAMP简介与概述1.LAMP平台概述2.构建LAMP平台顺序3.编译安装的优点4.各组件的主要作用 二.安装1.-安装Apache2.安装MYSQL3.安装PHP4.安装论坛5.论坛测试 一、LAMP简介与概述 1.LAMP平台概述 LAMP架构是目前成熟的企业网站应用模式之一&#xff0c;指的是协同工作的一…

LAMP架构一(介绍)

一、LAMP架构介绍 现如今打开浏览器&#xff0c;搜索LAMP关键词&#xff0c;出现大量的关于LAMP的介绍&#xff0c;包括LAMP的一键脚本、LAMP的yum安装、LAMP的编译安装&#xff0c;但是对于一个非开发或非专业人员有可能根据网络参考资源实现LAMP的搭建并成功运行各种服务&…

Smokeping的主从模式部署

Smokeping 支持 Standalone&#xff08;单机&#xff09;模式和 Master/Slave&#xff08;主从&#xff09;模式。 之前老苏折腾过单机模式&#xff0c;这次应网友 Roxmie 的要求&#xff0c;研究了一下主从模式的部署 文章传送门&#xff1a; 网络性能监控工具Smokeping 因为…

Centos7上smokeping安装

Centos7上Smokeping安装 一、安装软件 1、添加镜像源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo2、安装Apache yum -y install httpd httpd-devel gcc make curl wget3、安装rrdtool a.安装依赖的库 yum -y install libx…

centos7下源码安装Smokeping,主从部署

一、环境部署(准备两台Centos虚拟机) 1.关闭防火墙和SElinux #systemctl stop firewalld.service #systemctl disable firewalld.service #sed -i s/SELINUXenforcing/SELINUXdisabled/ /etc/selinux/config #grep SELINUXdisabled /etc/selinux/config #setenforce 02.安装E…

网络性能监测工具smokeping

smokeping简介&#xff1a; smokeping是rrdtool的作者Tobi Oetiker的作品&#xff0c;所以它在图形显示方面有很大优势&#xff0c;也是一个很有特点的opensource工具&#xff1a;多种探测方式&#xff0c;包括fping、echoping、dig、curl等&#xff1b;可以在多个节点收集同一…

docker快速搭建smokeping

1、部署docker环境 curl -fsSL get.docker.com -o get-docker.sh CHANNELstable sh get-docker.sh --mirror Aliyun 2、启动docker systemctl start docker 3、拉取镜像 docker pull linuxserver/smokeping 4、创建目录 mkdir -p /data/smokeping/config 5、进入目录 cd /data/…

Smokeping 网络性能监控 安装使用说明

目录 简介 -smokeping介绍-组成部分-Web服务器软件-Smokeping主服务-探针-rrdtool安装配置smokeping 2.1--环境依赖包安装 2.2--RRDtool 1.2.x或更高版本安装 2.3--FPing安装 2.4--EchoPing安装 2.5--Webserver安装 2.6--Perl 5.10.1 或更高版本安装 2.7--开始安装smokeping 三…