Sahu
Upcoming SlideShare
Loading in...5
×
 

Sahu

on

  • 1,043 views

 

Statistics

Views

Total Views
1,043
Views on SlideShare
1,042
Embed Views
1

Actions

Likes
0
Downloads
13
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Sahu Sahu Presentation Transcript

  • APACHE
    • Apache install
    • Apache uninstall
    • Apache configure View slide
    • Apache setup
    View slide
  • APACHE INSTALL
    • You will have a binary file called httpd in the src directory. A binary distribution of Apache will supply this file.
    • The next step is to install the program and configure it.
    • Apache is designed to be configured and run from the same set of directories where it is compiled.
    • If you want to run it from somewhere else, make a directory and copy the conf, logs and icons directories into it.
    • The next step is to edit the configuration files for the server.
    • This consists of setting up various directives in up to three central configuration files. By default, these files are located in the conf directory and are called srm.conf, access.conf and httpd.conf.
  • APACHE INSTALL
    • To help you get started there are same files in the conf directory of the distribution, called srm.conf-dist, access.conf-dist and httpd.conf-dist. Copy or rename these files to the names without the -dist.
    • Then edit each of the files. Read the comments in each file carefully.
    • Failure to setup these files correctly could lead to your server not working or being insecure.
    • You should also have an additional file in the conf directory called mime.types. This file usually does not need editing.
    • First edit httpd.conf. This sets up general attributes about the server:
    • the port number, the user it runs as, etc. Next edit the srm.conf file; this sets up the root of the document tree, special functions like server-parsed HTML or internal imagemap parsing, etc. Finally, edit the access.conf file to at least set the base cases of access.
  • APACHE INSTALL
    • In addition to these three files, the server behavior can be configured on a directory-by-directory basis by using .htaccess files in directories accessed by the server.
    • Code:yum install httpd
    • Code:yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
  • APACHE UNINSTALL
    • REMOVE apache:
    • to remove apache, there are serveral way these are the ways i know
    • OPTION 1: Run this command if you installed apache with RPM or throug the automatic option during the Fedora/Red Hat OS installation.
    • code:yum remove httpd
    • OPTION 2: Run
    • code:/etc/init.d/httpd stop
    • to get the package name. It should come back with something like this:
    • Code:apachecfg-0.3.1-6
    • apache-1.2.5-1
  • APACHE UNINSTALL
    • You can then use this command to remove Apache:
    • Code:rpm -e apache-1.2.5-1
    • OPTION 3. If you compiled apache on your own. If you did a manual install then just delete /usr/local/apache (or wherever it is installed).
    • OPTION 4. f you are doing it manually then to remove Apache from your Linux server, enter this line at the Linux command prompt:
    • Code:rm -rf /usr/local/apache2
    • OPTION 5: To find files by name try "locate"; it will force you to run updatedb the first time.
    • To find packages that are installed try
    • rpm -qa *apache* *mysql*
    • { note "rpm -qa" lists all installed packages }
  • APACHE UNINSTALL
    • On mthis system:
    • Code:
    • [root@foo ~]# rpm -qa *apache* *mysql*
    • ant-apache-resolver-1.6.5-2jpp.2
    • koffice-kexi-driver-mysql-1.6.1-4.fc6
    • mysql-server-5.0.27-1.fc6
    • ant-apache-log4j-1.6.5-2jpp.2
    • mysql-bench-5.0.27-1.fc6
    • mysql-connector-odbc-3.51.12-2.2
    • apachetop-0.12.6-2.fc6
    • ant-apache-oro-1.6.5-2jpp.2
  • APACHE UNINSTALL
    • mod_auth_mysql-3.0.0-3.1
    • libdbi-dbd-mysql-0.8.1a-1.2.2
    • mysql-5.0.27-1.fc6
    • php-mysql-5.1.6-3.3.fc6
    • ruby-mysql-2.7.1-2.fc6
    • ant-apache-bcel-1.6.5-2jpp.2
    • mysql-devel-5.0.27-1.fc6
  • APACHE UNINSTALL
    • To see what files are in a specifig package
    • Code:
    • [root@foo ~]# rpm -ql ant-apache-bcel
    • /etc/ant.d/apache-bcel
    • /usr/lib/gcj/ant
    • /usr/lib/gcj/ant/ant-apache-bcel-1.6.5.jar.db
    • /usr/lib/gcj/ant/ant-apache-bcel-1.6.5.jar.so
    • /usr/share/java/ant/ant-apache-bcel-1.6.5.jar
    • /usr/share/java/ant/ant-apache-bcel.jar
    • /usr/share/java/ant/ant-jakarta-bcel.jar
  • Apache Configuration httpd.conf walkthrough
  • Prefork MPM Apache 1.3 and Apache 2.0 Prefork Each child handles one connection at a time Many children High memory requirements “ You’ll run out of memory before CPU”
  • Prefork Directives (Apache 2.0) StartServers MinSpareServers MaxSpareServers MaxClients MaxRequestsPerChild
  • Worker MPM Apache 2.0 and later Multithreaded within each child Dramatically reduced memory footprint Only a few children (fewer than prefork)
  • Worker Directives MinSpareThreads MaxSpareThreads ThreadsPerChild MaxClients MaxRequestsPerChild
  • KeepAlive Requests Persistent connections Multiple requests over one TCP socket Directives: KeepAlive MaxKeepAliveRequests KeepAliveTimeout
  • Apache 2.0 Filters Greg Ames Jeff Trawick
  • Agenda Why filters? Filter data structures and utilites An example Apache filter Filter types Configuration directives
  • Agenda cont... Frequently used Apache filters Output filters Input filters Pitfalls ways to avoid them mod_ext_filter Debugging hints The big filter list
  • Why filters? Same idea as Unix command line filters: ps ax | grep "apache.*httpd" | wc -l Allows independent, modular manipulations of HTTP data stream if a 1.3 CGI creates SSI or PHP tags, they aren't parsed CGI created SSI tags can be parsed in 2.0 possible Zend issue w/PHP at present
  • The general idea
  • Filter utilities and structures ap_register_[input|output]_filter creates ap_filter_rec_t ap_add_[input|output]_filter[_handle] creates ap_filter_t ap_pass_brigade passes a bucket brigade to the next output filter ap_get_brigade gets a bucket brigade from the next input filter
  •