[language environment] win2008R2SP1+WAMP environment deployment

Hits: 0

Table of contents

1 Introduction to [WAMP] Environment

  1. WAMP environment: Apache+Mysql/MariaDB+Perl/PHP/Python under Windows, a group of open source software commonly used to build dynamic websites or servers, they are all independent programs, but because they are often used together, they have The higher and higher degree of compatibility together forms a powerful web application platform.
  2. Advantages of using AMP integration software:
    1. Avoid setting the environment properly due to lack of knowledge of AMP;
    2. The AMP environment can be quickly installed and set up, allowing us to start directly with the software we are really interested in, such as xoops;
    3. It is convenient to build a test environment, which is very helpful for testing “is it an AMP environment problem or a problem caused by XOOPS”, and the exclusion method can be used.
  3. The main WAMP integration environments are:
    1. WampServer Wamp  
      is the Windows Apache Mysql PHP integrated installation environment, that is, the server software of apache, php and mysql under the window. PHP extensions, Apache modules, turn on/off the mouse, and you don’t have to modify the configuration file yourself, WAMP will do it. There is no need to ask about the installation of php anymore, everything is done with WAMP, and this software is used more on the win platform.
    2. XAMPP
      XAMPP is a full-featured integrated environment with Chinese instructions, XAMPP is not just for Windows, but an easy-to-install Apache distribution for Linux, Windows, Mac OS X and Solaris. The package includes Apache server, MySQL, SQLite, PHP, Perl, FileZilla FTP Server, Tomcat, and more. The default installation opens all functions, and there are security problems, which require additional security settings.
    3. AppServ
      integrates Apache, PHP, MySQL, and phpMyAdmin. It is relatively lightweight, and the version has not been updated for a long time.
      In general, the above WAMP environments can basically meet the needs of beginners to configure the WAMP environment. For example, XAMPP and AppServ have various components, but they also feel that the file composition is more complicated, and beginners can’t understand it all at once. , like Digast Wamp Server, because it is a brand-new integrated environment, the program file configuration is more rigorous, the environment program size is moderate, and any directory can be customized, and the system will automatically configure parameters, which is especially suitable for beginners.
    4. phpStudy
      phpStudy supports 22 combinations to switch freely. This package integrates the latest Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader, one-time installation, and can be used without configuration. It is a very convenient and easy-to-use PHP debugging environment. The program is only 35M green, small and simple, and has a special control panel. In short, learning PHP only needs one package.

2 Environment Deployment Process

2.1 Objectives

Deploy the WAMP environment on the target machine (win2008R2SP1) to provide PHP programming and experimental needs.
The VC14 runtime library cannot be installed on the pure version of win2008R2, so the target machine adopts the win2008R2SP1 system.

2.2 [Virtual machine] installation win2008R2SP1

  1. Download the system ISO file, click https://msdn.itellyou.cn/ platform and select win2008R2SP1 to download. Select the operating system → select Windows Server 2008 R2 → select with Service Pack1 → click on the details to expand → copy the link to Thunder to start the download.
  2. Because there are many system versions that need to be used in the learning and practice process, it is recommended to create a folder in the D drive of the real machine and name it VM, which is mainly used to store our configured virtual machine. Create a subfolder under this folder and name it win2008R2SP1 to store the newly created virtual machine.
  3. Start the VM and click Create New Virtual Machine.
  4. Select “Typical” to configure the Windows family of systems and click Next.
  5. Select Install the operating system later, Next.
  6. Select windows, and select win2008R2 in the version, the next step.
  7. Name the virtual machine according to the system name, and select the path mentioned in the second step to save the virtual machine for easy management of all virtual machines.
  8. Conditionally, it is recommended to choose a larger disk size, and choose to store as a single file, the next step.
  9. You can customize the hardware facilities at this time, or you can modify it in the future use process, click Finish.
  10. Set the source of the virtual machine ISO file and click OK.
  11. Click the green triangle to start the virtual machine, start the system installation → pop up the following picture and click Next → start the installation.
  12. Select Enterprise Edition to install → Next.
  13. Check Accept the license and click Next.
  14. At this point, create a new virtual machine and select Custom Advanced.
  15. Divide the disk into two CDs after installation, click Next.
  16. Begin the long installation process.
  17. The first time you log in, you need to set a password, click OK.
  18. To set the password twice, click the arrow. A pop-up prompts that the password has been updated, click OK again to enter the system.
  19. The following interface pops up, indicating that the system has been installed.
  20. Other settings such as desktop icons, activating the system, turning off the firewall, disabling automatic updates, setting snapshots, etc. Please refer to ” Virtual Machine and Common System Configuration Steps

2.3 Install phpstudy

  1. Download the phpstudy installation package. Go to its official website to download the required version. This tutorial downloads the 2018 version.
  2. Open win2008R2SP1 in the virtual machine. If there is a snapshot setting, restore it to the best state. Copy and paste the installation package downloaded above to the D drive of the system.
  3. Double-click to run the software, decompress it first, and modify the decompression path to the C drive.
  4. Start the software, it is prompted that the system lacks the runtime libraries of VC9, VC11 and VC14, download it from the Baidu network disk: https://pan.baidu.com/s/1vkp_lW985sk8oivJHWfUfQ Password: qxtb
  5. Copy the decompressed folder to the virtual machine, right-click to install the required runtime library as an administrator.
  6. The installation process requires consent to the license.
  7. Exit the phpstudy program, find the startup program in the decompression path and open it again, and the error message that the VC runtime library is missing will no longer pop up. It is recommended to create a shortcut to the program to the desktop.
  8. Click the Start button to start the software normally.
  9. In C:\phpStudy\PHPTutorial, you can find the directory for each tool.

2.4 Configure system path

  1. Purpose: To facilitate the direct operation of MySQL on the system command line, the path of MySQL needs to be added to the system variable.
  2. In the installed phpstudy directory, find the MySQL installation directory, enter the bin folder, and copy the full path for later use. C:\phpStudy\PHPTutorial\MySQL\bin.
  3. Right-click Computer→Properties→Advanced System Settings→Advanced→Environment Variables.
  4. Find Path→Select→Edit in System Variables.
  5. At the end of the value, enter a semicolon for the English state, and then paste the MySQL path copied above. Keep clicking OK.
  6. Open the cmd window, enter the command mysql -uroot -proot, log in to the database, and check the feedback to determine whether it is successful. As shown in the figure below, the MySQL path is successfully deployed.

2.5 Install Visual Studio Code

  1. I originally wanted to install notepad++ as an editor. When I searched, I saw that the software was banned for insulting China in 2020. Here, Visual Studio Code is used as the editor.
  2. Go to [https://visualstudio.microsoft.com/zh-hans/] to find the software installation package suitable for your platform at the following location. Here, select the installation package for the Windows platform to download and install.
  3. Right-click to run the installation package as an administrator, and click OK when the following prompt pops up.
  4. Select Agree and click OK.
  5. Keep the default installation path and click Next.
  6. Cross-border mode, click Next.
  7. ①Add the “Open via code” operation to the Windows Explorer file context menu
    ②Add the “Open via code” operation to the Windows Explorer directory context menu
    Description: ①②Check it, you can right-click on the file or directory, Select Open with VScode.
    ③Register code as an editor of a supported file type
    Note: By default, VScode is used to open text-type files such as txt, py, etc. It is generally recommended not to check.
    Make all the code files supported by VScode become open by default in VScode, and the file icon will also change accordingly, which is easy to identify.
    ④Add to PATH (it will take effect after restarting)
    Description: This step is the default, check it, you can use it directly without configuring environment variables.
  8. start installation.
  9. After the installation is complete, it is finished. Click here to install the Simplified Chinese support package.
  10. After the Chinese package is installed, click restart, and you can see that it is a simplified Chinese interface.

3 Environment exercises and tests

3.1 Edit batch files to facilitate query ip information

Create a new text file on the desktop, name it ip.bat, right-click the file to open it with code, and enter the following command.


Double-click the file to query the local ip address.

3.2 Edit the batch file to facilitate the query of the local port number

Create a new text file on the desktop, name it tcp_port.bat, right-click the file to open it with code, and enter the following command.

netstat -what -p tcp

Double-click the file to query the tcp port opened by the machine.

3.3 Open phpstudy and verify

  1. Start phpstudy.
  2. Double-click tcp_port.bat. You can see that some ports have been added.
  3. Enter the IP address of the virtual machine in the browser, access the web page, and the word hello world pops up, indicating that the access is successful.
  4. Click “Other Options Menu” to set various files. Check out PHP Probes.
  5. Swipe to the bottom of the web page, enter the default account and password in the MySQL database, both are root, and click Detect.
  6. A pop-up prompts that the database connection is normal.

4 Summary

  1. Master the method of virtual machine installation system;
  2. Master the method of deploying WAMP environment;


  1. WAMP Encyclopedia

Leave a Reply

Your email address will not be published.