欢迎来到天天文库
浏览记录
ID:42783141
大小:34.00 KB
页数:5页
时间:2019-09-22
《Debian安装LAMP详解》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、选取Debian为环境。1.apache2如果要让apache完全在root用户下运行#vi~/.bashrcexportCFLAGS='-Wall-DBIG_SECURITY_HOLE'。并且安装完后要修改apache配置文件#vi/usr/local/apache2/conf/httpd.conf修改User和Group为root。安装apr:#tarxvfhttpd-2.2.15.tar.gz#cdhttpd-2.2.15#cdsrclib/apr#./configure--prefix=/usr/local
2、/apr#make#makeinstall#makeclean#makedistclean安装apr-util:#cd../apr-util#./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr#make#makeinstall#makeclean#makedistclean安装apache:最后安装apache#./configure--prefix=/usr/local/apache2--enable-mods-shared=all--
3、enable-cache--enable-file-cache--enable-mem-cache--enable-disk-cache--enable-static-support--enable-static-htpasswd--enable-static-htdigest--enable-static-rotatelogs--enable-static-logresolve--enable-static-htdbm--enable-static-ab--enable-static-checkgid--disa
4、ble-cgi--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--enable-dav--enable-so如果提示apr-util版本过低,那么可能是你的Linux发行版内置了apr库,所以将自己安装的apr和apr-util库卸载,并且将apache的配置参数中的--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util,修改为--with-included-apr和--with
5、-included-apr-util。如果编译的时候zlib有问题,安装zlib,而且要按照默认路径/usr/local安装。#make#makeinstall#makeclean#makedistclean#vi/etc/rc.local在exit0之前添加:/usr/local/apache2/bin/apachectlstart如出现错误:/usr/lib/libexpat.so:couldnotreadsymbols:Fileinwrongformat解决方法:编译时增加编译参数--with-expat=b
6、uiltin好像在64位服务器下编译脚本在定位系统expat支持时有些问题。通过指定expat,用系统自带的expat来编译就不存在这个问题了。测试/usr/local/apache2/bin/apachectlstart如果出现错误。httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname,using192.168.1.201forServerName修改apache配置文件#vi/usr/local/apache2/conf/httpd
7、.conf找到ServerNamelocalhost:80,将注释取消掉。-------------------------------------------------------------------------------apache安装完毕------------------------------------------------------------------------------2.安装MySQL#tar-zxvfmysql-5.1.30.tar.gz#cdmysql-5.1.30#gro
8、upadd-rmysql//添加mysql用户组#useradd-m-r-gmysql-d/var/lib/mysql-s/bin/bash-c"MySQLServer"mysql//添加mysql用户#./configure--prefix=/usr/local/mysql--sysconfdir=/etc--localstatedir=/var/lib/
此文档下载收益归作者所有