LAMP

lamp架构

南楼画角 提交于 2019-12-02 18:35:06
1、讲述httpd工作原理以rpm包的方式安装LAMP,配置基于域名的虚拟机主机并部署PhpMyAdmin、WordPress(提供https)、discuz http协议介绍 http/0.9:1991,原型版本,功能简陋,只有一个命令GET。GET /index.html ,服务器只能回应HTML格式字符串,不能回应别的格式 http/1.0: 1996年5月,支持cache, MIME, method 每个TCP连接只能发送一个请求,发送数据完毕,连接就关闭,如果还要请求其他资源,就必须再新建一个连接 引入了POST命令和HEAD命令 头信息是 ASCII 码,后面数据可为任何格式。服务器回应时会告诉客户端,数据是什么格式,即Content-Type字段的作用。这些数据类型总称为MIME 多用途互联网邮件扩展,每个值包括一级类型和二级类型,预定义的类型,也可自定义类型, 常见Content-Type值:text/xml image/jpeg audio/mp3 http/1.1:1997年1月 引入了持久连接(persistent connection),即TCP连接默认不关闭,可以被多个请求复用,不用声明Connection: keep-alive。对于同一个域名,大多数浏览器允许同时建立6个持久连接 引入了管道机制(pipelining)

如何跨不同版本K8S,为有状态工作负载做蓝绿部署

心已入冬 提交于 2019-12-02 17:45:44
容器的生态正在爆发!不仅仅应用层在快速变化,还有用于管理应用程序的平台:Kubernetes,也在快速变化。这就为Ops团队带来了一个必须要解决的难题。IT团队如何才能保证一款应用程序能够在各种不同版本的Kubernetes上都能良好运行呢? PX-Motion演示视频:如何跨不同版本Kubernetes,为有状态的工作负载做蓝绿部署 蓝-绿部署是一种专门用于解决这一问题的技术,并能够降低生产环境部署的过程中的停机或错误风险。在蓝绿部署场景下,用户需要构建两个完全相同的生产环境(分别称为蓝与绿),这两个环境之间仅在需要部署的新的变更方面存在差异。每一次仅激活一个环境,两个环境之间的数据传输也是部署过程的一部分。该技术对于不含任何数据的无状态应用非常有效,但对于数据库这类有状态应用则存在一定的困难,因为用户不得不保留两份生产数据副本。这种情况下可能会需要使用Postgres、MySQL以及其他数据库备份和恢复脚本,或定制化操作手册或自动脚本等将数据从一个数据源人工移动到另一个数据源,这个过程将会非常复杂并且会耗费大量的时间。 Portworx采用PX-Motion解决了有状态应用程序的蓝绿部署过程中的数据管理问题。PX-Motion使IT团队能够很方便地在各种环境之间进行数据和应用配置的迁移,极大地简化了有状态应用的蓝绿部署。 本篇博文将对PX-Motion的功能与能力进行探讨

《大型网站技术架构——核心原理与案例分析》第1章:大型网站架构演化

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 15:47:27
架构演进面临的挑战及解决思路 ——来自 《10分钟搞懂互联网系统演进规律:支撑亿级用户的架构都是这样来的!》 互联网主要面对的技术挑战, 用一句话概括:就是用户不断上升产生的并发访问压力以及数据存储压力,所以系统需要更强的处理能力才能解决这些问题。 而系统处理能力提升,主要有两种途径: 1. 垂直伸缩 : 提升单台服务器的处理能力,比如用更快频率的cpu,用更多核的cpu,用更大的内存,用更快的网卡,用更多的磁盘组成一台服务器,使单台服务器的处理能力得到提升,通过这种手段提升系统的处理能力。 缺点如下: a.当垂直伸缩达到一定程度以后,继续增加计算需要花费更多的钱。 b.垂直伸缩是有物理极限的,即使是大型机,也有自己的物理极限,它不可能无限地伸缩下去的。 c.操作系统的设计或者应用程序的设计制约着垂直伸缩,最多只能达到一个点无法继续提高。 在大型互联网出现之前,传统的软件,比如银行、电信这些企业的软件系统,主要是使用垂直伸缩这种手段实现系统能力提升的 ,在服务器上增强,提升服务器的硬件水平。当某种类型的服务器能力提升到了瓶颈以后,就会用更强大的服务器,比如说从服务器升级到小型机,从小型机提升到中型机,从中型机提升到大型机,服务器越来越强大,处理能力越来越强大,当然价格也越来越昂贵,运维越来越复杂。 2. 水平伸缩 : 单机的处理能力并不提升,也不使用更昂贵的更快的更厉害的硬件

Docker : How To Dockerize And Deploy multiple instances of a LAMP Application

蹲街弑〆低调 提交于 2019-12-02 15:39:48
I need to deploy many instances of the same LAMP (or LEMP) application : each instance will be accessible from a subdomain, with front loadbalancer/ proxy each instance must have its own db data and files data. each instance might be monitored memory limit / cpu might be set per app instance easy to automate the deployment of an new webapp instance environment might be easily reproducible for test and development. Application requires : dameon processes ( Nginx , MariaDB , PHPFPM ) binaries ( composer , bower , ...) other systems specific libs & config After reading Docker documentation and

Best practices for deploying tools & scripts to production?

左心房为你撑大大i 提交于 2019-12-02 14:44:23
I've got a number of batch processes that run behind the scenes for a Linux/PHP website. They are starting to grow in number and complexity, so I want to bring a small amount of process to bear on them. My source tree has a bunch of cpp files and scripts, organized with development but not deployment in mind. After compiling all the executables, I need to put various scripts and binaries on a cluster of machines. Different machines need different executables, scripts, and config files for their batch processes. I also have a few of tools that I've written that belong on every machine. At the

apache not returning index.php as default

此生再无相见时 提交于 2019-12-02 14:18:20
问题 I recently made a DigitalOcean droplet with LAMP pre-installed. Went and uploaded my website (including index.php) to /var/www Apache just returns the It Works! page, I have to manually add /index.php to my url Things I have tried: Made an .htaccess file containing "DirectoryIndex index.php" Adding DirectoryIndex index.php to apache2.conf Set index.php first in dir.conf Making an index.html, didn't show that either. EDIT: here's my apache2.conf file: http://pastebin.com/BMgiNdiD 回答1: You are

Amazon EC2 as web server? [closed]

不想你离开。 提交于 2019-12-02 13:53:13
I have thought a lot recently about the different hosting types that are available out there. We can get pretty decent latency (average) from an EC2 instance in Europe (we're situated in Sweden) and the cost is pretty good. Obviously, the possibility of scaling up and down instances is amazing for us that's in a really expansive phase right now. From a logical perspective, I also believe that Amazon probably can provide better availability and stability than most hosting companies on the market. Probably it will also outweigh the need of having a phone number to dial when we wonder anything

How to convert Linux cron jobs to “the Amazon way”?

大城市里の小女人 提交于 2019-12-02 13:49:26
For better or worse, we have migrated our whole LAMP web application from dedicated machines to the cloud (Amazon EC2 machines). It's going great so far but the way we do crons is sub-optimal. I have a Amazon-specific question about how to best manage cron jobs in the cloud using "the Amazon way". The problem : We have multiple webservers, and need to run crons for batch jobs such as creating RSS feeds, triggering emails, many different things actually. BUT the cron jobs need to only run on one machine because they often write to the database so would duplicate the results if run on multiple

What are the downsides of longer directory paths/names and URL's on a LAMP site?

泄露秘密 提交于 2019-12-02 12:39:23
What are the downsides of longer directory paths/names and URL's on a LAMP site? I am trying to organize images on my sites as efficiently as possible, and I'm keen on using many nested directories so that no sub-directory has more than 1,000 sub-directories. In a worst-case scenario, images would be stored looking something like this: ./images/76/543/7654321/640/1.jpg Are there any serious downsides to having so many sub-directories vs. something simpler like this: ./i/a7/c3/5e.jpg I suppose the more sub-directories the Server has to dig in to, the longer it's going to take, and the longer

使用Shell脚本一键部署基础LAMP架构

牧云@^-^@ 提交于 2019-12-02 10:53:40
使用Shell脚本一键部署基础LAMP架构 安装顺序:apache→mysql→PHP 实验所需软件包:链接: https://pan.baidu.com/s/1tKAjqn50NnR7F3JmzyHF1w 提取码:1xpr #!/bin/bash #一键自动构建LAMP架构(请使用source执行或者使用.命令执行) #数据库默认密码为123123 #远程挂载 df - hT | grep - o "cifs" if [ $? -ne 0 ] ; then echo "Start mount" yum install expect - y read - p "请输入提供硬盘主机IP:" gongip / usr / bin / expect << - EOF spawn mount . cifs / / $gongip / LAMP - C7 / mnt / expect { "Password*" { send "\r" } } expect eof EOF fi #安装apache服务 cd / mnt / tar zxf apr - 1 . 6 . 2 . tar . gz - C / opt tar zxf apr - util - 1 . 6 . 0 . tar . gz - C / opt / tar jxf httpd - 2 . 4 . 29 . tar .