How to install apache 2.4.12 from source onto Ubuntu 14.04 - apache

I tried to install Apache 2.4.12 from the installation page on the Apache website but to no avail. It said that I needed to install APR, APR-Util and Perl-Compatible Regular Expressions Library (PCRE). So I downloaded them and installed them, so I thought it still gave me an error I think that I am compiling something wrong so if someone could lead me in the right direction that would be great.
Thanks.

why don't you just use:
sudo apt-get install apache2
Cheers,
Nioidai

Please note that you should always install the latest version of a software for more security. I suggest you to install Apache from Ubuntu's apt package manager 'if you are on a production server'. Installing it from source on a local environment doesn't matter.
I've also been trying to do this lately.
Please follow this for the instructions of installing it, by me, with a bit more explanation.
Hope it helps.
To be clean, follow the same steps:
1) Go to http://httpd.apache.org/download.cgi
2) Right click and copy the link of the link like 'Source: httpd-2.4.41.tar.gz'
3) Go to the terminal, and enter the following commands one by one and hit enter for no confusion:
a.
cd /usr/local/src
b.
sudo wget -O- <download-link> | tar -zxf -
c.
sudo apt install libnghttp2 libpcre3 libssl build-essential -y
d. Go to http://apr.apache.org/download.cgi and copy the link like 'Unix Source: apr-1.7.0.tar.gz'
sudo wget -O- <apr-download-link> | tar -zxf -
e. Go to http://apr.apache.org/download.cgi and copy the link like 'Unix Source: apr-util-1.6.1.tar.gz'
sudo wget -O- <apr-util-download-link> | tar -zxf -
f.
sudo mv apr-<apr-version> httpd-<apache-version>/srclib/apr
g.
sudo mv apr-util-<apr-util-version> httpd-<apache-version>/srclib/apr-util
h.
cd httpd-<apache-version>
i. According to me, this configuration is better than any other. The --prefix is where apache is installed.
sudo ./configure --prefix=/usr/local/apache2 --enable-mods-shared="reallyall" --enable-mpms-shared="all"
j.
sudo make
k.
sudo make install
These directories could be altered using the Step 'i'
The apache directory is /usr/local/apache2.
The apache conf directory is /usr/local/apache2/conf.
The apache main conf file is /usr/local/apache2/conf/httpd.conf.
For more info go to http://httpd.apache.org/docs/current/install.html.
Thanks

Related

How to install gearman extension in php7 running on ubuntu 18.04

I am currently required to setup the new server running php7.2 and the server will have many background process for sending emails to customer. the recommendation I got was to use Gearman Job Server.
I have been searching but seems to have only post about gearman-job-server with php5 and below.
The process of installing Gearman Job Server with php7 will be covered in like 4 steps
Install and update the Gearman PPA
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:gearman-developers/ppa
sudo apt-get update
Install Gearman Job Server and some other required components and tools
sudo apt-get install gearman-job-server libgearman-dev php7.0-dev php-pear wget unzip re2c
sudo apt-get upgrade
Download, compile the gearman pecl module and add to php.ini
cd /tmp/
sudo wget https://github.com/wcgallego/pecl-gearman/archive/master.zip
unzip master.zip
cd pecl-gearman-master
sudo phpize
./configure
sudo make
sudo make install
echo "extension=gearman.so" | sudo tee /etc/php/7.0/mods-available/gearman.ini
sudo phpenmod -v ALL -s ALL gearman
Restart webserver or PHP FPM
sudo service php7.0-fpm restart
sudo service apache2 restart
If you are running a different version of PHP make sure you make the appropriate changes to the commands or directories mentioned above. ie “/etc/php/7.0/” to “/etc/php/7.1/” etc.
Thanks to techearl.com for their tutorial which can be found
Here
The answer by Ruberandinda Patience is correct and will work but since the gearman pecl module is packaged for Ubuntu there is a much simpler way to achieve the same thing:
apt install gearman-job-server php-gearman

Building ssldump on Ubuntu

Has anyone built ssldump on Ubuntu lately? I am having trouble building http://downloads.sourceforge.net/project/ssldump/ssldump/0.9b3/ssldump-0.9b3.tar.gz - it appears to be referencing libraries that are too old for Ubuntu 12.04. I am trying this so that I can apply the TLS patch that is at http://sourceforge.net/p/ssldump/patches/8/.
If anyone has specific instructions to build ssldump, please share.
Assuming you have the necessary development libraries (personally, the easiest way for me is to "sudo apt-get install gnome-devel")
sudo apt-get install libpcap0.8-dev
sudo ln -sf /usr/include/pcap-bpf.h /usr/include/net/bpf.h
sudo apt-get install libssl-dev
Then cd into the ssldump source directory and: ./configure --host=i686-pc-linux-gnu --with-pcap-lib=/usr/lib/x86_64-linux-gnu/
make -j4
That should get you there. It worked for me on ubuntu 15.04. I may have missed out a few things though, cos I did it a couple of weeks ago, so if something doesn't work, leave a comment.

Radius Apache web server on centos

Hey guys i am having a big problem , i have a centos vps and and i want radius apache web server Authentication. but in these tutorial http://freeradius.org/mod_auth_radius/ , i do not know where i should enter this :
./configure --add-module=LOCATION/mod_auth_radius.c
( i tried that in "var/www" and "etc/httpd" but show me these error : -bash: ./configure: No such file or directory )
Please help me.
You'd have to run ./configure from your Apache source, wherever you built Apache from. Since it sounds like you're new to building stuff, I wouldn't recommend that you build Apache from source.
On Centos 7, I did the following to build it. First, I had to install a couple of packages for Apache development:
sudo yum -y install httpd-devel
sudo yum -y install openssl
sudo yum -y install openssl-devel
Then to build it I did:
cd /tmp
tar xvf mod_auth_radius-1.5.8.tar
cd mod_auth_radius-1.5.8
cp mod_auth_radius-2.{0,4}.c
sed s/remote_ip/client_ip/g -i mod_auth_radius-2.4.c
apxs -i -a -c mod_auth_radius-2.4.c
The sed it because the code doesn't compile right on Apache 2.4.
There, now you have a /etc/httpd/modules/mod_auth_radius-2.4.so ready to go.

Compiling libapache2-svn for Apache 2.4.4

I want to use Apache 2.4.4 with SVN on Ubuntu server 12.04 (Precise Pangolin). But when I use
apt-get install libapache2-svn
I get the following dependencies error
The following packages have unmet dependencies:
libapache2-svn : Depends: apache2.2-common but it is not going to be installed
Googling around I got some suggestion about compiling from source by hand. I don't know how to do that. How can I do it?
I have two solutions:
Follow the instructions in this Server Fault Q&A.
*Note: Create another user if you're using a root account on the server.
I've asked Ondřej Surý on Launchpad to add Subversion to his Apache PPA. You can add Ondřej Surý's PPA to perform a normal update/upgrade.
You did ask Ondrej to include Subversion in his PPA launchpad. But I couldn't install the libapache2-svn package after adding Ondrej's PPA.
Somehow the instructions provided for compiling didn't work for me so here's an alternative way to get it working.
Reference:
(https://askubuntu.com/questions/312568/where-can-i-find-a-subversion-1-8-binary)
WANDisco has Subversion 1.8 for Ubuntu then:
sudo sh -c 'echo "# WANdisco Open Source Repo" >> /etc/apt/sources.list.d/WANdisco.list'
sudo sh -c 'echo "deb http://opensource.wandisco.com/ubuntu precise svn18" >> /etc/apt/sources.list.d/WANdisco.list'
wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
sudo apt-get update
After that:
apt-cache show subversion | grep '^Version:'
And then you should be good to install normally:
sudo apt-get install subversion libapache2-svn

Upgrade native apache from 2.2.21 to 2.4.2 - Lion 10.7.4

As stated in the title, i have apache 2.2.21 running natively as part of my LAMP stack. I would like to upgrade apache to the latest version - 2.4.2. Is there a recommended or best practice to safely perform this operation without breaking stuff of loosing existing settings, etc?
Thank you for the time and direction.
I was able to install the latest version (2.4.2) using the steps below.
Install pcre (perl compatible regular-expression library) using fink (or what ever osx package manager you use)
$ fink install pcre
Install the latest (2.4.2 as of writing this) using the steps below
$ sudp apachectl stop
$ cd ~/Downloads/
$ curl -O http://mirror.uoregon.edu/apache//httpd/httpd-2.4.2.tar.gz
$ gzip -d httpd-2.4.2.tar.gz
$ tar xvf httpd-2.4.2.tar
$ cd httpd-2.4.2
$ ./configure
$ make
$ sudo make install
However, the new binaries got installed under /usr/local and doesn't seem to have overridden the default install locations on OSX lion. And I could not find a config.nice file to use as suggested by the apache upgrade documentation.
The original apache files httpd, apachectl and ab were located on /usr/sbin. Without having found any documentation to confirm this was the right thing to do, I went ahead and backed up the original files and sym-linked the new files from /usr/local/bin into /usr/sbin, as follows.
$ cd /usr/sbin
# backup the original files ...
$ sudo ln -s ../local/bin/ab ab
$ sudo ln -s ../local/bin/apachectl apachectl
$ sudo ln -s ../local/bin/httpd httpd
This seems to have worked, although it would be nice to get a confirmation from someone in the know.