Install Apache + PHP + MySQL + memcached + filezilla + Perl + AWStats on Windows

Source: Internet
Author: User
Tags filezilla install perl

When developing PHP on Windows, the runtime environment is an essential part. We often choose the existing environment suite, currently, popular environment Kits include XAMPP, Wamp, apmserv, dedeampz, wnmp, and phpnow. Phpnow has been used for almost year 34. Today, Wamp is used in the company, and Wamp is very convenient to use. It also supports seamless switching between multiple versions. Today, when I had nothing to do, I replaced phpnow with Wamp and installed Perl + AWStats + memcached + filezilla. The installation and configuration of the entire environment are recorded here for your reference only.

1. Uninstall an existing running environment

If you have installed IIS, MySQL, or Apache, You Need To uninstall or replace the port because Wamp's Apache uses 80 and MySQL uses 3306, which belongs to the default port, it is also recommended port. To avoid conflicts, we recommend that you uninstall them.

Ii. download and install the Wamp environment Kit

First, download the latest version from the official website. The official website only provides an introduction to English and French, but the Wamp environment kit is multi-language (24 languages are supported, of course, Chinese is included ). After the download, run the installation directly. The installation directory I selected here is D: \ Program Files \ Wamp. The installation process is not described too much. It mainly describes the functions and explanations of files and folders in Wamp.

 

  1. AliasAlias directory, used to store the alias configuration file (Conf)
  2. AppsUsed to store aliasesSource code
  3. BinThe core directory of the runtime environment, which containsApache,PHP,MySQLIf you need multiple versions, download them from the official website and copy them to it.
  4. LangWampPerson Language Pack directory, becauseWampThe operation interface supports multiple languages, where all language packs are stored.
  5. LogsApache,MySQL,XdebugOperation and operation logs are generated here.
  6. ScriptsWampCore script execution file of the console
  7. TMPWampCache temporary directory,WampModified by defaultPHP.IniInSession.Save_path
  8. ToolsWampTool storage directory
  9. VhostsInWampBy default, it is defined as the configuration storage directory of the VM. Here, it is defined as the source file directory for storing the VM. Because I have created many local VM instancesHttpd-Vhosts.ConfModify configurations
  10. WWW localhostIs also the source directoryWampProject directory
  11. Wampmanager.ConfWampConfiguration file, mainly the configuration information of the selected version
  12. Wampmanager.EXTWampRun the master file
  13. Wampmanager.TPLWampThe template file of the console. You can customize some options and restart the console after modification.WampYou can.

 

After Wamp is installed, you can use localhost for browsing, and then install memcached, filezilla, Perl, and AWStats.

 

3. download and install the FTP server software filezilla

Filezilla is an open-source FTP server software. filezilla also has client software, which is easy to download and install. Keep all the default options. Click here to download the filezilla server software.

4. download and install the cache solution memcached

Memcached is also a cross-platform memory-based distributed cache solution. Using memcached can greatly reduce the database pressure and improve the performance of the entire website. Since the official website does not have a Windows platform version, here I download the version compiled by libevent and memcached. Click here to download it. After the download is complete, decompress it to get memcached.exe. I will put it under the D: \ Program Files \ Wamp \ bin \ memcached directory, then open cmd, enter

 

    1. D:\ ProgramFiles\ Wamp \ BIn\ Memcached-D install

 

Install memcached as a system service and then start memcached.

    1. D:\ ProgramFiles\ Wamp \ BIn\ Memcached-D start

The following are commonly used memcached parameter commands.

  1. -P listening port
  2. -L connected IP address. The default value is local
  3. -D start: Start the memcached service.
  4. -D restart: restart the memcached service.
  5. -D stop | Shutdown the running memcached Service
  6. -D install the memcached Service
  7. -D uninstall memcached Service
  8. -U runs as root (only valid when running as root)
  9. -MB maximum memory usage, in MB. The default value is 64 MB.
  10. -An error is returned when M memory is used up, instead of deleting items.
  11. -C: Maximum number of simultaneous connections. The default value is 1024.
  12. -F block size growth factor, default value: 1.25
  13. -N: minimum allocation space. The default value of key + value + flags is 48.
  14. -H Show Help

After installing the memcached service, you still need a memcached extension to use it in PHP. php officially provides the memcached dll extension, which is downloaded directly and placed in D: \ Program Files \ Wamp \ bin \ PHP \ php5.3.10 \ ext directory, restart Wamp. If you check whether memcached is successfully loaded in phpinfo.

After installing memcached, we need to test whether it can be used properly. Use the following sectionProgramTo test.

    1. <? PHP
    2. $ Mem = new memcache;
    3. $ Mem-> connect ("127.0.0.1", 11211 );
    4. $ Mem-> set ('key', 'This is a test! ', 0, 60 );
    5. $ Val = $ mem-> get ('key ');
    6. Echo $ val;
    7. ?>

If the program outputs this is a test! It indicates that memcached can be used normally.

5. Download and install Perl

Since AWStats runs in Perl, you need to add Perl support for Apache. Download activiteperl for installation. Click here to download it. After the download is complete, execute the installation. The installation directory of Perl here is D: \ Program Files \ Wamp \ bin \ Perl. After the installation is complete, you need to add database support, open CMD and execute the following statements to support the MySQL database.

    1. D:\ ProgramFiles\ Wamp \ BIn\ Perl \ BIn\ Ppm install DBD-MySQL

After the installation is completed, the installation of Perl is completed. However, some simple configuration is required for Apache to support Perl. Open D: \ Program Files \ Wamp \ bin \ apache \ apache2.2.21 \ conf \ httpd. conf and find

    1. <Directory"D:/program files/Wamp/www /">
    2. Options indexes followsymlinksIncludes execcgi
    3. AllowOverride all
    4. Order allow, deny
    5. Allow from all
    6. </Directory>

Continue to find

    1. Directoryindex index. php index. php3 index.html index.htmIndex. cgi index. pl

Continue

    1. AddhandlerCGI-Script.CGI
    2. AddhandlerCGI-Script.PL

The red underline is added. After modification, Perl installation and configuration can be completed.

6. Install AWStats

AWStats is a powerful log analysis tool. First download the AWStats source code. The latest version of the official website is 7.1. Click here to download it. Three folders are obtained after the download is decompressed. Here, I put these three folders under the D: \ Program Files \ Wamp \ apps \ awstatis7.1 directory.

Create a file AWStats. conf in the Directory D: \ Program Files \ Wamp \ alias and write the following source code:

  1. # Awastat Configuration
  2. Alias/Awstatsclasses"D:/program files/Wamp/apps/awstats7.1/wwwroot/classes /"
  3. Alias/Awstatscss"D:/program files/Wamp/apps/awstats7.1/wwwroot/CSS /"
  4. Alias/Awstatsicons"D:/program files/Wamp/apps/awstats7.1/wwwroot/icon /"
  5. ScriptAlias/AWStats/"D:/program files/Wamp/apps/awstats7.1/wwwroot/cgi-bin /"
  6. <Directory"D:/program files/Wamp/apps/awstats7.1 /">
  7. AllowOverrideNone
  8. OptionsExeccgi
  9. OrderAllow,Deny
  10. AllowFromAll
  11. </Directory>

Then open D: \ Program Files \ Wamp \ apps \ awstats7.1 \ wwwroot \ cgi-bin \ awredir. PL and D: \ Program Files \ Wamp \ apps \ awstats7.1 \ wwwroot \ cgi-bin \ AWStats. PL changes the first line:

    1. #! D: \ Program Files \ Wamp \ bin \ Perl \ bin \ perl.exe

Next, copy the AWStats. model. conf file and name it AWStats. localhost. conf. open the file and modify some of the configurations as follows:

    1. Logfile="D: \ Program Files \ Wamp \ logs \ Access. log"
    2. Logformat=1
    3. Sitedomain="Localhost"
    4. Diricons="/Awstatsicons"
    5. Allowtoupdatestatsfrombrowser=1

Finally, in D: \ Program Files \ Wamp \ bin \ apache \ apache2.2.21 \ conf \ httpd. conf

    1. Customlog"D:/program files/Wamp/logs/access. log"Combined
    2. # Customlog "D:/program files/Wamp/logs/access. log" combined

The red part is the modified part. Save it and restart Wamp. Use http: // localhost/AWStats. Pl to view and use AWStats.

Conclusion

So far, the installation of Apache + PHP + MySQL + memcached + filezilla + Perl + AWStats on the Windows platform has been completed. During this period, some problems have been solved most smoothly with the help of Google.

Download resources and Reference Links

wampserver Official Website: http://www.wampserver.com
wampserver download: Click to download
memcached Official Website: http://memcached.org/
memcached download: Click to download
filezilla Official Website: http://filezilla-project.org/
filezilla Server Download: Click to download
filezill client download: Click to download
ActivePerl Official Website: http://www.activestate.com/activeperl
ActivePerl download: click to download
AWStats project home page: http://awstats.sourceforge.net/
AWStats download: Click to download

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.