Operating system: ubuntu12.04
Objective:
Linux, the default installation software, in the development process will often not know what path to find the required program, so the manual installation program for the subsequent use will provide very convenient. Here, take the example of installing Apache.
One, prepare
1, Install Apr
:http://apr.apache.org/download.cgi
[Email protected]:/work/soft/apache]# tar jxvf apr-1.5.0. tar.bz2
[Email protected] @ubuntu:/work/soft/apache/apr-1.5.0]# /configure--prefix=/work/installed/apr
[Email protected] @ubuntu:/work/soft/apache/apr-1.5.0]# make
[[Email protected] @ubuntu:/work/soft/apache/apr-1.5.0]# make install
2, install Apr-util
:http://apr.apache.org/download.cgi
[Email protected]:/work/soft/apache]# tar jxvf apr-util-1.5.3. tar.bz2
[Email protected] @ubuntu:/work/soft/apache/apr-util-1.5.3]# /configure--prefix=/work/installed/apr-util-- with-apr=/work/installed/apr
[Email protected] @ubuntu:/work/soft/apache/apr-util-1.5.3]# make
[[Email protected] @ubuntu:/work/soft/apache/apr-util-1.5.3]# make install
3, install Pcre
: http://pcre.org/
[Email protected]:/work/soft/apache]# tar jxvf pcre-8.35. tar.bz2
[Email protected] @ubuntu:/work/soft/apache/pcre-8.35]# /configure--prefix=/work/installed/pcre
[Email protected] @ubuntu:/work/soft/apache/pcre-8.35]# make
[[Email protected] @ubuntu:/work/soft/apache/pcre-8.35]# make install
Note : If you encounter problems when you install Pcre: Configure:error:You need a C + + compiler for C + + support.
workaround :sudo apt-get install build-Essential
Second, install Apache
: http://httpd.apache.org/
[Email protected]:/work/soft/apache]# tar jxvf httpd-2.4.9.tar.bz2
[Email protected] @ubuntu:/work/soft/apache/httpd-2.4.9]# /configure--prefix=/work/installed/apache-- WITH-APR=/WORK/INSTALLED/APR--with-apr-util=/work/installed/apr-util--with-pcre=/work/installed/pcre
[Email protected] @ubuntu:/work/soft/apache/httpd-2.4.9]# make
[[Email protected] @ubuntu:/work/soft/apache/httpd-2.4.9]# make install
Three, configure
1. Modify the configuration file
Otherwise, there will be a problem:
AH00558:httpd:Could not reliably determine the server ' s fully qualified domain name, using 127.0.1.1. Set the ' ServerName ' directive globally to suppress this message
Workaround:
[[Email protected]:/work/installed/apache]#sudo gedit conf/httpd.conf
Put
# ServerName www.example.com:80
Switch
ServerName localhost:80
2, start
[[Email protected]:/work/installed/apache]#./bin/apachectl Start
3, boot up
Open File:/etc/rc.local
[[Email protected]:/]#sudo gedit/etc/rc.local
Add to:/work/installed/apache/bin/apachectl Start
Four, reference file
1,http://blog.csdn.net/chenxiaohua/article/details/2047757
2,http://blog.163.com/hlz_2599/blog/static/142378474201182811611382/
Manual installation of Apache under Linux detailed