linux(apache2.2/2.4+tomcat6/7+php)
apache+tomcat整合的理解: 网站一般分为前台和后台,前台的页面放到一个目录里比如:web。后台的程序放到一个目录里:admin。 apache虚拟主机的文档根目录指向tomcat的项目目录,这个目录下有2个目录:root,admin root下面存放这网站的所有前台页面,admin里面存放这所有的后台程序。 所需要的软件: wgethttp://mirror.esocc.com/apache/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.tar.gz wgethttp://lnamp-web-server.googlecode.com/files/httpd-2.2.21.tar.gz wgethttp://archive.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.32-src.tar.gz wgethttp://oracleotn.rd.llnwd.net/otn-pub/java/jdk/6u26-b03/jdk-6u26-linux-i586-rpm.bin (1)配置DNS [root@nan87/]#vim/etc/named.conf zone"."IN{ typehint; file"named.ca"; }; zone"dog.com"IN{ typemaster; file"named.dog.com"; }; [root@nan87/]#vim/var/named/named.dog.com $TTL600 @INSOAdog.com.root(20140304011H15M1W1D); @INNSdog.com. dog.com.INA10.10.54.87
陵城网站制作公司哪家好,找创新互联!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设公司等网站项目制作,到程序开发,运营维护。创新互联从2013年创立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联。www.dog.com.INA10.10.54.87 bbs.dog.com.INA10.10.54.87 hr.dog.com.INA10.10.54.87 (2)安装apache [root@nan87softs]#tarxvfhttpd-2.2.21.tar.gz [root@nan87softs]#cdhttpd-2.2.21 [root@nan87httpd-2.2.21]#./configure--prefix=/usr/local/apache--enable-modules=most--enable-mods-shared=all--enable-so--with-included-apr [root@nan87httpd-2.2.21]#make [root@nan87httpd-2.2.21]#makeinstall //把apache的bin目录加入到PATH变量中去,在文件加入一下面的行,这样就可以直接使用apachectlstart/stop/restart [root@nan87httpd-2.2.21]#vim/etc/profile exportPATH=$PATH:/usr/local/apache/bin [root@nan87httpd-2.2.21]#source/etc/profile //或者把/usr/local/apache/bin/apachectl启动文件放到/etc/init.d下 [root@nan87httpd-2.2.21]#cp/usr/local/apache/bin/apachectl/etc/init.d/httpd [root@nan87httpd-2.2.21]#vim/usr/local/apache/conf/httpd.conf ServerNamewww.dog.com:80 [root@nan87httpd-2.2.21]#/etc/init.d/httpdrestart (3)安装JDK环境 JDK下载 x64代表64位 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html tomcat运行环境下,JDK是必不可少的软件,因为tomcat是一个Servlet/JSP容器,底层的操作都需要JDK来完成。 [root@nan87softs]#rpm-ivhjdk-7u51-linux-x64.rpm //查看jdk的安装路径 [root@nan87softs]#rpm-qa|grepjdk jdk-1.7.0_51-fcs.x86_64 [root@nan87softs]#rpm-qljdk-1.7.0_51-fcs.x86_64 安装在/usr/java下 //查看版本 [root@nan87softs]#java-version javaversion"1.7.0_51" Java(TM)SERuntimeEnvironment(build1.7.0_51-b13) JavaHotSpot(TM)64-BitServerVM(build24.51-b03,mixedmode) (4)安装PHP 安装libmcrypt,如果不安装编译时会出错 [root@nan87softs]#tarxvflibmcrypt-2.5.7.tar.gz [root@nan87libmcrypt-2.5.7]#cdlibmcrypt-2.5.7 [root@nan87libmcrypt-2.5.7]#mkdir-p/usr/local/libmcrypt --libmcrypt的安装目录 [root@nan87libmcrypt-2.5.7]#./configureprefix=/usr/local/libmcrypt/ [root@nan87libmcrypt-2.5.7]#make [root@nan87libmcrypt-2.5.7]#makeinstall //正式安装PHP [root@nan87softs]#tarxvfphp-5.4.25.tar.gz [root@nan87softs]#cdphp-5.4.25 ./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/mysql--with-mysqli=/usr/local/mysql/bin/mysql_config--with-iconv-dir--with-jpeg-dir--with-png-dir--with-zlib--with-libxml-dir--enable-xml--disable-rpath--enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--with-curl--with-curlwrappers--enable-mbregex--enable-fpm--enable-mbstring--with-mcrypt--with-gd--with-freetype-dir--enable-gd-native-ttf--with-openssl--with-mhash--enable-pcntl--enable-sockets--with-ldap--with-ldap-sasl--with-xmlrpc--enable-zip--enable-soap--enable-session--with-gettext--with-mcrypt=/usr/local/libmcrypt 注意一下这些的地址: --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 出现错误及解决方法如下: configure:error:xml2-confignotfound.Pleasecheckyourlibxml2installation. [root@nan87php-5.4.25]#yuminstalllibxml2-devel.x86_64 configure:error:Pleasereinstallthelibcurldistribution- easy.hshouldbein
当前题目:linux(apache2.2/2.4+tomcat6/7+php)
网站网址:http://ybzwz.com/article/chccih.html