//////////////////////////LAMP环境搭建问题///////////////////////////////////////
LAMP常见的问题
A.安装相关问题
(1)MySQL
a. error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
解决办法 yum install -y libaio-devel

b. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
解决办法 替换掉系统原来自带的 my.cnf :
mv /etc/my.cnf /etc/my.cnf_bak (原因未知,MySQL版本号为 mysql-5.5.52-linux2.6-x86_64)

(2)Apache
a. configure: error: no acceptable C compiler found in $PATH
解决办法,安装gcc
b. 网页里面访问网页出现forbidden
1.查看主配置文件,如果是Deny from all,改为Allow
对于php7.0来说,默认是Require all denied,我们需要把denied改为granted
(3)PHP
a.Sorry, I cannot run apxs. Possible reasons follow:
The output of /usr/local/apache2/bin/apxs follows:
./configure: /usr/local/apache2/bin/apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory
解决办法:因为没安装perl,先 yum install -y perl-devel ,然后修改apxs文件 ,把最上面一行改为/usr/bin/perl 解决

b.上述安装步骤所需要的包
configure: error: xml2-config not found. Please check your libxml2 installation.
yum install -y libxml2-devel
configure: error: Cannot find OpenSSL's <evp.h>
yum install -y openssl openssl-devel
   configure: error: Please reinstall the BZip2 distribution,
yum install -y bzip2 bzip2-devel
   configure: error: jpeglib.h not found.
yum install -y libjpeg-devel
   configure: error: png.h not found.
yum install -y libpng libpng-devel
   configure: error: freetype-config not found.
yum install -y freetype freetype-devel
   configure: error: mcrypt.h not found. Please reinstall libmcrypt.
yum install -y libmcrypt-devel

c.动态编译memcache
使用 /usr/local/php/bin/phpize 后报错:
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
解决办法:
yum install -y autoconf

B.日常使用问题
(1)MySQL
a. 在一次实验当中,不知道什么原因出现了错误
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
在网上排除了挺久的也没找到结果,然后在/data/mysql文件夹里面偶然间瞄到了一个错误日志,/data/mysql/主机名.error,错误日志如下
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
显然,MySQL没有权限访问这个文件,排查出整个data文件夹权限全部为root,修改权限后解决问题
(论错误日志的重要性)

(2)Apache
第一次访问,出现Forbidden403,修改主配置文件的Deny all

(3)PHP
a.遇到php无法解析
1.先查看 /usr/local/apache2/bin/apachectl -M |grep 'php' ,看一下有没有装载 php5_module
2.查看配置文件 /usr/local/apache2/conf/httpd.conf ,看一下有无 AddType application/x-httpd-php .php
3.getenforce ,看看是否关闭了防火墙

b.如果出现时区的问题,在配置文件的timezone里面修改 /Asia/Chongqing

LAMP环境搭建问题的更多相关文章

  1. lamp环境搭建(ubuntu)

    系统:Ubuntu14.04 方法一.最简单的在线安装 (参考网址:http://os.51cto.com/art/201307/405333.htm) 具体过程: [1]打开终端,执行命令 # su ...

  2. LAMP环境搭建教程(原创)

    学习PHP脚本编程语言之前,必须先搭建并熟悉开发环境,开发环境有很多种,例如LAMP.WAMP.MAMP等.这里我介绍一下LAMP环境的搭建,即Linux.Apache.MySQL.PHP环境. 一. ...

  3. LAMP环境搭建教程

    原文:LAMP环境搭建教程 学习PHP脚本编程语言之前,必须先搭建并熟悉开发环境,开发环境有很多种,例如LAMP.WAMP.MAMP等.这里我介绍一下LAMP环境的搭建,即Linux.Apache.M ...

  4. 转载自php100中文网 centos下lamp 环境搭建

    学习PHP脚本编程语言之前,必须先搭建并熟悉开发环境,开发环境有很多种,例如LAMP.WAMP.MAMP等.这里我介绍一下LAMP环境的搭建,即Linux.Apache.MySQL.PHP环境. 一. ...

  5. LAMP 环境搭建之源码包编译安装

    mysql用的二进制包安装. Apache php 用的源码包 mysql版本5.5.46    Apache版本2.4.7  PHP版本:5.5 mysql安装部分参考了阿铭linux的内容. 这是 ...

  6. Lamp环境搭建Linux CentOS6.5编译安装mysql5.6

    经典web开发组合Lamp环境搭建之mysql安装详解 安装前准备 通过rpm命令检查centos上是否已经安装mysql,然后卸载已经存在的mysql版本 [root@localhost src]# ...

  7. ubuntu上lamp环境搭建

    首先,介绍个彻底删除linux已经安装的软件的方法. sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-5. ...

  8. linux的基本操作(LAMP环境搭建)

    LAMP 环境搭建 经过前部分章节的学习,你已经掌握了linux的基础知识了.但是想成为一名系统管理员恐怕还有点难度,因为好多单位招聘这个职位的时候都要求有一定的工作经验.然而真正的经验一天两天是学不 ...

  9. lamp环境搭建(centos6.9+apache2.4+mysql5.7+php7.1)

    lamp环境搭建(centos6.9+apache2.4+mysql5.7+php7.1) 安装前准备:CentOS 6.9 64位 最小化安装 yum install -y make gcc gcc ...

随机推荐

  1. 距离,margin padding ,width height 用法 ,记录

    margin:0 auto 表示什么意思 margin后面如果只有两个参数的话,第一个表示top和bottom,第二个表示left和right 因为0 auto,表示上下边界为0,左右则根据宽度自适应 ...

  2. pigeonhole principle 哈希表的重复问题(冲突)是不可避免的

    https://en.wikipedia.org/wiki/Pigeonhole_principle Sock-picking Assume a drawer contains a mixture o ...

  3. ES6学习笔记(一)——let和const

    1.ES6学习之let.const (1).var.let.const 变(常)量声明 ES5 只有全局作用域和函数作用域,没有块级作用域,这带来很多不合理的场景. 在ES6中let就诞生了,实际上它 ...

  4. android自定义控件(二)Canvas

    一.重要方法 1.translate 2.scale 3.rotate 二.注意 1.明确顺序 canvas.rotate(45); canvas.drawRect(new Rect(50, 50, ...

  5. Selenium chrome配置不加载图片

    from selenium import webdriver chrome_options = webdriver.ChromeOptions() prefs = {"profile.man ...

  6. http的keep-alive和tcp的keepalive区别

    原文地址:http://blog.csdn.net/oceanperfect/article/details/51064574 1.HTTP Keep-Alive在http早期,每个http请求都要求 ...

  7. 剑指offer 面试31题

    面试31题: 题目:栈的压入.弹出元素 题:输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否为该栈的弹出顺序.假设压入栈的所有数字均不相等.例如序列1,2,3,4,5是某栈的压入顺序 ...

  8. C#中往数据库插入空值报错解决方法

    C#中的NUll于SQL中的null是不一样的, SQL中的null用C#表示出来就是DBNull.Value 在用C#往数据库里面插入记录的时候, 可能有的字段你不赋值,那么这个字段的值就为null ...

  9. deeplink

    http://www.cnblogs.com/shadajin/p/5724117.html Deeplink,简单讲,就是你在手机上点击一个链接之后,可以直接链接到app内部的某个页面,而不是app ...

  10. 转:Windows下USB接口驱动技术(一)