LAMP安装种种难点一蹴而就方案

作者: 计算机网络  发布:2019-12-26

LAMP安装各个难点解决方案,lamp安装解决方案

LAMP景况安插安装注意安装步骤及表明事项。

LAMP安装各类主题材料消除

1. 访问ftp报错

图片 1

解决:

关闭selinux

vi /etc/selinux/config

内容改造为: selinux=disable

今后重启reboot。

下图分别为selinux关闭前 和 关闭后:

图片 2

图片 3

2. 依据软件查询

一.安装gcc

gcc

    cloog-ppl

        ppl(libppl.so.7/libppl_c.so.2)

    cpp

mpfr(libmpfr.so.1)

gcc-c++

    libstdc++-devel

mpfr-2.4.1-6.el6.i686.rpm和ppl-0.10.2-11.el6.i686.rpm

 

 

快捷键rz sz:

rz、sz命令没找到?

安装lrzsz即可:

shell># yum -y install lrzsz

 

二.安装zlib压缩库

shell>## cd /home/jinnan/tar

shell># tar –zxvf zlib-1.2.5.tar.gz

shell># cd zlib-1.2.5

shell># ./configure     //那几个布局编写翻译命令不要加目录参数

shell># make && make install

 

三.安装apache

shell># cd /home/jinnan/tar

shell># tar -jxvf httpd-2.2.19.tar.bz2

shell># cd httpd-2.2.19

shell>#./configure --prefix=/usr/local/http2

        --enable-modules=all

        --enable-mods-shared=all

        --enable-so

shell># make && make install

 

启动Apache

shell># /usr/local/http2/bin/apachectl start

 

#测试apache

浏览器打开:

看到 "it works!",即为成功

 

配备虚构主机

1)配置host文件

打开C:/windows/system32/drivers/etc/hosts 文件

充实域名记录

如:

192.168.9.38    www.ec1.com

192.168.9.38    www.ec2.com

2卡塔尔(قطر‎ 扩展设想主机

vi /usr/local/http2/conf/httpd.conf

取消# Include conf/extra/httpd-vhosts.conf

那后生可畏行前边的#号

保留退出

 

vi /usr/local/http2/conf/extra/httpd-vhosts.conf

充实虚构主机记录

 

<VirtualHost *:80>

    ServerAdmin [email protected]

    DocumentRoot "/usr/local/http2/htdocs/ec1"

    ServerName www.ec1.com

    ServerAlias www.dummy-host.example.com

    ErrorLog "logs/dummy-host.example.com-error_log"

    CustomLog "logs/dummy-host.example.com-access_log" common

</VirtualHost>

<VirtualHost *:80>

    ServerAdmin [email protected]

        DocumentRoot "/usr/local/http2/htdocs/ec2"

    ServerName www.ec2.com

    ErrorLog "logs/dummy-host2.example.com-error_log"

    CustomLog "logs/dummy-host2.example.com-access_log" common

</VirtualHost>

<VirtualHost *:80>

        DocumentRoot "/var/www/shop"

    ServerName www.ec1.com

</VirtualHost>

小心:/var/www/shop 以上五个目录var www shop 的别的客户必需有x可进行权限

图片 4

图片 5

图片 6

 

 

3)

    shell># cd /usr/local/http2/htdocs

    shell># mkdir ec1 ec2

    shell># echo this is ec1.com > ec1/index.html

    shell># echo this is ec2.com > ec2/index.html

 

4)重启apache

/usr/local/http2/bin/apachectl restart

 

 

5卡塔尔(قطر‎浏览器展开www.ec1.com,和www.ec2.com

来看差异的网址内容,设想主机创设实现!

 

设置图形库,为编写翻译PHP做筹算

libxml2-2.7.2.tar.gz

jpegsrc.v8b.tar.gz

libpng-1.4.3.tar.gz

freetype-2.4.1.tar.gz

gd-2.0.35.tar.gz

 

四.安装libxml2

shell># cd /home/jinnan/tar

shell># tar zxvf libxml2-2.7.2.tar.gz

shell># cd libxml2-2.7.2

shell>#./configure --prefix=/usr/local/libxml2

--without-zlib

shell># make && make install

 

五.安装jpeg8

shell># cd /home/jinnan/tar

shell># tar -zxvf jpegsrc.v8b.tar.gz

shell># cd jpeg-8b

shell>#./configure --prefix=/usr/local/jpeg

--enable-shared --enable-static

shell># make && make install

--enable-shared 把jpeg需求的函数库程序都编译到该软件里边

优点:函数调用速度快

                 劣点:软件本身超大

--enable-static 静态格局函数管理,要求哪些函数,立刻include来

优点:软件本人十分的小

缺点:函数调用速度慢

六.安装libpng

shell># cd /home/jinnan/tar

shell># tar zxvf libpng-1.4.3.tar.gz

shell># cd libpng-1.4.3

shell>#./configure #和zlib同样不要带参数,让它暗中认可安装到相应目录

shell># make && make install

 

七.安装freetype(字体库)

shell># cd /home/jinnan/tar

shell># tar zxvf freetype-2.4.1.tar.gz

shell># cd freetype-2.4.1

shell>#./configure --prefix=/usr/local/freetype

shell># make && make install

 

八.安装GD库

shell># cd /home/jinnan/tar

shell># tar -zvxf gd-2.0.35.tar.gz

shell># mkdir -p /usr/local/gd

shell># cd gd-2.0.35

shell>#./configure --prefix=/usr/local/gd

            --with-jpeg=/usr/local/jpeg/     

            --with-png --with-zlib

            --with-freetype=/usr/local/freetype

shell># make && make install

 

九.安装 php5

shell># cd /home/jinnan/tar

shell># tar -jxvf php-5.3.6.tar.bz2

shell># cd php-5.3.6

shell>#./configure --prefix=/usr/local/php

            --with-apxs2=/usr/local/http2/bin/apxs

            --with-mysql=mysqlnd

            --with-pdo-mysql=mysqlnd

            --with-mysqli=mysqlnd

            --with-freetype-dir=/usr/local/freetype

            --with-gd=/usr/local/gd

            --with-zlib --with-libxml-dir=/usr/local/libxml2

            --with-jpeg-dir=/usr/local/jpeg

            --with-png-dir

            --enable-mbstring=all

            --enable-mbregex

            --enable-shared

shell># make && make install

复制php.ini配置文件到钦定目录

shell># cp php.ini-development /usr/local/php/lib/php.ini

 

布局Apache使其协助php

vi /usr/local/http2/conf/httpd.conf

AddType application/x-httpd-php .php    

 

<IfModule dir_module>

DirectoryIndex index.html

</IfModule>

在index.html 前边增添index.php

 

vi /usr/local/apache2/htdocs/index.php    

输入如下内容:

<?php

phpinfo();

?>

 

shell># /usr/local/http2/bin/apachectl restart

 

若果见到php新闻,事业就瓜熟蒂落了!

 

  • ps –A | grep http
  • 杀死apache对应进度

图片 7

killall httpd 杀死全部的httpd进程

 

LAMP蒙受布署安装注意安装步骤及注明事项。 LAMP安装各类主题材料消除 1. 拜谒ftp报错 消除: 关闭...

本文由金沙澳门官网送注册58发布于计算机网络,转载请注明出处:LAMP安装种种难点一蹴而就方案

关键词:

上一篇:Python达成不忧虑肠滤文本段的秘籍
下一篇:没有了