linux+apache+tomcat+mysql+jsp+php_整合安装.doc

上传人:豆**** 文档编号:17423145 上传时间:2022-05-24 格式:DOC 页数:9 大小:161.50KB
返回 下载 相关 举报
linux+apache+tomcat+mysql+jsp+php_整合安装.doc_第1页
第1页 / 共9页
linux+apache+tomcat+mysql+jsp+php_整合安装.doc_第2页
第2页 / 共9页
点击查看更多>>
资源描述

《linux+apache+tomcat+mysql+jsp+php_整合安装.doc》由会员分享,可在线阅读,更多相关《linux+apache+tomcat+mysql+jsp+php_整合安装.doc(9页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、【精品文档】如有侵权,请联系网站删除,仅供学习与交流linux+apache+tomcat+mysql+jsp+php_整合安装超级无敌web服务器 linux+apache+tomcat+mysql+jsp+php 整合安装超级无敌web服务器 linux+apache+tomcat+mysql+jsp+php 整合安装 自己的安装过程,以前发表在新浪博客,现在换地盘了转过来.自我感觉写得还是不错滴. 在安装过程更是学到了很多东西做好这个项目以后linux基本是入门了,学习更深入的东西也不是那么费力了 1 装jdkjdk-6u3-linux-i586.bin #chmod u+x jdk-6

2、u3-linux-i586.bin#./jdk-6u3-linux-i586.bin ln -s /usr/local/jdk1.6.0_03 /usr/local/jdkln -s /usr/local/jdk1.6.0_03 /jre /usr/local/jre#vi /etc/profile加入以下几行export JAVA_HOME=/usr/local/jdkexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport PATH=$PATH:$JAVA_HOME/binexport CATALINA_

3、HOME=/usr/local/tomcat保存退出。#source /etc/profile 很重要 刷新环境变量java version 查看jdk是否安装成功2 httpd-2.2.6.tar.gz#cp httpd-2.2.6.tar.gz /usr/local#cd /usr/local#tar zxvf httpd-2.2.6.tar.gz#cd httpd-2.2.6#./configure prefix=/usr/local/apache -enable-module=so#make#make install启动Apache,并测试。# cd /usr/local/apache

4、/bin# ./apachectl start打开浏览器,并在地址栏中输入主机的IP地址apache-tomcat-6.0.14.tar.gz#tar zxvf apache-tomcat-6.0.14.tar.gz#cp r apache-tomcat-6.0.14 /usr/local/tomcat#/usr/local/tomcat/bin/startup.sh打开http:/localhost:8080 验证tomcat可以启动整和apache和tomcattomcat-connectors-1.2.25-src.tar.gz#tar zxvf tomcat-connectors-1.

5、2.25-src.tar.gz进行编译配置。大家一定要注意这几个参数中前三个是很重要的,必要时可以去相应的目录看看相关的文件是否存在。#cd tomcat-connectors-1.2.25-src/native# ./ buildconf.sh#./configure -with-apxs=/usr/local/apache/bin/apxs -with-tomcat=/usr/local/tomcat -with-java-home=/usr/java/jdk -with-jni# make# make install#ll /usr/local/apache/modules/mod_jk

6、.so mod_jk.so生成成功了。3 tomcat apache 整合 编辑apache的配置文件:#vi /usr/local/apache/conf/httpd.conf在末尾添加以下几行# Load mod_jk module LoadModule jk_module modules/mod_jk.so# Where to find workers.properties JkWorkersFile /usr/local/apache/conf/workers.properties# Where to put jk logs JkLogFile /usr/local/apache/lo

7、gs/mod_jk.log # Set the jk log level debug/error/info JkLogLevel info # Select the timestamp log format JkLogStampFormat %a %b %d %H:%M:%S %Y # JkRequestLogFormat set the request format JkRequestLogFormat %w %V %T # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat

8、 -ForwardDirectories # Send servlet for context /examples to worker named worker1 #JkMount /examples/*.jsp worker1 JkMount /servlet/* worker1 # Send JSPs for context /examples to worker named worker1 JkMount /*.jsp worker1 创建文件workers.proferties#vi /usr/local/apache/conf/workers.porperties添加如下内容: wo

9、rkers.tomcat_home=/usr/local/tomcat workers.java_home=/usr/local/jdk ps=/ worker.list=worker1 worker.worker1.port=8009 worker.worker1.host=localhost worker.worker1.type=ajp13 worker.worker1.connection_pool_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.lbfactor=1 worker.inprocess.stdou

10、t=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr最后重新启动tomcat和apache,我们的安装就完成了#/usr/local/tomcat/bin/shutdown.sh /关闭tomcat#/usr/local/tomcat/bin/startup.sh /启动tomcat#/usr/local/apache/bin/apachectl restart /重启apache4 l

11、amp安装 一、安装mysql# groupadd mysql# useradd -g mysql mysql# cd /usr/local# tar zvxf mysql-standard-5.0.27-linux-i386-glibc23.tar.gz# ./configure -prefix=/usr/local/mysql# cd /usr/local/mysql# bin/mysql_install_db -user=mysql# chown -R root .# chown -R mysql var# chgrp -R mysql .# cp support-files/my-f

12、/etc/f /复制配置文件,当启动mysql时会读取配置# vi /etc/f查找 The Mysql servermysqld添加一行:set-variable = max_connections=150保存并退出# /usr/local/mysql/bin/safe_mysqld (or mysqld_safe) -user=mysql & /启动mysql此时可以使用/usr/local/mysql/bin/mysqladmin version 查看Mysql DBMS版本和使用信息.# /usr/local/mysql/bin/mysqladmin -uroot password x

13、xxxx /为root访问设置密码当计算机重新启动后mysql不会启动,如果想同时启动就添加下面的内容:# vi /etc/rc.d/rc.local添加:/usr/local/mysql/bin/safe_mysqld (or mysqld_safe)-user=mysql &保存并退出二、安装apache# cd /usr/local# tar -zxvf httpd-2.2.3.tar.gz# cd httpd-2.2.3# ./configure -prefix=/usr/local/apache -enable-module=most -enable-shared=max# make

14、# make install启动Apache服务: # /usr/local/apache/bin/apachectl start关闭Apache服务: # /usr/local/apache/bin/apachectl stop重启Apache服务: # /usr/local/apache/bin/apachectl restart三、安装php# cd /usr/local# tar -jxvf php-5.2.0.tar.bz2# cd php-5.2.0# ./configure -prefix=/usr/local/php -with-mysqld=/usr/local/mysql

15、-with-apxs2=/usr/local/apache/bin/apxs# make# make install# cp php.ini-dist /usr/local/php/lib/php.ini四、配置apache编辑httpd.conf文件# vi /usr/local/apache/conf/httpd.conf在LoadModule处添加: LoadModule php5_module module/libphp5.so在DirectoryIndex处添加: index.php在AddType application处添加: AddType application/x-http

16、d-php .php .phtmlAddType applicatoin/x-httpd-php-source .phpsphp 装好后注意查看selinux日志是否阻止读取php模块httpd加入 AddType application/x-httpd-php .php五、测试php模块的加载# /usr/local/apache/bin/apachectl start /开启apache在浏览器中输入:http:/localhost/浏览器中显示:It Works 表示apache开启www服务在/apache/htdocs目录下建一个文件phpinfo.php输入:保存并退出在浏览器中输

17、入:http:/localhost/phpinfo.php浏览器中显示一个关于apache和php安装的Web页,表示成功加载php模块。5 数据库相关 phpmyadmin 和 jdbcJDBC的安装#tar -zxvf mysql-connector-java-3.2.0-alpha.tar.gz#cd mysql-connector-java-3.2.0-alpha#cp mysql-connector-java-3.2.0-alpha-bin.jar /usr/local/tomcat/common/lib#tar xfv mssqlserver.tar#tar xfv msjdbc.

18、tar#cd lib# cp *.jar /usr/local/tomcat/common/libphpmyadmin1 tar2 mv to /usr/local/apache/htdocs3 改个好打的名字4 cd 进入phpmyadmin 目录5 cp libraries/config.default.php config.inc.php6 vi config.inc.php$cfgblowfish_secret= /主要作用是加密你的cookie 可以任意设置$cfgServers$icontroluser=root; mysql控制用户设置$cfgServers$icontrolpass=;$cfgServers$iauth_type=cookie; 验证方式$cfgServers$iuser=root mysql用户$cfgServers$ipassword=; .精品文档.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 小学资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁