Install Apache-2.2.29 in CentOS-6.4-minimal

Source: Internet
Author: User
Tags openssl version fully qualified domain name
/* CentOS-6.4-minimal version of the source code installation APACHE-2.2.29 * installation * Source Code installation software often see three steps * 1) configuration environment: Usually the command is. /configure -- prefix = Dir (that is, specify the software installation directory). If you want to enable other functions, you can add the following command * For example, the following -- enable-SSL is used to enable the SSL module of Apache * if you do not want to use the default SSL library of the operating system, you can also use -- With-SSL = dir to specify the self-compiled SSL library * 2) Compile the source code: the General Command is make * 3) install the application: the General Command is make install *-------------- Warning * Note * 1) the configure tool under the httpd-2.2.29 directory is a tool specially released for source code release by the GNU software foundation * 2) If this error occurs during Environment configuration [configure: Error: no acceptable C compiler found in $ path], yes indicates that the GCC compiling environment is missing. * execute the [Yum-y install GCC] command to install the tools and libraries required for compiling the source code. * 3) if this error [error: Database disk image is malformed] occurs when the yum command is executed, it indicates that the yum cache has an error and you need to clear the cache * Then run [Yum clean d Bcache] command ** 4) the main task of configure in Environment configuration is to generate makefile. The make command in source code compilation is compiled according to makefile * 5) it is best to install and start Apache as root, after running as root, apache will switch its derivative process to a non-root user * worker * to install perl5 * [[email protected] software] # Yum-y install wget * [[email protected] software] # wget http://www.cpan.org/src/5.0/perl-5.20.1.ta R.gz * [[email protected] software] # tar zxvf perl-5.20.1.tar.gz * [[email protected] software] # cd perl-5.20.1 * [[email protected] perl-5.20.1] #. /configure-des-dprefix =/APP/perl * [[email protected] perl-5.20.1] # Make * [[email protected] perl-5.20.1] # make install * [[email protected] perl-5.20.1] # Perl-V * Environment *------------------------------------------------------------------------------------ -------------------------------- * Install OpenSSL * [[email protected] software] # tar zxvf openssl-1.0.1i.tar.gz * [[email protected] software] # cd openssl-1.0.1i * [[email protected] openssl-1.0.1i] #. /config -- prefix =/APP/OpenSSL * [[email protected] openssl-1.0.1i] # Make * [[email protected] openssl-1.0.1i] # make install * [[email protected] openssl-1.0.1i] #/ APP/OpenSSL/bin/OpenSSL version *---- Installing * install Apache * [[email protected] software] # tar zxvf httpd-2.2.29.tar.gz * [[email protected] software] # cd httpd-2.2.29 * [[email protected] httpd-2.2.29] # rpm-Qa | grep HTTP * [[email protected] httpd-2.2.29] #. /configure -- prefix =/APP/Apache -- enable-SSL -- With-SSL =/APP/OpenSSL *[ [Email protected] httpd-2.2.29] # Make * [[email protected] httpd-2.2.29] # make install * directories * Apache directory structure * bin ------ executable files (in fact, Apache executable files one: httpd, which is the main program of Apache) * You can run the [/APP/Apache/bin/httpd-L] command to view the number of modules compiled by Apache, list all the modules supported by it * If [mod_so.c] is included, it indicates that Apache has the function of dynamically loading modules * For example, if you want to add a new module, you do not need Compile Apache again. Just compile this module and load it in the configuration file. * conf ----- configuration file (APACHE only has one configuration file) * htdocs --- the default website root directory (that is, after Apache is started, what others actually access when accessing Apache is what is in this directory) * include -- header file * logs ----- log * Man ------ manual * manual --- online document * modules -- stores compiled modules, for Apache to dynamically load * ---------------------------------------------------------------------------------------------------------------------- * to access Apache * at startup, httpd is the main Apache program in the/APP/Apache/bin/directory. Supports many parameters and is easy to confuse * to facilitate users, Apache provides a STARTUP script named apachectl, which is also located in the/APP/Apache/bin/directory, [vi apachectl] shows the script content * When apache is started, if you want to start Apache that supports SSL in apache2.0, you need to execute the [apachectl startssl] command * and in 2.2, directly execute [apachectl start] to start and support SSL. of course, the premise is in httpd. configure [include CONF/extra/httpd-ssl.conf] * [[email protected] bin] #/APP/Apache/bin/apachectl start * [[email protected] bin] #/APP /Apache/bin/apachectl restart * [[email pro Tected] bin] #/APP/Apache/bin/apachectl stop * ---------------------------------------------------------------------------------------------------------------------- * Common modification parameters after Apache is installed and started for the first time * 1) When apache is started or restarted, the console prints the following information * httpd: cocould not reliably determine the server's fully qualified domain name, using 192.168.0.103 for servername *. The solution is to modify/APP/Apache/CONF/httpd. CONF file, uncomment [# servername www. examp Le.com: 80], restart Apache to see the effect * 2) Access http: // 192.168.0.102/from a computer after Apache is started /, inaccessible ("It works!" is displayed on the page when the access is successful! ") * The solution is to modify the/etc/sysconfig/iptables file, add a line [-A input-M state -- state new-m tcp-p tcp -- dport 80-J accept] *. Note that this should be added to the default port 22 rule, if you add to the end of the iptables file, it may cause the firewall to fail * and then execute the [Service iptables restart] command to restart the firewall, you do not need to restart Linux * detailed instructions see http://blog.csdn.net/jadyer/article/details/11324237 * 3) when the index.html of the/APP/Apache/htdocs/object does not exist, accessing Apache will display the file list under the htdocs directory, we can set it to not display the file list * the solution is to modify/APP/Apache/CONF/httpd. in the conf file, comment out the [Options indexes followsymlinks] line, and then access http: // 192.168.0.102/. You will see the familiar "forbidden: you don't have permission to access/on this server. "* 4) If you want to add Apache to the System for Automatic startup, there are two common methods: modify the configuration file and register Apache as a system service (also in the graphical interface called up by the ntsysv command) * the easiest way to modify the configuration file is in/etc/rc. d/RC. add [/APP/Apache/bin/apachectl start] to the end of the local file to * Author * @ create Sep 26,201 4 9:14:43 am * @ author Xuan Yu 

Install Apache-2.2.29 in CentOS-6.4-minimal

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.