当前位置: 首页 > news >正文

登陆网站空间的后台附近旧模板出售市场

登陆网站空间的后台,附近旧模板出售市场,南平网站建设wzjseo,大学生自学网如果你想拥有你从未拥有过的东西#xff0c;那么你必须去做你从未做过的事情 之前咱们学习了LNMP架构#xff0c;但是PHP对于技术来说确实是老掉牙了#xff0c;PHP的市场占有量越来越少了#xff0c;我认识一个10年的PHP开发工程师#xff0c;十年工资从15k到今天的6k那么你必须去做你从未做过的事情 之前咱们学习了LNMP架构但是PHP对于技术来说确实是老掉牙了PHP的市场占有量越来越少了我认识一个10年的PHP开发工程师十年工资从15k到今天的6k现在比较主流的是Java前端实现界面访问,但是Java需要特定的web服务进行解析展示今天咱们学习tomcat的安装部署话不多说直接开干~~~~ 目录 一、安装java环境配置tomcat 二、部署Java环境的Tomcat部署zrlog项目 三、搭建LNMT架构httpsnginx负载均衡mysql数据库tomcat服务 四、配置session会话保持 欢迎交流在学习过程中如果你有任何疑问或想法欢迎在评论区留言我们可以共同探讨学习的内容。你的支持是我持续创作的动力 点赞、收藏与推荐如果你觉得这篇文章对你有所帮助请不要忘记点赞、收藏并分享给更多的小伙伴你们的鼓励是我不断进步的源泉 推广给更多人如果你认为这篇文章对你有帮助欢迎分享给更多对Linux感兴趣的朋友让我们一起进步共同提升 一、安装java环境配置tomcat 安装java环境yum install java -y 或者上传rpm包 rpm -ivh jdk....rpm 查看是否安装成功 [rootweb01 ~]# rpm -qa|grep jdk jdk1.8-1.8.0_181-fcs.x86_64 安装tomcat下载 Tomcat、解压、启动 Tomcat官网: https://tomcat.apache.org/ [rootweb01 ~]#wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.98/bin/apache-tomcat-9.0.98.tar.gz [rootweb01 ~]#mkdir /soft [rootweb01 ~]#tar xf apache-tomcat-9.0.98.tar.gz -C /soft/ [rootweb01 ~]#ln -s /soft/apache-tomcat-9.0.98/ /soft/tomcat [rootweb01 ~]# /soft/tomcat/bin/startup.sh     # 启动 [rootweb01 ~]# /soft/tomcat/bin/shutdown.sh # 停止 # 8080 对外提供服务的端口 # 8005 关闭Tomcat端口 [rootweb01 ~]# netstat -lntp |grep java tcp6    0    0 127.0.0.1:8005     :::*           LISTEN    6867/java       tcp6    0    0 :::8080           :::*           LISTEN    6867/java 配置systemc方式启动 [rootweb01 soft]#vim /usr/lib/systemd/system/tomcat.service [Unit] DescriptionApache Tomcat Server Afternetwork.target remote-fs.target nss-lookup.target ​ [Service] Typeforking ExecStart/soft/tomcat/bin/startup.sh ExecStop/soft/tomcat/bin/shutdown.sh ExecRestart/soft/tomcat/bin/shutdown.sh sleep2 /soft/tomcat/bin/star tup.sh ​ [Install] WantedBymulti-user.target 重载tomcat加入开机自启 [rootweb01 ~]# systemctl daemon-reload [rootweb01 ~]#systemctl enable tomcat Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat.service to /usr/lib/systemd/system/tomcat.service. tomcat配置文件 tomcat软件目录结构 bin          ---主要包含启动和关闭tomcat的脚本启停java脚本依赖jar包文件 conf            ---tomcat配置文件的目录(站点配置server.xml) lib           ---tomcat运行时需要加载的jar包 logs            ---tomcat日志存放位置 temp            ---tomcat临时存放文件路径 webapps       ---tomcat默认站点目录 work            ---tomcat运行时产生的缓存文件 ​ 关闭防火墙 [rootweb01 ~]#systemctl stop firewalld.service iptables [rootweb01 ~]#systemctl disable firewalld.service iptables ​ ​ 测试添加一个虚拟主机 [rootweb01 conf]#vim server.xmlHost namewww.yuxiaopi.cn  appBase/code/tomcatunpackWARstrue autoDeploytrueValve classNameorg.apache.catalina.valves.AccessLogValve directorylogsprefixyuxiaopi suffix.logpattern%h %l %u %t quot;%rquot; %s %b //Host mkdir -p /code/tomcat/ROOT [rootweb01 conf]#echo 学运维找小屁 /code/tomcat/ROOT/index.html [rootweb01 conf]#vim /code/tomcat/ROOT/index.html ?xml version1.0 encodingUTF-8? 学运维找小屁 ​ 二、部署Java环境的Tomcat部署zrlog项目 定义虚拟主机 [rootweb01 conf]#vim server.xml Host namezrlog.yunzhongzi.com  appBase/code/zrlog #添加域名和软件存放的位置unpackWARstrue autoDeploytrue ​Valve classNameorg.apache.catalina.valves.AccessLogValve directorylogsprefixzrlog suffix.log #修改日志文件的名称pattern%h %l %u %t quot;%rquot; %s %b //Host 配置环境 [rootweb01 conf]#mkdir /code/zrlog/ROOT -p [rootweb01 conf]#cd /code/zrlog 将准备好的ROOT.war文件拖拽至zrlog环境里可以自动解压war包如果没解压可以重启tomcat服务 进入10.0.0.51服务器新建zrlog数据库 [rootdb01 ~]#mysql -uroot -pqy123.com MariaDB [(none)] create database zrlog; Query OK, 1 row affected (0.01 sec) MariaDB [(none)] show databases; -------------------- | Database           | -------------------- | information_schema | | mysql             | | performance_schema | | she               | | test               | | wp                 | | zrlog             | -------------------- windows端做完hosts解析 访问zrlog.yunzhongzi.com创建即可 三、搭建LNMT架构httpsnginx负载均衡mysql数据库tomcat服务 配置nfs web01操作如下 [rootweb01 ~]# scp -rp /soft 10.0.0.8:/ [rootweb01 ~]# scp -rp /code/zrlog 10.0.0.8:/code/zrlog [rootweb01 ~]# scp /usr/lib/systemd/system/tomcat.service 172.16.1.8:/usr/lib/systemd/system/tomcat.service web02操作如下 [rootweb02 ~]#ln -s /soft/apache-tomcat-9.0.98/ /soft/tomcat [rootweb02 ~]# systemctl daemon-reload [rootweb02 ~]# systemctl start tomcat [rootweb02 ~]# systemctl enable tomcat Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat.service to /usr/lib/systemd/system/tomcat.service. [rootweb02 ~]# yum install nfs-utils -y 配置nfs共享目录 [rootnfs ~]# cat /etc/exports [rootnfs ~]#vim /etc/exports /data 172.16.1.0/24(rw,sync,all_squash,anonuid666,anongid666) /code/wp 172.16.1.0/24(rw,sync,all_squash,anonuid666,anongid666) /code/zrlog 172.16.1.0/24(rw,sync,all_squash,anonuid666,anongid666) 新建挂载的目录 [rootnfs code]#mkdir zrlog 修改目录权限 [rootnfs code]#chown -R www.www zrlog [rootnfs code]#ll total 0 drwxr-xr-x 2 www www  6 May  9 22:39 she drwxr-xr-x 3 www www 18 Apr 27 20:25 wp drwxr-xr-x 2 www www  6 May 10 17:17 zrlog 重启nfs [rootnfs code]#systemctl restart nfs 挂载部署playbook的时候写入开机自动挂载 [rootweb02 image]#mount -t nfs 172.16.1.31:/code/zrlog /code/zrlog/ROOT/attached/ 配置负载均衡 [rootlb01 conf.d]#vim zrlog.conf upstream zrlog {server 10.0.0.7:8080;server 10.0.0.8:8080; } server {listen 443 ssl;server_name zrlog.yunzhongzi.com;ssl_certificate ssl_key/server.crt;ssl_certificate_key ssl_key/server.key; ​location / {proxy_pass http://zrlog;include proxy_params;} } server {listen 80;server_name zrlog.yunzhongzi.com;return 302 https://$server_name$request_uri; } 密钥文件已经存在服务器直接引用即可但记得调整web端的服务的属主属组为www 四、配置session会话保持 db01上的redis会话保持功能已经安装完成并开启 [rootweb01 ~]# wget https://github.com/ran-jit/tomcat-cluster-redis-session-manager/releases/download/4.0/tomcat-cluster-redis-session-manager.zip 1.解压zip包   [rootweb01 ~]# unzip tomcat-cluster-redis-session-manager.zip 2.拷贝jars到tomcat的/lib目录中 [rootweb01 ~]# cp tomcat-cluster-redis-session-manager/lib/* /soft/tomcat/lib/ 3.拷贝conf下的redis.properties文件,到tomcat的conf文件 [rootweb01 ~]# cp tomcat-cluster-redis-session-manager/conf/redis-data-cache.properties /soft/tomcat/conf/ 4.将配置文件中连接redis地址修改为如下地址即可 [rootweb01 ~]# vim /soft/tomcat/conf/redis-data-cache.properties redis.hosts172.16.1.51:6379 5.添加如下两行至tomcat/conf/context.xml (添加在/Context 上一行 ) [rootweb01 ~]# vim /soft/tomcat/conf/context.xml Valve classNametomcat.request.session.redis.SessionHandlerValve / Manager classNametomcat.request.session.redis.SessionManager / 注意: 修改完一台直接和另外一台进行无差异同步rsync --delete 修改完成后重启Tomcat 今天的LNMT架构就介绍到这里了接下来介绍一下nginx的优化和防火墙~~~ 想成为大佬就要从小白开始从0开始一点一点的积累慢慢成长明天你就是大佬想学习更多麒麟操作系统的知识关注小屁让你成为运维老鸟~~~~~
http://www.hkea.cn/news/14309197/

相关文章:

  • 济南网站建设app一键开启网站
  • 织梦网站源码转换成wordpress郑州市网络设计
  • 中国保密在线网站培训阿里巴巴做外贸流程
  • 深圳住建设局官方网站电商营销策划方案
  • 商城网站怎么建设哈尔滨房地产型网站建设
  • 奇信建设集团官方网站做平面设计兼职的网站
  • 网站评估内容 优帮云wordpress 修改
  • 自助建站系统模板大连装修网站推广
  • thinkphp做企业网站seo是免费推广吗?
  • 网站智能云wordpress更换网站域名
  • 网站开发合同注意事件有哪些北京小程序开发多少钱
  • 青岛建网站的公司东莞市疾控中心官网
  • 网站开发报价方案电子商务的网站案例
  • 河南建筑业城乡建设网站查询免费微信微网站模板下载
  • 工商核名在哪个网站长沙网站seo技术厂家
  • 网页制作网站首页龙华建网站多少钱
  • 必应搜索网站代码运行框wordpress
  • 网站负责人 备案网站开发 后端服务
  • wordpress开启子域名多站点模式微网站 小程序 区别
  • 百度站长验证网站失败重庆的网站建设公司
  • 用树莓派做网站服务器网站备案为什么要闭站
  • 北京网站建设公司 北京网站设计 网页设计制作 高端网站建设 分形科技菏泽建设企业网站
  • 网站怎么做图片动态图片不显示不出来的专做负面的网站
  • 协会网站制作好用的ppt模板网站
  • 网站开发技术选型网站策划建设方案书
  • 注册了域名 网站怎么做万网域名注册信息查询
  • 网站如何搭建开发一个电商app软件多少钱
  • 山东省建设厅网站查网站建设规划模板
  • 范县网站建设电话全椒县城乡规划建设局网站
  • 软件it网站建设方案wordpress的支付插件