Mac comes with Apache environment Open Terminal and enter sudo apachectl -v (you may need to enter your machine secret). The Apache version is shown below Then enter sudo apachectl start and Apache will start. Open the Safari browser and enter "http://localhost" in the address bar. You should see a page with the content "It works!". It is located in "/Library/WebServer/Documents/", which is the default root directory of Apache. Apache's installation directory is: /etc/apache2/, etc is hidden by default. There are three ways to view: 1. Right-click Finder in the dock, select "Go to Folder", and enter "/etc" Windows can go to http://httpd.apache.org/download.cgi to download, or install from the command line 1. Install Apache sudo port install apache2 Start Apache: sudo apachectl start 2. brew install pcre 3. wget http://ftp.yz.yamagata-u.ac.jp/pub/network/apache//httpd/httpd-2.4.4.tar.bz2 (1) Decompression 4. ab -n 1000 -c 10 http://localhost:3000/ The last slash is essential For this ab -n1000 -c10 http://localhost:3000/ command, under the Windows system, you need to first use the cd command to locate the bin folder of your Apache installation directory. . . Parameter description of ab -n The number of requests to execute -c The number of concurrent -t Maximum time to wait for return -b TCP send and receive buffer size, unit (byte) -p uses post (also needs to define -T parameter) -u Use put (also need to define -T parameter) -T content-type, for example application/x-www-form-urlencoded, default is text/plain -w prints the results in an HTML table -x table attributes -y tr line attributes -z td column attributes -C Set cookie, for example, Apache=1234 -H header line, for example Accept-Encoding:gzip -k Whether to mark HTTP Keep Alive Test results: This is ApacheBench, Version 2.3 <$Revision: 1663405 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Completed 600 requests Completed 700 requests Completed 800 requests Completed 900 requests Completed 1000 requests Finished 1000 requests Server Software: Server Hostname: localhost Server Port: 3000 Document Path: / Document Length: 14 bytes Concurrency Level: 10 Time taken for tests: 0.323 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 115000 bytes HTML transferred: 14000 bytes Requests per second: 3097.37 [#/sec] (mean) Time per request: 3.229 [ms] (mean) Time per request: 0.323 [ms] (mean, across all concurrent requests) Transfer rate: 347.85 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 1 Processing: 1 3 2.2 2 16 Waiting: 1 3 2.2 2 16 Total: 1 3 2.2 2 16 Percentage of the requests served within a certain time (ms) 50% 2 66% 3 75% 3 80% 4 90% 5 95% 7 98% 13 99% 15 100% 16 (longest request) The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Next.js Getting Started Tutorial
>>: A brief introduction to the command line tool mycli for operating MySQL database
Table of contents 1. Comments on MySQL primary ke...
Table of contents Pull the rocketmq image Create ...
Effect: CSS style: <style type="text/css&...
Table of contents DOM node Element node: Text nod...
Regarding the issue that JavaScript strict mode d...
Table of contents 1. Example 2. Create 100 soldie...
What is a big deal? Transactions that run for a l...
1. The as keyword indicates an assertion In Types...
Vue router transitions are a quick and easy way t...
A few days ago, I exchanged some knowledge about ...
Nginx Installation CentOS 6.x yum does not have n...
Preface: To store multiple elements, arrays are t...
Table of contents Animation Preview Other UI Libr...
What is ZooKeeper ZooKeeper is a top-level projec...
If you want to understand React Router, you shoul...