概述
文章目录
-
- 1.环境准备说明
- 2.安装nginx
- 3.安装mysql
- 4.tomcat安装
-
- 4.1安装Tomcat并且给第一个Tomcat创建测试网页
- 4.2给第二个Tomcat创建测试网页
- 4.3 三台服务整合,修改nginx配置文件,配置负载均衡和反向代理
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
最后
以上就是会撒娇大树为你收集整理的nginx部署lnmt架构的全部内容,希望文章能够帮你解决nginx部署lnmt架构所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复