LAMP

CentOS6.8 LAMP

不想你离开。 提交于 2019-11-30 19:39:16
1 安装Apache yum -y install httpd # 设置开机启动chkconfig --list httpd查看 chkconfig httpd on # 进入配置文件进行如下修改 vi /etc/httpd/conf/httpd.conf ServerName localhost:80 DirectoryIndexindex.html index.php index.htm service httpd restart 2 安装MySQL wget https://repo.mysql.com//mysql57-community-release-el6-9.noarch.rpm rpm mysql57-community-release-el6-9.noarch.rpm yum install mysql-community-server service mysqld start # mysql临时密码保存位置:/var/log/mysqld.log chkconfig mysqld on mysql -uroot -p set password for 用户名@localhost = password('新密码'); 3 安装PHP # 安装依赖包 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel

centOS7 LAMP安装及注意要点

十年热恋 提交于 2019-11-30 19:21:37
在VM下安装了centos7体验一下,首先安装一下LAMP环境,如下: 安装LAMP环境: 1、apache2 # yum install -y httpd # systemctl start httpd.service 启动 # systemctl enable httpd.service 开机自动启动 # vi /etc/httpd/conf/httpd.conf 默认配置文件 # systemctl restart httpd.service 重启 2、mysql # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm centOS最小安装,wget没有安装 # yum install -y wget # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server 成功安装之后重启mysql服务 # service mysqld restart 3、 php5.6 # yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-pecl-apcu php-devel php

In PHP, how many DB calls per page is okay?

别来无恙 提交于 2019-11-30 18:45:55
I've got shared hosting on a LAMP set up. Obviously the fewer calls to the Db per page the better. But how many is too many? Two? Ten? A hundred? Curious what people think. That really depends on your (db)servers setup. Try to cache most of information as possible and reduce db calls to a minimum. A database will (almost in every case) be the bottleneck of your service - the higher the usage of your site. So whatever you do try to avoid fireing a query as if not really necessary. I try not to use more than 10 db calls per page, but that really depends on your infrastructure and the information

404 Not Found Error when trying to access localhost on local LAMP server

谁说胖子不能爱 提交于 2019-11-30 18:26:36
问题 I'm running Ubuntu. My Apache2 default file looks like this: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow

在VirtualBox虚拟机搭建SVNManager环境 之一 基础设置

久未见 提交于 2019-11-30 14:32:01
零 概述 本文记述在LINUX下搭建SVNManager的运行环境的方法。SVNManager是一个用PHP开发的开源工程。其官网是: http://svnmanager.sourceforge.net/ 。该官网上也给出了一个看似很详细的安装说明。我在研究初期也是按照该官网上的说明进行安装的,但遇到了很多问题。因此写下本文,以便说明这一路上所现问题的解决方法。 搭建环境有两种策略:策略一,是用 安装包安装 ,该法最大的好处是 方便 ,不足的地方法是需要用到root权限;策略二,是用 源码安装 ,这种方法很自由,并 不依赖 root 权限 ,但是复杂度很大,比较考验人的耐心与抗挫力,成就感也最大。本文先从简单入手,介绍用安装包安装的方法。后面有时间再说说用源码安装的方法。 我的宿主机是WIN7,虚拟机为ubuntu-12.04.2-server-i386,SVNManager为1.09版本。 一 安装ubuntu server与配套工具   其实现在安装大多数的LINUX都是很方便的了。即便不去找资料,按提示输入一般都能把系统安装好。当然有资料参照会更安心一些,这里有一名为《 安装 Ubuntu Server 11.04 以及 LAMP 全过程截图 》的文章,很不错: http://www.oschina.net/question/12_1947 7 安装过程中

大型互联网架构概述,看完文章又涨知识了

旧城冷巷雨未停 提交于 2019-11-30 14:22:33
1. 大型网站系统的特点 高并发、大流量 高可用 海量数据 用户分布广泛,网络情况复杂 安全环境恶劣 需求快速变更,迭代频繁 渐进式发展 2. 大型网站架构演化历程 2.1. 初始阶段架构 问题:网站运营初期,访问用户少,一台服务器绰绰有余。 特征: 应用程序、数据库、文件等所有的资源都在一台服务器上。 描述:通常服务器操作系统使用 linux,应用程序使用 PHP 开发,然后部署在 Apache 上,数据库使用 Mysql,通俗称为 LAMP。汇集各种免费开源软件以及一台廉价服务器就可以开始系统的发展之路了。 2.2. 应用服务和数据服务分离 问题:越来越多的用户访问导致性能越来越差,越来越多的数据导致存储空间不足,一台服务器已不足以支撑。 特征: 应用服务器、数据库服务器、文件服务器分别独立部署。 描述:三台服务器对性能要求各不相同:应用服务器要处理大量业务逻辑,因此需要更快更强大的 CPU;数据库服务器需要快速磁盘检索和数据缓存,因此需要更快的硬盘和更大的内存;文件服务器需要存储大量文件,因此需要更大容量的硬盘。 2.3. 使用缓存改善性能 问题:随着用户逐渐增多,数据库压力太大导致访问延迟。 特征:由于网站访问和财富分配一样遵循二八定律:80% 的业务访问集中在 20% 的数据上。 将数据库中访问较集中的少部分数据缓存在内存中,可以减少数据库的访问次数,降低数据库的访问压力

How to store private encrypted user data in the database, but make them available to other chosen users?

一笑奈何 提交于 2019-11-30 11:41:29
问题 firstly, I apologize if my question sounds little confusing, I will try my best to describe my scenario as detailed as possible: I have website where user can input their personal data about themselves. They are mainly health data, so it's very private and sensitive information. So I need to encrypt this data on the server even then the server is compromised these data are secured because they will be encrypted with each user's password. Of course, user passwords will not be stored as clear

How to enable mod_rewrite in LAMP on ubuntu? [closed]

China☆狼群 提交于 2019-11-30 11:35:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm using Ubuntu 12.04 LTS linux on my machine. I've already installed LAMP on it. Now I want to enable the mod_rewrite module. I did google a lot and tried lots of tricks but couldn't be able to enable mod_rewrite. Can anyone help me to enable the mod_rewrite? Thanks in advance. 回答1: TL;DR version -- do the

How do I use rpm to update/replace existing files?

孤人 提交于 2019-11-30 11:01:09
I have several applications that I wish to deploy using rpm. Some of the files in my application deployments override files from other deployed packages. Simply including the new files in the deployment package will cause rpm conflicts. I am looking for the proper way to use rpm to update/replace already installed files. I have already come up with a few solutions but nothing seems quite right. Maintain custom versions of the rpms containing the original files. This seems like a large amount of work for a relatively small reward even though it feels less like a hack than some of the other

Start & Stop PHP Script from Backend Administrative Webpage

两盒软妹~` 提交于 2019-11-30 10:01:07
问题 I'm trying to create a webpage that will allow me to start and stop of a PHP script. The script is part of the backend of a site, and will need to access, read data from, process that data, and update a database on the same server the script exists on. Additionally, I'd like the webpage to allow an administrator to view the current status (running or stopped), and even link to logs created by the script. I'm starting to go down the path of learning about PHP's exec, passthru, and related