Catalyst的mod_perl方式终于部署好了

    终于......
有几点需要总结一下:
1.首先是安装mod_perl,我的apache是2.0的,所以从perl.apache.org上边下载了2.0.3的版本,安装的时候报已经有mod_perl的版本,好像是1.99还是多少来着,然后还列举了conflict的文件夹和文件。
如此只要将那个冲突的文件夹和文件mv走就可以了。安装完之后,在apache的modules目录下边多了mod_perl.so文件。似乎好像安装中间说了什么DSO方式。
2.然后是配置:
我之前用的catalyst的文件夹跟安装apache的目录不在一块,所以必须首先调整那个DocumentRoot,否则都一直报找不到index.tt2文件等等,反正就是相对路径不太对,具体如下设置httpd.conf:
LoadModule perl_module modules/mod_perl.so #apache 加载mod_perl.so的模块,这个是必须的,没什么
PerlSwitches -I/home/robin/AdventOFC/lib # you can pass any Perl's command line switches in httpd.conf using the PerlSwitches directive这个是传递perl的命令行参数的
PerlModule AdventOFC #PerlModule is used to load modules using their package names.

    SetHandler          modperl
    PerlResponseHandler AdventOFC



DocumentRoot "/home/robin/AdventOFC/root"
#静态文件就不用mod_perl的方式了

   SetHandler default-handler #sethandler可以设置不使用modperl去做,似乎就是这个意思

我的原来做实验画图的OFC目录是/home/robin/AdventOFC

3.整个catalyst的应用比原来再自带的httpd server上快了100倍,很快了,不会像原来会感觉到慢
4.画了个20000个点的图,flash player不断的报时间过长,2000个点的OFC flash图,还是很快的,看看下图:
bb


fj.pngofc_2.jpg

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/82392/viewspace-200401/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/82392/viewspace-200401/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Practical Mod Perl<br><br> Copyright <br> Preface <br> What You Need to Know <br> Who This Book Is For <br> How This Book Is Organized <br> Reference Sections <br> Filesystem Conventions <br> Apache and Perl Versions <br> Typographic Conventions <br> Command Interpreter Program (Shell) Conventions <br> Installing Perl Modules <br> How to Contact Us <br> Acknowledgments <br> <br> Part I: mod_perl Administration <br> Chapter 1. Introducing CGI and mod_perl <br> Section 1.1. A Brief History of CGI <br> Section 1.2. The Apache 1.3 Server Model <br> Section 1.3. The Development of mod_perl 1.0 <br> Section 1.4. Apache 1.3 Request Processing Phases <br> Section 1.5. References <br> <br> Chapter 2. Getting Started Fast <br> Section 2.1. Installing mod_perl 1.0 in Three Steps <br> Section 2.2. Installing mod_perl on Unix Platforms <br> Section 2.3. Configuring and Starting the mod_perl Server <br> Section 2.4. Installing mod_perl for Windows <br> Section 2.5. Preparing the Scripts Directory <br> Section 2.6. A Sample Apache::Registry Script <br> Section 2.7. A Simple mod_perl Content Handler <br> Section 2.8. Is This All We Need to Know About mod_perl? <br> Section 2.9. References <br> <br> Chapter 3. Installing mod_perl <br> Section 3.1. Configuring the Source <br> Section 3.2. Building mod_perl (make) <br> Section 3.3. Testing the Server (make test) <br> Section 3.4. Installation (make install) <br> Section 3.5. Installation Scenarios for Standalone mod_perl <br> Section 3.6. Building mod_perl with Other Components <br> Section 3.7. Installing mod_perl with the CPAN.pm Interactive Shell <br> Section 3.8. Installing mod_perl on Multiple Machines <br> Section 3.9. Installation into a Nonstandard Directory <br> Section 3.10. How Can I Tell if mod_perl Is Running? <br> Section 3.11. General Notes <br> Section 3.12. References <br> <br> Chapter 4. mod_perl Configuration <br> Section 4.1. Apache Configuration <br> Section 4.2. mod_perl Configuration <br> Section 4.3. The Startup File <br> Section 4.4. Apache Configuration in Perl <br> Section 4.5. Validating the Configuration Syntax <br> Section 4.6. The Scope of mod_perl Configuration Directives <br> Section 4.7. Apache Restarts Twice <br> Section 4.8. Enabling Remote Server Configuration Reports <br> Section 4.9. Tips and Tricks <br> Section 4.10. Configuration Security Concerns <br> Section 4.11. General Pitfalls <br> Section 4.12. References <br> <br> Chapter 5. Web Server Control, Monitoring, Upgrade, and Maintenance <br> Section 5.1. Starting the Server in Multi-Process Mode <br> Section 5.2. Starting the Server in Single-Process Mode <br> Section 5.3. Using kill to Control Processes <br> Section 5.4. Using apachectl to Control the Server <br> Section 5.5. Validating Server Configuration <br> Section 5.6. Setuid root Startup Scripts <br> Section 5.7. Preparing for Machine Reboot <br> Section 5.8. Upgrading a Live Server <br> Section 5.9. Three-Tier Server Scheme: Development, Staging, and Production <br> Section 5.10. Web Server Monitoring <br> Section 5.11. Server Maintenance Chores <br> Section 5.12. References <br> <br> Chapter 6. Coding with mod_perl in Mind <br> Section 6.1. Before You Start to Code <br> Section 6.2. Exposing Apache::Registry Secrets <br> Section 6.3. Namespace Issues <br> Section 6.4. Perl Specifics in the mod_perl Environment <br> Section 6.5. CHECK and INIT Blocks <br> Section 6.6. Apache::Registry Specifics <br> Section 6.7. Transition from mod_cgi Scripts to Apache Handlers <br> Section 6.8. Loading and Reloading Modules <br> Section 6.9. Handling the "User Pressed Stop Button" Case <br> Section 6.10. Handling Server Timeout Cases and Working with $SIG{ALRM} <br> Section 6.11. Generating Correct HTTP Headers <br> Section 6.12. Method Handlers: The Browse and See, Browse and View Example <br> Section 6.13. References <br> <br> <br> Part II: mod_perl Performance <br> Chapter 7. Identifying Your Performance Problems <br> Section 7.1. Looking at the Big Picture <br> Section 7.2. Asking the Right Questions <br> Section 7.3. References <br> <br> Chapter 8. Choosing a Platform for the Best Performance <br> Section 8.1. Choosing the Right Operating System <br> Section 8.2. Choosing the Right Hardware <br> Section 8.3. References <br> <br> Chapter 9. Essential Tools for Performance Tuning <br> Section 9.1. Server Benchmarking <br> Section 9.2. Perl Code Benchmarking <br> Section 9.3. Process Memory Measurements <br> Section 9.4. Apache::Status and Measuring Code Memory Usage <br> Section 9.5. Code Profiling Techniques <br> Section 9.6. References <br> <br> Chapter 10. Improving Performance with Shared Memory and Proper Forking <br> Section 10.1. Sharing Memory <br> Section 10.2. Forking and Executing Subprocessesfrom mod_perl <br> Section 10.3. References <br> <br> Chapter 11. Tuning Performance by Tweaking Apache's Configuration <br> Section 11.1. Setting the MaxClients Directive <br> Section 11.2. Setting the MaxRequestsPerChild Directive <br> Section 11.3. Setting MinSpareServers, MaxSpareServers, and StartServers <br> Section 11.4. KeepAlive <br> Section 11.5. PerlSetupEnv <br> Section 11.6. Reducing the Number of stat( ) Calls Made by Apache <br> Section 11.7. Symbolic Links Lookup <br> Section 11.8. Disabling DNS Resolution <br> Section 11.9. Response Compressing <br> Section 11.10. References <br> <br> Chapter 12. Server Setup Strategies <br> Section 12.1. mod_perl Deployment Overview <br> Section 12.2. Standalone mod_perl-Enabled Apache Server <br> Section 12.3. One Plain and One mod_perl-Enabled Apache Server <br> Section 12.4. One Light Non-Apache and One mod_perl-Enabled Apache Server <br> Section 12.5. Adding a Proxy Server in httpd Accelerator Mode <br> Section 12.6. The Squid Server and mod_perl <br> Section 12.7. Apache's mod_proxy Module <br> Section 12.8. mod_rewrite Examples <br> Section 12.9. Getting the Remote Server IP in the Backend Server in the Proxy Setup <br> Section 12.10. Frontend/Backend Proxying with Virtual Hosts <br> Section 12.11. HTTP Authentication with Two Servers and a Proxy <br> Section 12.12. When One Machine Is Not Enough for Your RDBMS DataBase and mod_perl <br> Section 12.13. Running More than One mod_perl Server on the Same Machine <br> Section 12.14. SSL Functionality and a mod_perl Server <br> Section 12.15. Uploading and Downloading Big Files <br> Section 12.16. References <br> <br> Chapter 13. TMTOWTDI: Convenience and Habit Versus Performance <br> Section 13.1. Apache::Registry PerlHandler Versus Custom PerlHandler <br> Section 13.2. Apache::args Versus Apache::Request::param Versus CGI::param <br> Section 13.3. Buffered Printing and Better print( ) Techniques <br> Section 13.4. Interpolation, Concatenation, or List <br> Section 13.5. Keeping a Small Memory Footprint <br> Section 13.6. Object Methods Calls Versus Function Calls <br> Section 13.7. Using the Perl stat( ) Call's Cached Results <br> Section 13.8. time( ) System Call Versus $r->request_time <br> Section 13.9. Printing Unmodified Files <br> Section 13.10. Caching and Pre-Caching <br> Section 13.11. Caching with Memoize <br> Section 13.12. Comparing Runtime Performance of Perl and C <br> Section 13.13. References <br> <br> Chapter 14. Defensive Measures for Performance Enhancement <br> Section 14.1. Controlling Your Memory Usage <br> Section 14.2. Coding for a Smaller Memory Footprint <br> Section 14.3. Conclusion <br> Section 14.4. References <br> <br> Chapter 15. Improving Performance Through Build Options <br> Section 15.1. Server Size as a Function of Compiled-in Features <br> Section 15.2. mod_status and ExtendedStatus On <br> Section 15.3. DYNAMIC_MODULE_LIMIT Apache Build Option <br> Section 15.4. Perl Build Options <br> Section 15.5. Architecture-Specific Compile Options <br> Section 15.6. References <br> <br> Chapter 16. HTTP Headers for Optimal Performance <br> Section 16.1. Date-Related Headers <br> Section 16.2. Content Headers <br> Section 16.3. Content Negotiation <br> Section 16.4. HTTP Requests <br> Section 16.5. Avoiding Dealing with Headers <br> Section 16.6. References <br> <br> <br> Part III: Databases and mod_perl <br> Chapter 17. Databases Overview <br> Section 17.1. Volatile Databases <br> Section 17.2. Non-Volatile Databases <br> Section 17.3. References <br> <br> Chapter 18. mod_perl Data-Sharing Techniques <br> Section 18.1. Sharing the Read-Only Data in and Between Processes <br> Section 18.2. Sharing Data Between Various Handlers <br> Section 18.3. References <br> <br> Chapter 19. DBM and mod_perl <br> Section 19.1. mod_perl and DBM <br> Section 19.2. Resource Locking <br> Section 19.3. Flawed Locking Methods <br> Section 19.4. Locking Wrappers Overview <br> Section 19.5. Tie::DB_Lock <br> Section 19.6. Examples <br> Section 19.7. References <br> <br> Chapter 20. Relational Databases and mod_perl <br> Section 20.1. Persistent Database Connections with Apache::DBI <br> Section 20.2. Improving Performance <br> Section 20.3. DBI Debug Techniques <br> Section 20.4. References <br> <br> <br> Part IV: Debugging and Troubleshooting <br> Chapter 21. Error Handling and Debugging <br> Section 21.1. Warnings and Errors Explained <br> Section 21.2. Debugging Code in Single-Server Mode <br> Section 21.3. Tracing System Calls <br> Section 21.4. Tracing mod_perl-Specific Perl Calls <br> Section 21.5. Debugging Perl Code <br> Section 21.6. Analyzing Dumped core Files <br> Section 21.7. Hanging Processes: Detection and Diagnostics <br> Section 21.8. Useful Debug Modules <br> Section 21.9. Looking Inside the Server <br> Section 21.10. References <br> <br> Chapter 22. Troubleshooting mod_perl <br> Section 22.1. Configuration and Startup <br> Section 22.2. Code Parsing and Compilation <br> Section 22.3. Runtime <br> Section 22.4. Shutdown and Restart <br> <br> Chapter 23. Getting Help and Online Resources <br> Section 23.1. How to Report Problems <br> Section 23.2. Mailing List Etiquette <br> Section 23.3. Resources <br> <br> <br> Part V: mod_perl 2.0 <br> Chapter 24. mod_perl 2.0: Installation and Configuration <br> Section 24.1. What's New in Apache 2.0 <br> Section 24.2. What's New in Perl 5.6.0-5.8.0 <br> Section 24.3. What's New in mod_perl 2.0 <br> Section 24.4. Installing mod_perl 2.0 <br> Section 24.5. Configuring mod_perl 2.0 <br> Section 24.6. Resources <br> <br> Chapter 25. Programming for mod_perl 2.0 <br> Section 25.1. Migrating to and Programming with mod_perl 2.0 <br> Section 25.2. New Apache Phases and Corresponding Perl*Handlers <br> Section 25.3. I/O Filtering <br> <br> <br> Part VI: Appendixes <br> Appendix A. mod_perl Recipes <br> Section A.1. Emulating the Authentication Mechanism <br> Section A.2. Reusing Data from POST Requests <br> Section A.3. Redirecting POST Requests <br> Section A.4. Redirecting While Maintaining Environment Variables <br> Section A.5. Handling Cookies <br> Section A.6. Sending Multiple Cookies with the mod_perl API <br> Section A.7. Sending Cookies in REDIRECT Responses <br> Section A.8. CGI::params in the mod_perlish Way <br> Section A.9. Sending Email from mod_perl <br> Section A.10. mod_rewrite in Perl <br> Section A.11. Setting PerlHandler Based on MIME Type <br> Section A.12. Singleton Database Handles <br> Section A.13. Terminating a Child Process on Request Completion <br> Section A.14. References <br> <br> Appendix B. Apache Perl Modules <br> Section B.1. Development-Stage Modules <br> Section B.2. Modules to Aid Debugging <br> Section B.3. Control and Monitoring Modules <br> Section B.4. Server Configuration Modules <br> Section B.5. Authentication-Phase Modules <br> Section B.6. Authorization-Phase Modules <br> Section B.7. Access-Phase Modules <br> Section B.8. Type Handlers <br> Section B.9. Trans Handlers <br> Section B.10. Fixup Handlers <br> Section B.11. Generic Content-Generation Modules <br> Section B.12. Application-Specific Content-Generation Modules <br> Section B.13. Database Modules <br> Section B.14. Toolkits and Frameworks for Content-Generation and Other Phases <br> Section B.15. Output Filters and Layering Modules <br> Section B.16. Logging-Phase Handlers <br> Section B.17. Core Apache Modules <br> Section B.18. Other Miscellaneous Modules <br> <br> Appendix C. ISPs Providing mod_perl Services <br> Section C.1. Users Sharing a Single Web Server <br> Section C.2. Users Sharing a Single Machine <br> Section C.3. Giving Each User a Separate Machine (Colocation) <br> Section C.4. Giving Each User a Virtual Machine <br> <br> Appendix D. The Template Toolkit <br> Section D.1. Fetching and Installing the Template Toolkit <br> Section D.2. Overview <br> Section D.3. Typical Uses <br> Section D.4. Template Toolkit Language <br> Section D.5. Processing Templates <br> Section D.6. Apache/mod_perl Handler <br> Section D.7. Apache::Template Module <br> Section D.8. Hangman Application <br> Section D.9. References <br> <br> Appendix E. The AxKit XML Application Server <br> Section E.1. Installing and Configuring AxKit <br> Section E.2. Your First AxKit Page <br> Section E.3. Dynamic Content <br> Section E.4. More XPathScript Details <br> Section E.5. XSLT <br> Section E.6. Putting Everything Together <br> Section E.7. More Reasons to Use AxKit <br> <br> Appendix F. HTTP Status Codes <br> Section F.1. HTTP/1.0 Status Codes <br> Section F.2. HTTP/1.1 Status Codes <br> Section F.3. References <br> <br> <br> Colophon <br> Index <br>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值