nginx部署lnmt架构

本文档详细介绍了如何部署LNMT(Linux, Nginx, MySQL, Tomcat)架构,包括环境准备、Nginx和MySQL的安装,以及Tomcat的安装和测试网页创建。最后,通过修改Nginx配置文件实现负载均衡和反向代理,并验证了配置的有效性。" 111563707,5103771,深入理解Kotlin条件表达式,"['Kotlin', 'Android']
摘要由CSDN通过智能技术生成

1.环境准备说明

服务 ip 操作系统
nginx+mysql+tomcat 192.168.69.134 centos7
[root@qy-lnmt ~]# systemctl stop firewalld.service
[root@qy-lnmt ~]# setenforce 0

2.安装nginx

[root@qy-lnmt ~]#  useradd -r -M -s /sbin/nologin nginx
[root@qy-lnmt ~]# yum -y install pcre-devel openssl openssl-devel gd-devel gcc gcc-c++
[root@qy-lnmt ~]# yum -y groups mark install 'Development Tools'
[root@qy-lnmt ~]# mkdir -p /var/log/nginx
[root@qy-lnmt ~]# chown -R nginx.nginx /var/log/nginx
[root@qy-lnmt ~]# cd /usr/src/
[root@qy-lnmt src]# wget http://nginx.org/download/nginx-1.12.0.tar.gz
[root@qy-lnmt src]# tar xf nginx-1.12.0.tar.gz
[root@qy-lnmt src]# cd nginx-1.12.0
[root@qy-lnmt nginx-1.12.0]# ./configure \
 --prefix=/usr/local/nginx \
 --user=nginx \
 --group=nginx \
 --with-debug \
 --with-http_ssl_module \
 --with-http_realip_module \
 --with-http_image_filter_module \
 --with-http_gunzip_module \
 --with-http_gzip_static_module \
 --with-http_stub_status_module \
 --http-log-path=/var/log/nginx/access.log \
 --error-log-path=/var/log/nginx/error.log
[root@qy-lnmt nginx-1.12.0]# make && make install
[root@qy-lnmt nginx-1.12.0]# echo 'export PATH=/usr/local/nginx/sbin:$PATH' > /etc/profile.d/nginx.sh
[root@qy-lnmt nginx-1.12.0]# . /etc/profile.d/nginx.sh
[root@qy-lnmt nginx-1.12.0]# nginx

在这里插入图片描述

3.安装mysql

[root@qy-lnmt src]# tar xf mysql-5.7.23-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
[root@qy-lnmt src]# cd /usr/local/
[root@qy-lnmt local]# ls
bin  games    lib    libexec                              nginx  share
etc  include  lib64  mysql-5.7.23-linux-glibc2.12-x86_64  sbin   src
[root@qy-lnmt local]# ln -sv mysql-5.7.23-linux-gli
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值