Install Apache-2.2.29 in CentOS6.4 source code
- /**
- * Install Apache-2.2.29 in CentOS-6.4-minimal
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * Three Steps for installing the software in source code
- * 1) configuration environment: the General Command is./configure -- prefix = DIR (that is, specify the software installation directory). If you want to enable other functions, add the command later.
- * 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 use -- with-ssl = DIR to specify your own SSL library.
- * 2) Compile the source code: the common command is make.
- * 3) install the application. The General Command is makeinstall.
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * Notes
- * 1) the configure tool under the httpd-2.2.29 directory is a tool developed by the GNU software foundation for source code release.
- * 2) If this error occurs during Environment configuration [configure: error: noacceptableCcompilerfoundin $ PATH], the GCC compiling environment is missing.
- * Execute the [yum-yinstallgcc] command to install the tools and libraries required for compiling the source code.
- * 3) If this Error [Error: databasediskimageismalformed] occurs when running the yum command, it indicates that the yum cache has an Error and needs to be cleared.
- * Then run the [yumcleandbcache] command.
- * 4) the main task of configure during Environment configuration is to generate Makefile. The make command during 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 derived process to a non-root user.
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * Install Perl5
- * [Root @ CentOS64software] # yum-yinstallwget
- * [Root @ CentOS64software] # wgethttp: // www.cpan.org/src/5.0/perl-5.20.1.tar.gz
- * Export root@centos64software?#tarzxvfperl-5.20.1.tar.gz
- * [Root @ CentOS64software] # cdperl-5.20.1
- * [Root@CentOS64perl-5.20.1] #./Configure-des-Dprefix =/app/perl
- * [Root@CentOS64perl-5.20.1] # make
- * [Root@CentOS64perl-5.20.1] # makeinstall
- * [Root@CentOS64perl-5.20.1] # perl-v
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * Install OpenSSL
- * Export root@centos64software?#tarzxvfopenssl-1.0.1i.tar.gz
- * [Root @ CentOS64software] # cdopenssl-1.0.1i
- * [Root@CentOS64openssl-1.0.1i] #./config -- prefix =/app/openssl
- * [Root@CentOS64openssl-1.0.1i] # make
- * [Root@CentOS64openssl-1.0.1i] # makeinstall
- * [Root@CentOS64openssl-1.0.1i] #/app/openssl/bin/opensslversion
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * Install Apache
- * Export root@centos64software?#tarzxvfhttpd-2.2.29.tar.gz
- * [Root @ CentOS64software] # cdhttpd-2.2.29
- * [Root@CentOS64httpd-2.2.29] # rpm-qa | grephttp
- * [Root@CentOS64httpd-2.2.29] #./configure -- prefix =/app/apache -- enable-ssl -- with-ssl =/app/openssl
- * [Root@CentOS64httpd-2.2.29] # make
- * [Root@CentOS64httpd-2.2.29] # makeinstall
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * Apache directory structure
- * Bin ------ executable file (in fact, the apache executable file is one: httpd, which is the main program of apache)
- * Run the [/app/apache/bin/httpd-l] command to view the number of modules compiled by apache, that is, to list all modules supported by apache.
- * If [mod_so.c] is included, apache has the function of dynamically loading modules.
- * For example, if you want to add a new module, you don't need to 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 documentation
- * Modules -- stores compiled modules for Dynamic Loading During apache startup.
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * Access Apache
- * Because the main apache program httpd in the/app/apache/bin/directory supports many parameters, it is easy to mix
- * For convenience, apache provides a STARTUP script named apachectl, which is also located in the/app/apache/bin/directory. You can see the script content through [viapachectl ].
- * When starting apache, if you want to start apache that supports SSL in apache2.0, run the [apachectlstartssl] command.
- * In 2.2, directly execute [apachectlstart] to start and support SSL. Of course, the premise is to configure [Includeconf/extra/httpd-ssl.conf] in httpd. conf
- * [Root @ CentOS64bin] #/app/apache/bin/apachectlstart
- * [Root @ CentOS64bin] #/app/apache/bin/apachectlrestart
- * [Root @ CentOS64bin] #/app/apache/bin/apachectlstop
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * Common parameters modified after Apache is installed and started for the first time
- * 1) When apache is started or restarted, the console prints the following information.
- * Httpd: Couldnotreliablydeterminetheserver 'sfullyqualifieddomainname, using192.168.0.103forServerName
- * The solution is to modify the/app/apache/conf/httpd. conf file, uncomment [# ServerNamewww.example.com: 80], and restart apache to see the effect.
- * 2) After apache is started, it accesses http: // 192.168.0.102/through a computer and cannot be accessed ("Itworks! ")
- * The solution is to modify the/etc/sysconfig/iptables file and add a line [-AINPUT-mstate -- stateNEW-mtcp-ptcp -- dport80-jACCEPT]
- * Note that this should be added to the default port 22 rule. If it is added to the end of the iptables file, firewall startup may fail.
- * Run the [serviceiptablesrestart] command to restart the firewall. You do not need to restart Linux.
- * For more information, 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 the/app/apache/conf/httpd. conf file and comment out the line [OptionsIndexesFollowSymLinks ].
- * Access http: // 192.168.0.102/and you will see the familiar "Forbidden: Youdon 'thavepermissiontoaccess/onthisserver ."
- * 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 to add [/app/apache/bin/apachectlstart] to the end of the/etc/rc. d/rc. local file.
- * Timeout *----------------------------------------------------------------------------------------------------------------------
- * @ CreateSep26, 20149: 14: 43AM
- * @ Author Xuan Yu
- */