云服务器怎么搭建lnmp

发布时间:2021-08-19 23:39:58 作者:chen
来源:亿速云 阅读:114

本篇内容主要讲解“云服务器怎么搭建lnmp”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“云服务器怎么搭建lnmp”吧!

我们把 LNMP 一键安装包保存在 /usr/local/src/ 目录下,第一步仍然是解压缩一键安装包。命令如下:

[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# tar -zxvf lnmp1.0-full.tar.gz

执行安装脚本安装 LNMP 一键安装包

既然是脚本安装包,那就不需要我们一个一个手工安装了,只要执行安装脚本 centos.sh 即可自动安装(Debian 中执行脚本为 debian.sh,Ubuntu 中执行脚本为 ubuntu.sh)。命令如下:

[root@localhost src]# cd lnmp1.0-full
[root@localhost lnmp1.0-full]#./centos.sh

回车之后安装就会继续,会看到如下界面:

==========================================================
LUMP V1.0 for CentOS/RadHat Linux vps Written by Licess
==========================================================
A tool to auto-compile & install Nginx+MySQL+PHP on Linux
For more information please visit http://www.lnmp.org/
==========================================================
Please input the root password of mysql:
(Default password: root) : 123 #设定MySQL 的密码,这里设为 123
==========================================================
Do you want to install the InnoDB Storage Engine?
(Default no,if you want please input: y , if not please press the enter button):y
#是否需要安装MySQL InnoDB,如果需要安装则输入y

Install PHP 5.3.17,Please input y
Install PHP 5.2.17,Please input n or press Enter
(Please input y or n) :y
#选择安装PHP的版本,输入y安装的是5.3.17
Install MySQL 5.5.27,Please input y
Install MySQL 5.1.60,Please input n or press Enter
(Please input y or n) :y
#选择安装MySQL的版本,输入y安装的是5.5.27
Press any key to start. . .or Press Ctrl+c to cancel #按任意鍵开始安装

如果在安装过程中输入错误,则可以按“Ctrl+Backspace”组合键来进行删除。这个安装过程完全是依赖 centos.sh 脚本自动执行的,所以比 LAMP 的手工安装过程简单得多,我们只要指定一些基本的选项,就可以完成安装了。

具体的安装时间要视 Linux 服务器的性能而定,可能会等待几十分钟。如果大家有兴趣,则可以查看一下 centos.sh 这个安装脚本,看看它是如何实现自动安装的。如果看到以下界面,则证明安装成功。

=========================================================
Manager for LNMP VI.0 , Written by Licess
=========================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================
Nginx is runing!
php-fpm is runing!
MySQL running (12489) [确定]
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:53575 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::57454 :::* LISTEN
tcp 0 0 :::111 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
tcp 0 0 ::1:25 :::* LISTEN

LNMP一键安装包安装的软件及具体位置

既然是一键安装,那么默认安装的软件和软件的安装位置都是事先设定好的,在安装过程中不能更改。具体安装了哪些软件及其位置如下所示。

云服务器怎么搭建lnmp

也就是说,LNMP 一键安装只安装了基本的 Nginx、MySQL、PHP、phpMyAdmin 和 Zend Optimizer。

到此,相信大家对“云服务器怎么搭建lnmp”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

推荐阅读:
  1. docker搭建 LNMP 环境
  2. LNMP环境搭建

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

云服务器 lnmp

上一篇:Linux下bashrc和profile的区别是什么

下一篇:linux定时器的使用方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》