资源预览内容
第1页 / 共13页
第2页 / 共13页
第3页 / 共13页
第4页 / 共13页
第5页 / 共13页
第6页 / 共13页
第7页 / 共13页
第8页 / 共13页
第9页 / 共13页
第10页 / 共13页
亲,该文档总共13页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
最新架设最新架设 lamplamp 配置配置 包括包括 gdgd mamcachemamcache 的配置的配置最新架设 lamp 配置 包括 gd mamcache 的配置 琢磨 linux 有一阵子了,但是了解甚少,有时候甚至是无从下手。 最近研究网上的大虾们的 WEB 配置,自己总结出一下配置。配置环境,就要从服务器本身开始, 首先就是安装好 linux 我用的是 open suse1,安装 Linux作为服务器在安装组件的时候,应该取消掉不用的组件,只要用不上的全 X 掉。基本是除了 FTP SERVER 外全部取消,WEB 组建也取消,因为这里需要编译安装。2,配置 Linux 部署以及调整配置# more /var/log/messages /检查有无系统内核级错误信息# dmesg /检查硬件设备是否有错误信息# ifconfig /查看网卡设置是否正常# ping url /查看网络连接是否正常# export LANG=en_US /设置语言更新系统定时纠正服务器时间 ntp 是一种确保您的时钟保持准确的方法。一般系统默认都安装了NTP 服务# crontab -e0 1 * * * /usr/sbin/ntpdate 210.72.145.44保存退出, /sbin/service crond reload重载计划任务配置服务器将在每天的 1 点 根据国家授时中心 NTP 进行自动校验时间 ftp 服务器配置/系统自带(暂时不考虑)3,安装 mysql apache php Zend Optimizer 等基本环境Apache 日志截断程序# cd /usr/files/# wget http:/cronolog.org/patches/cronolog-1.7.0-beta.tar.gz# tar zxvf cronolog-1.7.0-beta.tar.gz# cd cronolog-1.7.0-beta# ./configure prefix=/usr/local/cronolog# make # make install编译 mysql # cd /usr/files/# wget http:/mirror.provenscaling.com/mysq.-5.0.50.tar.gz/5.0.50 是企业版本 相对与社区版本更加稳定些 # xzvf mysql-5.0.50.tar.gz# cd mysql-5.0.50修改 mysql 客户端最大连接数, 默认的只有 100,远远达不到我们的要求。# vi sql/mysqld.cc“max_connections“, OPT_MAX_CONNECTIONS,“The number of simultaneous clients allowed.“, (gptr*) make install4. 安装 freetypetar zxvf freetype-2.2.1.tar.gzcd freetype-2.1.10./configure -prefix=/usr/local/freetype2 &make & make install5. 安装 jpegmkdir /usr/local/jpeg6mkdir /usr/local/jpeg6/includemkdir /usr/local/jpeg6/libmkdir /usr/local/jpeg6/binmkdir /usr/local/jpeg6/man/mkdir /usr/local/jpeg6/man/man1/tar zxvf jpegsrc.v6b.tar.gzcd jpeg-6b./configure -prefix=/usr/local/jpeg6 -enable-shared -enable-static & make & make test & make installvi /etc/ld.so.conf 加入一行:/usr/local/jpeg6/lib/sbin/ldconf6. 解压 fontconfig 源代码 cd fontconfig-2.3.2./configure -prefix=/usr/local/fontconfig -disable-docs - sysconfdir=/etc -mandir=/usr/share/man & make & make install7. 安装 gdtar zxvf gd-2.0.33.tar.gz cd gd-2.0.33CPPFLAGS=“-I/usr/local/freetype2/include -I/usr/local/jpeg6/include - I/usr/local/libpng2/include -I/usr/local/fontconfig/include“ ./configure - prefix=/usr/local/gd2/ -with-zlib=/usr/local/zlib/ -with- png=/usr/local/libpng2/ -with-jpeg=/usr/local/jpeg6/ -with- freetype=/usr/local/freetype2/ -with-fontconfig=/usr/local/fontconfig configure 的结果:* Configuration summary for gd 2.0.34:Support for PNG library: yesSupport for JPEG library: yesSupport for Freetype 2.x library: yesSupport for Fontconfig library: yesSupport for Xpm library: yesSupport for pthreads: yesmake & make install8. 安装 libxml2(因 php5.02 要求 libxml2 的版本是 libxml2.5.10 or greater required.)tar zxvf libxml2-2.6.27.tar.gzcd libxml2-2.6.27./configure -prefix=/usr/local/libxml2 & make & make install9. 安装 libxslttar zxvf libxslt-1.1.20.tar.gzcd libxslt-1.1.20./configure -prefix=/usr/local/libxslt with-libxml- prefix=/usr/local/libxml2 & make & make install接下来安装 php 了 # tar zxvf php-5.2.5.tar.gz# cd php-5.2.5# ./configure prefix=/usr/local/php -with-apxs2=/usr/local/apache/bin/apxs with-mysql=/ usr/local/mysql with-mysqli=/usr/local/mysql/bin/mysql_config with-libxml-dir=/usr/local /libxml with-iconv enable-static with-gd=/usr/local/gd2/ -with-jpeg-dir=/usr/local/jp eg6/ -with-png-dir=/usr/local/libpng/ -with-freetype-dir=/usr/local/freetype/ -with-zlib- dir=/usr/local/lib/ -with-openssl配置 prefix=/usr/local/php /php 安装路径 -with-apxs2=/usr/local/apache/bin/apxs /apache 路径with-mysql=/usr/local/mysql /mysql 路径with-mysqli=/usr/local/mysql/bin/mysql_config /配置 mysqliwith-libxml-dir=/usr/local/libxml /指定LIBXMLwith-iconv /对 iconv 支持enable-static /编译成静态with-gd=/usr/local/gd2/ /指定 gd -with-jpeg-dir=/usr/local/jpeg6/ -with-png-dir=/usr/local/libpng/ /jpeg png 路径-with-freetype-dir=/usr/local/freetype/ /freetype Gd 不可或缺元素-with-zlib-dir=/usr/local/lib/ -with-openssl /增加对 ssl 支持-enable-sockets enable-soap 将 php 于 apache 整合#vi /usr/local/apache/conf/httpd.conf 在末尾加上 AddType appliaction/x-httpd.php .php找到 DirectoryIndex index.html 改成 DirectoryIndex index.php index.htm index.html找到 # AllowOverride controls what directives may be placed in .htaccess files.# It can be “All“, “None“, or any combination of the keywords:# Options FileInfo AuthConfig Limit#AllowOverride None将 AllowOverride None 改为 All # /usr/local/apache/bin/apachectl restart /重启apache 安装 Zend Optimizer# tar xzvf ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz# ./ZendOptimizer-3.3.0-linux-glibc21-i386/install.sh根据提示照着来就行了。 ,安装 memcached # wget http:/monkey.org/provos/libevent-1.3e.tar.gz# tar zxvf libevent-1.3e.tar.gz# cd libevent-1.3e# ./configure -prefix=/usr/local & make & make install# echo “/usr/local/lib“ /etc/ld.so.conf & ldconfig# wget http:/www.danga.com/memcached/dist/memcached-1.2.3.tar.gz# tar zxvf memcached-1.2.3.tar.gz# cd memcached-1.2.3# ./configure -prefix=/usr
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号