编译安装LNMP架构

一、LNMP的介绍
  LNMP指的就是一组通常一起使用来运行动态网站或者服务器的自由软件名称的首字母的缩写而已,L指的就是Linux操作系统,N指的是Nginx这个静态Web服务器,同时Nginx也是一个高性能的反向代理服务器,P指的是PHP它是一种在服务器端执行的嵌入HTML文档的脚本语言。这四种软件都是免费开源的软件,组合搭建在一起就成为了一个免费、高效、扩展性强的网站服务系统。
  在这里插入图片描述

二、基本流程和环境介绍
  基本流程:准备编译环境
       安装Nginx
       安装MySQL
       安装php-fpm
       测试访问
  软件版本:
       Linux系统版本:CentOS 7.5.1804
       Nginx版本:nginx-1.10.3.tar.gz
       MySQL版本:mysql-5.6.41.tar.gz
       PHP版本:php-5.6.33.tar.bz

三、开始编译安装
1)关闭防火墙、Selinux、配置epel和base的yum源

[root@lnmp ~]# systemctl stop firewalld 
[root@lnmp ~]# setenforce 0
[root@lnmp ~]# cat /etc/yum.repos.d/CentOS-Base.repo | grep -v "^#" 
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/

[root@lnmp ~]# cat /etc/yum.repos.d/epel.repo | grep -v "^#" 
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
enabled=1
gpgcheck=0

2)安装Nginx

[root@lnmp ~]# mkdir /application
[root@lnmp ~]# cd /application/
[root@lnmp ~]# wget http://nginx.org/download/nginx-1.10.2.tar.gz
[root@lnmp application]# groupadd  -r  nginx
[root@lnmp application]# useradd -g nginx nginx 
[root@lnmp application]# yum groupinstall "Development tools"
......安装开发包组
[root@lnmp application]# tar -xf nginx-1.10.2.tar.gz 
[root@lnmp application]# cd nginx-1.10.2/
[root@lnmp nginx-1.10.2]# ls
auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  man  README  src
[root@lnmp nginx-1.10.2]# 
[root@lnmp nginx-1.10.2]# ./configure --prefix=/usr/local/nginx-1.14.2  --user=nginx  --group=nginx --with-http_ssl_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_secure_link_module --with-http_stub_status_module --with-http_perl_module --with-pcre --with-perl_modules_path=/home/webserver/nginx3/perl

checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> opti
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值