Showing posts with label tomcat. Show all posts
Showing posts with label tomcat. Show all posts

Sunday, 26 May 2013

Using Xampp to install apache to use PHP , MySql


Xampp - 
                   cross platfrom software bundle to  install Apache webserver, MySql database management system and PHP server side scripting language.

 Xampp is a open software platform to install apache, tomcat, mysql

If you are using any Linux distributions follow this post to install apache for php and mysql with or with out Lampp

1. Download xampp from here.

2. Install xampp by double clicking and remember where you are installing it

               (I have installed it in c:\xampp)

3. Goto-> start and type xampp control panel or find Apache Friends in Start->Programs and select    
    xampp control panel

4. Good! you are almost done, xampp has every thing you need, you just need to pick up what you   
    want!
Apache webserver, installing Apache in windows, installing mysql in windows, installing php in windows, Lampp, MYSQL, PHP, server side scripting, tomcat, Xampp, Xampp in windows,


    The right mark under Services indicates the following service is been installed .

  •     In my above xampp, Apache and MySQL are installed and running on port numbers 80,443 and 3306  (It may vary in your system)
  • The Tomcat have been installed but its not running (As It is not required right now!)
  • The FileZilla has not been installed (It is not required at all :P)
  • The Mercury we need additional things to be done to run it
  • Click the “X” mark under services to install and “right mark” to uninstall any service
  • To start/stop any service click the button which is under Action.

     1. To test php just type 127.0.0.1 or http://localhost in your browser and you will see index of php    
         files or success message from Apache. That’s all, your done with apache. 
     
     2. To see complete information about php, try this:-
                                       In xampp control panel click admin button of Apache module under actions

          That’s the phpadmin page where you can see complete information about php
      3. Now, the question is where to save php files ?

          Wait! Go to your installed xampp directory ex: C:\xampp\htdocs
          Save all your php files here

      4. Then open browser and type 127.0.0.1/yourfilename.php or http://localhost/yourfilename.php
      5. Now the other question is How to open mysql ?

          Well every question have an answer, do this :

  •           Open command prompt
  •           Change directory to your xampp->mysql->bin installed directory
                                              cd  C:\xampp\mysql\bin
  •          Now type
                                             mysql –u root –p (if you changed password then it asks for passwords! )

                  Then you will get your MySql prompt like this,
 
                                             Mysql>

Although i have mentioned about Tomcat, for understanding and using tomcat

                refer this post Using Xampp to install apache-tomcat
                        to use JSP, Windows users and linux users refer this post


Leave your doubts or suggestions in comments section..

Saturday, 25 May 2013

Installing tomcat in linux


Welcome Folks.. This post will guide you in the installation and configuration of the apache tomcat server

In order to work with the tomcat server, you need to have the Java environment set, if you haven't done it yet then follow this post


Installation and configuration of the apache tomcat server

Steps to download and install the tomcat server

Step 1 : Download the tomcat sever from http://tomcat.apache.org/ .
             Once downloaded, you should have a folder named 

                                           apache-tomcat-6.0.29.tar.gz (similar to this).

Step 2 : Extract the folder you just downloaded by using the below command
                                          
                                           tar -xvfz apache-tomcat-6.0.29.tar.gz

Step 3 :  Now the next step is to set up the paths for catalina as below

export CATALINA_HOME=/location where you have extracted the tomcat

 ex : export CATALINA_HOME = /home/vignesh/Desktop/apache-tomcat-7.0.37

 Add the following lines to your /etc/profile file so that it can set the CATALINA_HOME variable automatically when the system restarts.

profile 

Step 4 : Run the following command to start the Tomcat server: 
      
                        $CATALINA_HOME/bin/startup.sh 

Step 5 : Verify that the Tomcat server is running by browsing to

                        http://Your_IP_Here:8080/

        ex : http://localhost:8080 on doing this, you should see something like below

APACHE, catalina, configuring apache tomcat server, Installing tomcat in linux, java environment, jsp, server, tomcat, webapps,
 

Congratulations you have now installed the TOMCAT SERVER successfully !!!

let us have a check by running a simple program


1. Type the below given program in the text file

                         <HTML>
                                <BODY>
                                        Hello Developer !!!
                                </BODY>
                         </HTML>

2. Save the file with .jsp extension in the below path where all your .class and .jsp files should be  
    present

                           /apache-tomcat-7.0.37/webapps/ROOT/

3. In order to execute the program, you need to start your tomcat server, its so simple 
 
- open your terminal and traverse to the bin folder in tomcat which you had downloaded by 
following this post
 
- type ./catalina.sh start and ./catalina.sh stop to stop the server
  
Example:root@localhost:/home/vignesh/Desktop/apache-tomcat-7.0.37/bin# ./catalina.sh start
 
Note: Once you have started the catalina server, you can verify it by typing  
 
http://localhost:8080 on the address bar of your browser.Tats it !!!!! 
 
4 . Now from the browser open the file you just created . 

    Example : http://localhost/apachetesting.jsp

    You should see the text Hello Developer on your browser.




Leave your doubts or suggestions in comments section..