Web Performance Optimization tool Webpagetest (iii)-Local deployment (Windows 7 version)

Source: Internet
Author: User
Tags apache error log imagemagick webpagetest

This time you can use the PC-side browser test first, you need to download the official release version of "Webpagetest 3.0".

1. Agent: Browser agent software

2. Mobile: parameter-related code

3. www: Website php code

You can also refer to the official Private Instance configuration, but the document hangs under Google domain name, so you know. I made a simple translation of the private instance

The official documentation is very awkward, but it still has a certain reference value.

First, PHP configuration and software Installation

1) Configure the virtual directory

After entering the virtual address, a familiar page appears, but now the two options for location and browser are not available and require additional configuration.

2) Installation Information

Enter "mine.webpagetest.net/install/" in the browser to view information that is not yet installed:

If you have doubts can also directly see the "install/index.php" source.

3) PHP Modification

1. Memory_limit

Modify the "Memory_limit" in the "php.ini" file

2. Install APC(the alternative PHP Cache)

Optional PHP cache. Place the downloaded DLL file in the "php/ext" folder. and add extensions in "PHP.ini".

Extension=php_apcu.dll

3. Install SQLite(a lightweight database)

First go to the download page, put the contents of the two compressed package into a folder, such as "C:\sqlite" in:

Next, set "Path" in the environment variable.

Add the "php_sqlite3.dll" extension in "php.ini". This extension is available by default in the "ext" folder, but it is not opened.

Extension=php_sqlite3.dll

Second, System tool installation

1) ffmpeg

Install ffmpeg(for extracting video thumbnails), a set of open-source computer programs that can be used to record, transform, and convert digital audio and video into streams.

Features include video capture function, video format conversion, video capture, video watermark, etc. Click here for the Windows version.

Download down there are a few folders, and then put in the C drive, and then put the location in the environment variable "Path" set a bit.

Refresh the page in the install, still not a green tick, in the Apache error log, prompted: ' FFmpeg ' is not an internal or external command, is not a running program or batch file.

So I give "ffmpeg.exe" plus a lot of user groups, but still no, the back of the system , the display can be used.

2) ImageMagick

Install ImageMagick, a free software that creates, edits, and synthesizes pictures.

It can read, convert, and write images in many formats.

Picture cutting, color substitution, application of various effects, picture rotation, composition, text, line, polygon, ellipse, curve, attach to the picture stretching rotation.

3) Jpegtran

Install Jpegtran, which is a JPEG image compression tool. Place the downloaded EXE file in a location and add the "path" path to the environment variable.

4) ExifTool

Install ExifTool, which is a cross-platform picture viewing, authoring and editing application. As with Jpegtran, set the "path" path.

Third, installation Python2.7

1) Install Python2.7

Install Python2.7, an MSI file, directly double-click, but still need to match the"path" path, each with a reboot.

You need to install Python's two modules,Pillow and Ssim.

First put "C:\Python27\Scripts" into the environment variable, so you can use the "pip" command.

2) Pillow

See from visualmetrics , Ssim to install the name is "Pyssim".

Install Pillow

< Span style= "font-family:"microsoft yahei"" >< Span style= "font-family:"microsoft yahei"" >3) < Span style= "font-family:"microsoft yahei"" >< Span style= "font-family:"microsoft yahei"" >pyssim

However, in the installation of Pyssim, there was an disharmony error.

Install Pyssim

InstallMicrosoft Visual C + + Compiler for Python 2.7first.

According to StackOverflow An article of the answer, modified a bit. However, when the installation of scipy, there are new problems.

Search on the internet found a solution. Find the corresponding "WHL" file in "unofficial Windows Binaries for Python Extension Packages".

Download "numpy", "Microsoft Visual C + + X64" and "scipy", and put the two "WHL" files in a directory, "cmd" into this directory, Executes the install command.

Install numpy-1.12. 1+mkl-cp27-cp27m-install scipy-0.19. 0-CP27-CP27M-WIN32.WHL

At this point, all the software that needs to be installed and where it needs to be configured is complete.

Four, desktop testing agent

The agent's related software and files are in the Agent folder, the contents of this folder is taken out separately, for example, "C:\wpt-agent" within.

1) dummynet

The installation of dummynet,dummynet is used to demonstrate network activity during testing, and there are 32-bit and 64-bit operating system installation packages within the Dummynet folder.

Open Control Panel = = "Network and Sharing Center = =" Change adapter settings = = "right local connection = =" Property

Microsoft network Client = = "Install = =" Service = = "Add = =" from disk installation = = "Select" C:\wpt-agent\dummynet\64bit "=" To determine the installation

2) Locations.ini

Configure Geolocation Locations.ini.

There is a "locations.ini.sample" file in "www/settings", which is an example of removing the suffix "sample".

[Locations]1=Test_loc;these are the top-level locations listed in the test Location drop-down list;each of them points to one or more browser configurations[Test_loc]1=IE2=TestLabel=Test Locationgroup=Desktop;Browser is the browser configured in the test agent Wptdriver.ini[IE]Browser=ie9connectivity=Lanlabel= "Test location-ie9"[Test]Browser=chrome,firefoxconnectivity=Lanlabel= "Test Location"

3) Wptdriver.ini

Configure Wptdriver.ini files, including information such as browser execution directory.

In the original "Agent" folder there is a "wptdriver.ini.sample" file, also remove the suffix.

1. Prompt to download

Modify the browser's path, comment installer. Click Aptdriver.exe to prompt me to download flash

Comment out "Spftware" without this error message.

2. Browser Flash Back

Enter the URL and click "START TEST" to jump out of this prompt, and the browser will flash back.

After adding the debug parameter in the "Wptdriver.ini", it will not flash back, but the hint is still there.

[webpagetest] Debug=1

When everything is ready, the Wptdriver window displays:

3. Proxy connection

Next look at the "Install" page and found that none of the two are connected.

Change the location of "Wptdriver.ini" to "ie,test", there is a similar explanation can refer to "webpagetest parameter ", but the parameter name is different.

[webpagetest] Location =ie,test

4. Empty data

Click Start Test again, go to the results page, the following empty data appears.

In the official forum also saw this issue , has been answered by the author, only need to add the "settings/locations.ini" File connection properties can be

[Test] browser=chrome,firefoxconnectivity=Lanlabel= "Test location"

The complete "Wptdriver.ini" file is as follows:

[webpagetest]URL=http://mine2.webpagetest.net/location=ie,test;Browser=chromeTime limit=120;Prevent browser Flash-backDebug=1;key=testkey123;automatically install and update support software (Flash, Silverlight, etc);Software=http://mine.webpagetest.net/installers/software.dat[Chrome]EXE= "C:\Program Files (x86) \google\chrome\application\chrome.exe"Options= '--load-extension= '%wptdir%\extension "--user-data-dir="%profile% "--no-proxy-server ';Installer=http://mine.webpagetest.net/installers/browsers/chrome.dat[Firefox]EXE= "C:\Program Files (x86) \mozilla Firefox\firefox.exe"Options= '-profile '%profile% "-no-remote ';Installer=http://mine.webpagetest.net/installers/browsers/firefox.datTemplate=Firefox[Safari]EXE= "C:\Program Files (x86) \safari\safari.exe"[IE9]EXE= "C:\Program Files (x86) \internet Explorer\iexplore.exe"

4) START TEST

Click Test again and you will get the familiar page.

Related software Download:

http://download.csdn.net/download/loneleaf1/9808719

Resources:

Windows7 How to install Sqlite3

Install scipy with PIP under Windows no Lapack/blas resources found

Webpagetest Setup under Mac

Deploying and installing Webpagetest 2.4 private instances

Web Performance Optimization tool Webpagetest (iii)-Local deployment (Windows 7 version)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.