Sunday, September 8, 2024
HometomcatGreen and portable way to install apache+mysql+tomcat+php integrated environment and provide control...

Green and portable way to install apache+mysql+tomcat+php integrated environment and provide control panel (1)

Green and portable way to install Apache+MariaDB+Tomcat+PHP integrated environment with control panel


###

Table of contents

  • Green and portable way to install Apache+MariaDB+Tomcat+PHP integrated environment with control panel
    • @[TOC](Table of Contents)
  • Preface
  • one、XAMPP
    1. Installation and use
      1. Installation
  • 2.Use
    1. Possible errors
      1. Check port occupancy
    1. Modify the port
    1. Caused by JDK

Preface

Installing an integrated environment is often complicated in configuration. Using an integrated installation tool can easily complete the one-click installation of related software! It is even more convenient to be able to use the portable method to achieve completely green and portable installation! It only needs to be unzipped to a directory on your computer to run. No installation is required, and there will be no registry changes! So you can even put it in an external storage and take it with you! ——This is XAMPP.

one、XAMPP

XAMPP is an extremely popular PHP development environment toolkit that is completely free, open source, and easy to install.
Contains the following integrated software, which will be installed with one click:
Apache
MariaDB
Tomcat
PHP+phpMyAdmin
as well asOpenSSL, Webalize, Mercury Mail Transport System, FileZilla FTP Server , Strawberry Perl

What’s even more convenient is that there is a control panel tool: XAMPP Control Panel, which can start/stop, configure, and view error logs for the installed software!

Although the PHP development environment is mainly used in this integrated environment, you can choose apache, mariaDB, tomcat and other services required to start as needed.

2. Installation and use

1.Installation

Official installation website: https://www.apachefriends.org/index.html
Insert image description here
Enter other versions to see detailed descriptions of different versions:
Insert image description here

Click Download on the right and click here in the pop-up window
INSERT IMAGE DESCRIPTION HERE![INSERT IMAGE DESCRIPTION HERE](http://www.couponmethod. com/wp-content/uploads/2024/08/070c964c5a9d4b17a782f218e78deca5.png)
Insert image description here

Insert image description here
After downloading, extract it to the root directory xampp, for example d:\xampp

  • Notice:
  • (1) The directory must be in the root directory of xampp, otherwise an error will be prompted when starting apache and mysql in the control panel.
  • (2) Since it contains tomcat, you must first install the JDK and configure the environment variable JAVA_HOME!

2.Use

Run the xampp-control.exe application in the xampp directory to start the control panel:
Insert image description here
After normal startup, run in the browser address bar
localhost:8080
When the following screen appears, it is successful!
Insert image description here

3. Possible errors

There is an error when starting any service. Possible reasons include:
 Occupy ports, such as 80, 8080
 JDK environment variables are not configured
 Started other web servers
 Installed an old version of xampp
 Configuration errors, etc.

1. Check port occupancy

Determine the system port occupation status:
Execute the netstat command in the system cmd command window
For example, display all port status:

netstat –ao 

As shown in the picture:
Insert image description here
Or: Display and view the specified port 8005:
netstat –aon|findstr “8005”
Insert image description here
The right side is the pid number. According to the pid number, ctrl+alt+del runs the task window, finds the process corresponding to the pid, and stops it.
Go to the XAMPP control panel to restart the service. If successful, it is a process occupation issue. Reconfiguring the ports and staggering them can solve the problem.

2. Modify the port

Take tomcat as an example
Click the Config button behind Tomcat to select server.xml, find the part shown in the figure below, change the port number after port to a new unoccupied port number and save it, here it is changed to 8081.
Insert image description here
Insert image description here
Save and restart.

**Note:**After modifying the port number, in order to ensure that xampp can obtain the status of each service normally, click the Config button in the upper right corner of the Control Panel, click the Service and Port Settings button, and according to the port number just changed, click Modify the corresponding port number in the corresponding service.

3. Caused by JDK

If tomcat cannot start, you can also go to cmd and run the following command in the tomcat\bin directory:
If prompted:
Insert image description here

Because:
The environment variables JAVA_HOME and JRE_HOME were not created correctly after JDK installation.
Solution: Set environment variables or reinstall jdk

RELATED ARTICLES

Most Popular

Recent Comments