您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > linux WEB全能服务器配置
先送上软件包:相关软件包下载地址Apache(httpd)://cn2.php.net/get/php-5.0.5.tar.gz/from/a/mirrorfreeTDS://java.sun.com/j2se/1.4.2/download.htmlTomcat://(Mysql,MsSql)://=en其它:(优化PHP)ZendOptimizerZendOptimizer2.1.0bUR=13&zbid=548涉及软件包:libtool-1.5.22.tarlibxml2-2.6.19.tar#wget://ftp.gnome.org/pub/GNOME/s...bxslt-1.1.15.tar.gzfreetype-2.1.10.tarapr-1.1.1.tarapr-util-1.1.1.tarlibpng-1.2.8.tarcurl-7.15.0.tar.gz://让MYSQL管理WEB化:phpMyAdmin-2.8.2.4.tar这些软件都可以到下载得到,我就不写详细了!纲要:一,Apache的安装二,编译安装PHP(支持GD)三,MYSQL的安装四,JSP环境的支持五,企业虚拟主机配置实战方案一,Apache(httpd)的安装1.rpm(redhat自带的安装)2.重新编译源代码安装1,RPM包的安装:[root@linuxheroroot]#rpm-qa|grephttpd查看是否已经安装此服务httpd-manual-2.0.40-21redhat-config-httpd-1.0.1-18httpd-devel-2.0.40-21httpd-2.0.40-212,重新编译Apache源代码安装#rpm–ehttpd–-nodeps卸载原用的Apache用户#tar-zxvfhttpd-2.0.54.tar.gz解压#cdhttpd-2.0.54#./configure--prefix=/usr/local/httpd--enable-modules=so--enable-so注:--prefix参数用来指定安装后存放的路径,--enable-modules用来指定系统允许使用的功能扩展的类型,这里指定为so类型,--enable-so用来指定允许DSO(动态共享对像)#echo$?显示为:0,表示编译过程中没有错误,显示其它都有错这一步后面的编译过程都会用到,如果在这出错了,就不要MAKE了。得查找原因。#make#makeinstall#cd/usr/local/httpd/bin/#./httpd–kstart注:这一步都不会出错。二,编译安装PHP二,编译安装PHP1,freeTDS(解决PHP与MSSQL连接的问题)2,编译安装PHP并支持GD具体安装如下:1.freeTDS的安装#tar–zxvffreetds-stable.tgz#cdfreetds-0.63#./configure--prefix=/usr/local/freetds--with-tdsver=8.0注:--with-tdsver指定的freetds支持的数据库版本号,其中8.0对应的是sqlservr2000.#make#makeinstall#vi/etc/ld.so.conf设置系统动态库配置文件,加入以下:/usr/local/freetds/lib保存退出。#ldconfig重新加载动态库列表ld.so.conf1。安装PHP安装jpeg6建立目录#mkdir/usr/local/jpeg6#mkdir/usr/local/jpeg6/bin#mkdir/usr/local/jpeg6/lib#mkdir/usr/local/jpeg6/include#mkdir/usr/local/jpeg6/man#mkdir/usr/local/jpeg6/man/man1#cd/root/soft#tar-zxfjpegsrc.v6b.tar.gz#cdjpeg-6b#./configure--prefix=/usr/local/jpeg6/--enable-shared--enable-static#echo$?#make;makeinstall安装libpng#cd/root/soft#tar-zxflibpng-1.2.8.tar.gz#cdlibpng-1.2.8#cpscripts/makefile.stdmakefile#make;makeinstall安装freetype#cd/root/soft#tar-zxffreetype-2.1.10.tar.gz#cdfreetype-2.1.10#./configure--prefix=/usr/local/freetype#echo$?#make;makeinstall安装最新的GD库#cd/root/soft#tar-zxfgd-2.0.33.tar.gz#cdgd-2.0.33#./configure--prefix=/usr/local/gd2--with-jpeg=/usr/local/jpeg6/--with-png--with-zlib--with-freetype=/usr/local/freetype/#echo$?#make;makeinstall安装最新的Curl库#cd/root/soft#tar-zxfcurl-7.15.0.tar.gz#./configure--prefix=/usr/local/curl#echo$?#make;makeinstall安装PHP由于php5需libxml2的支持,所以先安装libxml2#cd/root/soft#tar-zxflibxml2-2.6.19.tar.gz#cdlibxml2-2.6.19#./configure--prefix=/usr/local/libxml2#echo$?#make;makeinstall安装libxslt#cd/root/soft#tar-zxflibxslt-1.1.15.tar.gz#cdlibxslt-1.1.15#./configure--prefix=/usr/local/libxslt--with-libxml-prefix=/usr/local/libxml2#echo$?#make;makeinstall#tar-zxfphp-5.0.5.tar.gz#cdphp-5.05#./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--with-mysql=/usr/local/mysql/--with-curl=/usr/local/curl--enable-ftp--with-libxml-dir=/usr/local/libxml2--with-expat-dir=/usr/lib--enable-soap--with-xsl=/usr/local/libxslt--enable-xslt--with-gd=/usr/local/gd2/--with-jpeg-dir=/usr/local/jpeg6/--with-zlib-dir=/usr/lib--with-png--with-freetype-dir=/usr/local/freetype#echo$?#make#makeinstall其中./configure后的--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--with-mysql=/usr/local/mysql/--with-libxml-dir=/usr/local/libxml2是必要的选项--with-gd=/usr/local/gd2/--with-jpeg-dir=/usr/local/jpeg6/--with-png--with-zlib-dir=/usr/lib--with-freetype-dir=/usr/local/freetype这是让PHP支持GD库的配置选项--with-curl=/usr/local/curl支持CURL库--enable-ftp打开FTP库函数支持--enable-soap--with-xsl=/usr/local/libxslt--enable-xslt让PHP支持SOAP,上面这些一般用得少,可以去掉如果在MAKE的时候出错,那么就是你以上相关的软件没有安装好,这是最全的,出错的方法都是没有装相应的软件包,你可以查看一下。#cpphp.ini-dist/usr/local/lib/php.ini#vi/usr/local/lib/php.ini将register_globals=Off改为register_globals=On#vi/usr/local/httpd/httpd.conf些模块简单的修改将Listen80改为:Listen192.168.0.230:80在配置文件中添加如下:AddTypeapplication/x-httpd-php.php.php3.php4.php5#AddHandlercgi-script.cgi,去掉#打开CGI脚本服务#/usr/local/httpd/bin/apachectlrestart重启一下apahce服务apache服务器的PHP配置完成。设置启动文件:#vi/etc/rc.d/rc.local增加一行:/usr/local/httpd/bin/apachectlstart配置重新导入/etc/rc.d/init.d/xinetdrestart测试PHP进入Apache默认主目录/usr/local/httpd/htdocs,在该目录下建一个phpinfo.php文件#viphpinfo.php写入以一内容地址/phpinfo.php就可以看到相关的服务信息啦。三,mysql的安装三,mysql的安装#tarzxvfmysql-4.0.14.tar.gz–C/setup#cd/setup/mysql-4.0.14#groupaddmysql#useraddmysql-gmysql-M-s/bin/false#./configure--prefix=/usr/local/mysql/--with-unix-socket-path=/us
本文标题:linux WEB全能服务器配置
链接地址:https://www.777doc.com/doc-6290667 .html