Install Apache under Linux
1. Download Source File
$ from http://httpd.apache.org/download.cgi
2. Uncompress
$ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd-NN
3. Install APR, APR-util, Pcre (yum -y install apr apr-util pcre-devel) or:
(1)
#wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
#wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
#wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
(2)
#yum remove apr-util-devel apr apr-util-mysql apr-docs apr-devel apr-util apr-util-docs
(3)
tar -zxf apr-1.4.5.tar.gz
cd apr-1.4.5
./configure --prefix=/usr/local/apr
make
make install
tar -zxf apr-util-1.3.12.tar.gz
cd apr-util-1.3.12
./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
make
make install
unzip -o pcre-8.10.zip
cd pcre-8.10
./configure --prefix=/usr/local/pcre
make
make install
4. Config
$ ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
5. Compile & install
$ make
$ make install
6. Configure
$ vi PREFIX/conf/httpd.conf
7. Run
$ PREFIX/bin/apachectl -k start
If the follow error happens:
"checking for pcre-config... false configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/"
#vi /usr/local/apache2/conf/httpd.conf
enable "ServerName localhost"
Access in Browse "http://localhost"
Configure HTTP Redirect
# vi /usr/local/apache2/conf/httpd.conf
Redirect / http://10.61.38.151/123
1. Download Source File
$ from http://httpd.apache.org/download.cgi
2. Uncompress
$ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd-NN
3. Install APR, APR-util, Pcre (yum -y install apr apr-util pcre-devel) or:
(1)
#wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
#wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
#wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
(2)
#yum remove apr-util-devel apr apr-util-mysql apr-docs apr-devel apr-util apr-util-docs
(3)
tar -zxf apr-1.4.5.tar.gz
cd apr-1.4.5
./configure --prefix=/usr/local/apr
make
make install
tar -zxf apr-util-1.3.12.tar.gz
cd apr-util-1.3.12
./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
make
make install
unzip -o pcre-8.10.zip
cd pcre-8.10
./configure --prefix=/usr/local/pcre
make
make install
4. Config
$ ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
5. Compile & install
$ make
$ make install
6. Configure
$ vi PREFIX/conf/httpd.conf
7. Run
$ PREFIX/bin/apachectl -k start
If the follow error happens:
"checking for pcre-config... false configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/"
#vi /usr/local/apache2/conf/httpd.conf
enable "ServerName localhost"
Access in Browse "http://localhost"
Configure HTTP Redirect
# vi /usr/local/apache2/conf/httpd.conf
Redirect / http://10.61.38.151/123