文档详情

LAMP安装教程.doc

发布:2017-05-17约7.2千字共10页下载文档
文本预览下载声明
LAMP环境配置安装注意安装步骤及说明事项。 附件: 1. 访问ftp报错 解决: 关闭selinux vi /etc/selinux/config 内容修改为: selinux=disable 之后重启reboot。 下图分别为selinux关闭前 和 关闭后: 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: # 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 //这个配置编译命令不要加目录参数 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/stop/restart #测试apache 浏览器打开: http://虚拟机IP 看到 it works!,即为成功 配置虚拟主机 1)配置host文件 打开C:/windows/system32/drivers/etc/hosts 文件 增加域名记录 如: 8 8 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 webmaster@ DocumentRoot /usr/local/http2/htdocs/ec1 ServerName ServerAlias ErrorLog logs/-error_log CustomLog logs/-access_log common /VirtualHost VirtualHost *:80 ServerAdmin webmaster@ DocumentRoot /usr/local/http2/htdocs/ec2 ServerName ErrorLog logs/-error_log CustomLog logs/-access_log common /VirtualHost VirtualHost *:80 DocumentRoot /var/www/shop ServerName /VirtualHost 注意:/var/www/shop 以上三个目录var www shop 的其他用户必须有x可执行权限 3) shell# cd /usr/local/http2/htdocs shell# mkdir ec1 ec2 shell# echo this is ec1/index.html shell# echo this is ec2/index.html 4)重启apache /usr/local/http2/bin/apachectl restart 5)浏览器打开,和 看到不同的网站内容,虚拟主机创建完毕! 安装图形库,为编译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#
显示全部
相似文档