Apache+tomcat+mysql安装步骤
生活随笔
收集整理的這篇文章主要介紹了
Apache+tomcat+mysql安装步骤
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Apache+tomcat+mysql安裝步驟
#apache安裝
view?source? print?
#tomcat安裝
view?source? print?
#apache?tomcat整合
view?source? print?
#mysql?安裝
view?source? print?
#連接器
view?source? print?
#配置相關
vim?/root/.bash_profile
view?source? print?
vim?/usr/local/apache/conf/workers.properties
view?source? print?
vim?/usr/local/apache/conf/httpd.conf
view?source? print?
配置完成?
Apache+tomcat+mysql安裝步驟
預編譯壞境安裝
?
view?source? print?| 01 | yum?-y?installmake |
| 02 | yum?-y?installperl? |
| 03 | yum?-y?installvim-common*? |
| 04 | yum?-y?installgcc*? |
| 05 | yum?-y?installncurses*? |
| 06 | yum?-y?installzlib*? |
| 07 | yum?-y?installglib*? |
| 08 | yum?-y?installlibxml2*? |
| 09 | yum?-y?installlibtool*? |
| 10 | yum?-y?installgd*? |
| 11 | yum?-y?installlibpng*? |
| 12 | yum?-y?installlibjpeg*? |
| 13 | yum?-y?installlibevent*? |
| 14 | yum?-y?installfreetype*? |
| 15 | yum?-y?installopenssl*? |
| 16 | yum?-y?installcurl*? |
| 17 | yum?-y?installunzip? |
| 18 | yum?-y?installkrb5*? |
| 19 | yum?-y?installe2fsprogs*? |
| 20 | yum?-y?installlibidn*? |
| 21 | yum?-y?installnano? |
| 22 | yum?-y?installgettext*? |
| 23 | yum?-y?installflex*? |
| 24 | yum?-y?installgmp*? |
| 25 | yum?-y?installbzip2 |
| 26 |
| 27 | mkdir/root/src? |
| 28 | cd/root/src |
?
軟件下載
apache2.2.10下載地址:http://httpd.apache.org/download.cgi
tomcat6.0下載地址:http://tomcat.apache.org/download-60.cgi
jdk1.5.0下載地址:http://java.sun.com/javase/downloads/previous.jsp
jk1.2.7下載地址:http://tomcat.apache.org/download-connectors.cgi
| 1 | wget?http://apache.etoak.com/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz? |
| 2 |
| 3 | wget?http://apache.etoak.com//tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.37-src.tar.gz? |
| 4 |
| 5 | wget?http://mirror.bit.edu.cn/apache//httpd/httpd-2.2.23.tar.gz? |
| 6 |
| 7 | wget?http://www.java.net/download/jdk6/6u34/promoted/b03/binaries/jdk-6u34-ea-bin-b03-linux-i586-20_jun_2012-rpm.bin |
#jdk安裝
| 1 | chmod701?jdk-6u34-ea-bin-b03-linux-i586-20_jun_2012-rpm.bin? |
| 2 | ./jdk-6u34-ea-bin-b03-linux-i586-20_jun_2012-rpm.bin? |
| 3 | java?-version????#測試 |
#apache安裝
view?source? print?
| 1 | tar-zxvf?httpd-2.2.23.tar.gz? |
| 2 | cdhttpd-2.2.23? |
| 3 | ./configure?--prefix=/usr/local/apache?--enable-so?--enable-rewrite=shared?--enable-speling=shared?--enable-modules=all? |
| 4 | make&&?makeinstall |
#tomcat安裝
view?source? print?
| 1 | tar-zxvf?apache-tomcat-6.0.35.tar.gz? |
| 2 | mvapache-tomcat-6.0.35????/usr/local/tomcat |
#apache?tomcat整合
view?source? print?
| 1 | tar-zxvf?tomcat-connectors-1.2.37-src.tar.gz? |
| 2 | cdtomcat-connectors-1.2.37-src? |
| 3 | cdnative? |
| 4 | ./buildconf.sh? |
| 5 | chmod755?configure? |
| 6 | ./configure?--with-apxs=/usr/local/apache/bin/apxs? |
| 7 | make&&?makeinstall |
#mysql?安裝
view?source? print?
| 1 | tar-zxvf?mysql-5.1.30.tar.gz? |
| 2 | ./configure?--prefix=/usr/local/mysql?--sysconfdir=/etc?--localstatedir=/var/lib/mysql?--with-charset=utf8?--with-xcharset=all? |
| 3 | make&&?makeinstall |
| 4 | useraddmysql?-s?/sbin/nologin? |
| 5 | /usr/local/mysql/bin/mysql_install_db? |
| 6 | chown-R?mysql:mysql?/var/lib/mysql/? |
| 7 | cp/usr/local/mysql/share/mysql/my-medium.cnf?/etc/my.cnf? |
| 8 |
| 9 | /usr/local/mysql/bin/mysql?-uroot?-paiyonet2008com |
#連接器
view?source? print?
| 1 | tar-zxvf?mysql-connector-java-5.0.8.tar.gz? |
| 2 | cpmysql-connector-java-5.0.8-bin.jar?/usr/local/tomcat/lib/ |
#配置相關
vim?/root/.bash_profile
view?source? print?
| 1 | exportJAVA_HOME=/usr/java/jdk1.6.0_34/? |
| 2 | exportPATH=$PATH:$JAVA_HOME/bin? |
| 3 | exportCLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar? |
| 4 | exportPATH=$PATH:$JAVA_HOME/bin:/usr/local/mysql/bin/? |
| 5 | exportCATALINA_HOME=/usr/local/tomcat? |
| 6 | exportTOMCAT_HOME=/usr/local/tomcat? |
| 7 | exportCLASSPATH=$CLASSPATH:$CATALINA_HOME/lib |
vim?/usr/local/apache/conf/workers.properties
view?source? print?
| 1 | #ps=/? |
| 2 | #worker.list=localhost,?tomcat2,?loadbalancer? |
| 3 | worker.list=localhost? |
| 4 | worker.localhost.port=8009? |
| 5 | worker.localhost.host=localhost? |
| 6 | worker.localhost.type=ajp13? |
| 7 | #worker.localhost.lbfactor=100? |
| 8 | #worker.loadbalancer.type=lb? |
| 9 | #worker.loadbalancer.balanced_workers=localhost |
vim?/usr/local/apache/conf/httpd.conf
view?source? print?
| 1 | #load?mod_jk? |
| 2 | LoadModule?jk_module?modules/mod_jk.so? |
| 3 | #configure?mod_jk? |
| 4 | JkWorkersFile?conf/workers.properties? |
| 5 | JkLogFile?logs/mod_jk.log? |
| 6 | JkLogLevel?info? |
| 7 | #JkMount?/*.jsp?loadbalancer? |
| 8 | #JkMount?/servlet/*?loadbalancer? |
| 9 | #JkMount?/application/*?loadbalancer |
配置完成?
?
?
#問題:
Could?not?find?the?main?class:?org.apache.catalina.startup.Bootstrap
表現:無法運行Tomcat服務器
原因:Tomcat版本太高
解決方法:
1、window-preferences-servers-Tomcat6.x-Path
2、在Path里面選擇Add?JAR/ZIP,加載tomcat7下的……/bin/tomcat-juli.jar。點擊“OK”.
?
轉載于:https://blog.51cto.com/sxlfxx/1381198
總結
以上是生活随笔為你收集整理的Apache+tomcat+mysql安装步骤的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c#实现数据集合转换为csv文本
- 下一篇: 寻找区域中有几个点 叉乘+二分 p