posts - 36, comments - 30, trackbacks - 0, articles - 3

          centOS上安裝JDK,Tomcat和Nginx

          Posted on 2016-02-19 19:43 笑看人生 閱讀(300) 評論(0)  編輯  收藏
          @import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
          在CentOS上安裝JDK7,Tomcat7和Nginx1.9手順

          1.下載 jdk-7u79-linux-x64.rpm,下載地址如下:
            http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-downloads-1880260.html

            [root@localhost java]#rpm -qa | grep jdk
            [root@localhost java]#cp /home/huangwei/Downloads/jdk-7u79-linux-x64.rpm .
            [root@localhost java]# chmod 755 jdk-7u79-linux-x64.rpm 
            [root@localhost java]# rpm -ivh jdk-7u79-linux-x64.rpm 
            [root@localhost java]# vi /etc/profile

                 #set java enviromet
                 JAVA_HOME=/usr/java/jdk1.7.0_79
                 PATH=$PATH:$JAVA_HOME/bin
                 CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
                 export JAVA_HOME PATH CLASSPATH
            [root@localhost java]# source /etc/profile
            [root@localhost java]# java -version
                 java version "1.7.0_79"
                 Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
                 Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
            [root@localhost lib]# rpm -qa | grep jdk
                 jdk-1.7.0_79-fcs.x86_64



          2.下載 apache-tomcat-7.0.68.zip,下載地址如下:
            http://tomcat.apache.org/download-70.cgi
            unzip apache-tomcat-7.0.68.zip to /usr/
            [root@localhost bin]# cd /usr/apache-tomcat-7.0.68/bin
            [root@localhost bin]# chmod +x *.sh
            [root@localhost bin]# ./startup.sh 
          Using CATALINA_BASE:   /usr/apache-tomcat-7.0.68
          Using CATALINA_HOME:   /usr/apache-tomcat-7.0.68
          Using CATALINA_TMPDIR: /usr/apache-tomcat-7.0.68/temp
          Using JRE_HOME:        /usr/java/jdk1.7.0_79
          Using CLASSPATH:       /usr/apache-tomcat-7.0.68/bin/bootstrap.jar:/usr/apache-tomcat-7.0.68/bin/tomcat-juli.jar
          Tomcat started.

            在瀏覽器中輸入http://localhost:8080/ ,如果能正常打開Tomcat的主頁,說明Tomcat安裝成功。

          3.下載 nginx-1.9.11.tar.gz,下載地址如下:
            http://nginx.org/en/download.html
            [root@localhost usr]# rpm -qa | grep gcc
          gcc-4.4.7-16.el6.x86_64
          libgcc-4.4.7-16.el6.x86_64
            [root@localhost usr]# rpm -qa | grep openssl
          openssl-1.0.1e-42.el6.x86_64
            [root@localhost usr]# rpm -qa | grep zlib
          zlib-1.2.3-29.el6.x86_64
            [root@localhost usr]# rpm -qa | grep pcre
          pcre-7.8-7.el6.x86_64
            [root@localhost usr]# tar -zxvf nginx-1.9.11.tar.gz 
            [root@localhost usr]# cd nginx-1.9.11/
            [root@localhost nginx-1.9.11]# yum -y install pcre-devel
            [root@localhost nginx-1.9.11]# yum -y install zlib-devel
            [root@localhost nginx-1.9.11]# ./configure --prefix=/usr/nginx
            [root@localhost nginx-1.9.11]# make && make install
            [root@localhost nginx-1.9.11]# cd /usr/nginx/sbin/
            [root@localhost sbin]# ./nginx -t
          nginx: the configuration file /usr/nginx/conf/nginx.conf syntax is ok
          nginx: configuration file /usr/nginx/conf/nginx.conf test is successful
            [root@localhost sbin]# ./nginx

            
          在瀏覽器中輸入http://localhost/ ,如果能正常打開Nginx的主頁,說明Nginx安裝成功。
          @import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 青州市| 视频| 玛纳斯县| 高阳县| 渭源县| 武宁县| 图木舒克市| 西充县| 静海县| 丹凤县| 永胜县| 古丈县| 营口市| 永德县| 喀喇沁旗| 深水埗区| 康乐县| 泰来县| 桃园市| 桦南县| 若尔盖县| 阳城县| 滕州市| 苍溪县| 高安市| 花莲县| 南和县| 阳城县| 宝山区| 阿鲁科尔沁旗| 章丘市| 龙海市| 资兴市| 镇雄县| 色达县| 南昌县| 台中市| 年辖:市辖区| 台东县| 湖北省| 赤峰市|