搬瓦工VPS安装LAMP教程

VPS新手教程搬瓦工VPS安装LAMP教程已关闭评论阅读模式

做站环境里比较流行的,除了LNMP。还有LAMP。要说这两个的区别,那就是差了一个字母,对,没错,一个是N,一个是A。N代表的是Nginx,A代表的就是Apache。今天的这个LAMP一键安装脚本,来自秋水逸冰大佬。对于这位大佬相信很多人都不陌生,很多人都用过他的脚本,尤其是刚买了VPS以后的测试bench命令。

LAMP一键安装项目官网:https://lamp.sh文章源自搬瓦工-https://www.bwhcn.com/3047.html

1、什么是LAMP

LAMP 一键安装包是一个用 Linux Shell 编写的可以为 Amazon Linux 2/CentOS/Debian/Ubuntu 系统的 VPS 或服务器安装 LAMP(Linux + Apache + MySQL/MariaDB + PHP) 生产环境的 Shell 脚本。文章源自搬瓦工-https://www.bwhcn.com/3047.html

2、对VPS的需求

内存:≥ 512MB
硬盘:至少 10GB 以上的剩余空间
服务器必须配置好 软件源 和 可连接外网
必须具有系统 root 权限
强烈建议使用全新系统来安装文章源自搬瓦工-https://www.bwhcn.com/3047.html

3、目前支持的系统

Amazon Linux 2
CentOS 7
CentOS 8
CentOS Stream 8
Rocky Linux 8 (推荐)
AlmaLinux 8
Debian 9
Debian 10
Debian 11 (推荐)
Ubuntu 18.04
Ubuntu 20.04 (推荐)
Ubuntu 22.04文章源自搬瓦工-https://www.bwhcn.com/3047.html

4、安装方法

(1)首先安装screen、wget和git文章源自搬瓦工-https://www.bwhcn.com/3047.html

Amazon Linux/CentOS系统执行以下命令:文章源自搬瓦工-https://www.bwhcn.com/3047.html

yum -y install wget git screen

Debian/Ubuntu系统执行以下命令文章源自搬瓦工-https://www.bwhcn.com/3047.html

apt-get -y install wget git screen

(2)创建Screen文章源自搬瓦工-https://www.bwhcn.com/3047.html

执行以下命令创建screen,以防止安装过程中出现意外(如断网失去连接等)。文章源自搬瓦工-https://www.bwhcn.com/3047.html

screen -S lamp

(3)安装LAMP
执行以下命令,来安装LAMP文章源自搬瓦工-https://www.bwhcn.com/3047.html

git clone https://github.com/teddysun/lamp.git
cd lamp
chmod 755 *.sh
./lamp.sh

更多安装相关内容请访问官方安装页面:https://lamp.sh/install.html

5、结束语

LAMP和LNMP各有优势,看自己的需求来决定装哪个吧。

 
  • 本文由 admin 发表于 2022年6月13日 23:34:28
  • 转载请务必保留本文链接:https://www.bwhcn.com/3047.html