Introductions:Whew! How about that ? Well, it seems that it is going to build the application from scratch .Yes, my friend , this is a sort of little story how will you compile libraries and patched in a UNIX like OSX,oh a pain and tasky. I 've done this almost a year ago, but that's only for Linux/Unix like OS (say Fedora or CentOS); but now a little porting of compiling package in UNIX/OSX
Objectives:To install Repository in MAC Xserve (period!);with yum ,sudo apt-get and fink(why??)
Requirements:
Note:
All the packages were stored at an "installer" named directory
apr-1.4.2.tar.gz
httpd-2.2.17.tar.gz
subversion-1.6.15.tar.gz
apr-util-1.3.10.tar.gz
libtool-2.2.tar.gz
subversion-1.6.16.tar.gz
autoconf-2.68.tar.gzm4-1.4.tar.gz
db-5.1.25.tar.gz
neon-0.29.5.tar.gz
expat-2.0.1.tar.gz
php-5.3.5.tar.gz
zlib-1.2.5.tar.gz
sqlite-autoconf-3070500.tar.gz
Only fink help in a little whileyum-3.2.29.tar.gz
wget-1.9.tar.gz
fink-0.29.19.tar.gz
Methodology:
Basic Instructions:1) Download all of those files mentioned above
2) Install and compile
3) debug with --prefixes
[autoconf]
root@localhost# curl -L -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz
root@localhos# tar -zxvf autoconf-2.68.tar.gzroot@localhost# cd autoconf-1.2.8
root@localhost# ./configure
root@localhost# make && make install
[BerkerlelyDB]
root@localhost# curl -L -O http://ftp.riken.go.jp/pub/FreeBSD/distfiles/bdb/db-5.1.25.tar.gz
root@localhos# tar -zzxvf db-5.1.25.tar.gz
root@localhost# cd db-5.1.25
root@localhost# cd build_unix
root@localhost# ../dist/configure --prefix=/usr/local/db5
root@localhost# make && make install
[libtool]
root@localhost# curl -L -O http://ftp.gnu.org/gnu/libtool/libtool-2.2.10.tar.gz
root@localhost# tar -zxvf libtool-2.2.tar.gz
root@localhost# cd libtool-2.2.10
root@localhost# ./configure
root@localhost# make && make install
[expat]
root@localhost# curl -L -O http://nchc.dl.sourceforge.net/project/expat/expat/2.0.1/expat-2.0.1.tar.gz
root@localhost# tar -zxvf expat-2.0.1.tar.gz
root@localhost# cd expat-2.0.1
root@localhost# ./configure --prefix=/usr/local/expat
root@localhost# make && make install
[neon]
root@localhost# curl -L -O http://webdav.org/neon/neon-0.29.5.tar.gz
root@localhost# tar -zxvf expat-2.0.1.tar.gz
root@localhost# cd expat-2.0.1
root@localhost# ./configure --prefix=/usr/local/neon
root@localhost# make && make install
[zlib]
root@localhost# curl -L -O http://zlib.net/zlib-1.2.5.tar.gz
root@localhost# tar -zxvf zlib-1.2.5.tar.gz
root@localhost# cd zlib-1.2.5
root@localhost# ./configure --prefix=/usr/local/zlib
root@localhost# make && make install
[sqlite]
root@localhost# curl -L -O http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
root@localhost# tar -zxvf sqlite-autoconf-3070500.tar.gz
root@localhost# cd sqlite-autoconf-3070500
root@localhost# ./configure --prefix=/usr/local/sqlite
root@localhost# make && make install
[apr]
root@localhost# curl -L -O http://download.filehat.com/apache//apr/apr-1.4.2.tar.gz
root@localhost# tar -zxvf apr-1.4.2.tar.gz
root@localhost# cd apr-1.4.2
root@localhost# ./configure --prefix=/usr/local/apr
root@localhost# make && make install
[apr-util]
root@localhost# curl -L -O http://ftp.wayne.edu/apache//apr/apr-1.4.2.tar.gz
root@localhost# tar -zxvf apr-util-1.3.10.tar.gz
root@localhost# cd apr-util-1.3.10
root@localhost# ./configure --prefix=/usr/local/apr-util-1.3.10
root@localhost# make && make install
[mysql]
root@localhost# tar -zxvf mysql-5.xy.tar.gz
root@localhost# cd mysql-5.x.y
root@localhost# ./configure --prefix=/usr/local/mysql
root@localhost# make && make install
[gettext]
root@localhost# sudo su
root@localhost# curl -L -O ftp://ftp.gnu.org/gnu/gettext/gettext-0.17.tar.gz
root@localhost# tar xvzf gettext-0.17.tar.gz
root@localhost# cd gettext-0.17
root@localhost# cd gettext-tools/
root@localhost# ./configure --prefix=gettext
root@localhost# make
root@localhost# make install
[gdbm]
root@localhost# curl -L -O http://savory.googlecode.com/files/gdbm-1.8.3.tar.gz
root@localhost# tar -zxvf gdbm-1.8.3.tar.gz
root@localhost# cd gdbm-18.3
root@localhost# ./configure --prefix=/usr/local/gdbm
root@localhost# make && make install
[Apache]
root@localhost# curl -L -O http://www.ecoficial.com/apachemirror//httpd/httpd-2.2.17.tar.gz
root@localhost# tar -zxvf httpd-2.2.17.tar.gz
root@localhost# cd httpd-2.2.17
root@localhost# ./configure
--prefix=/usr/local/apache2 -with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-zlib=/usr/local/zlib --with-mysql=/usr/local/mysql/ --with-sqlite=/usr/local/sqlite --enable-dav --enable-so --enable-cgi --enable-info --enable-rewrite --enable-speling --enable-usertrack –with-dbm=db5 –with-berkeley-db=/usr/local/db5 --enable-deflate --enable-ssl
root@localhost# make && make install
Browse and test : http://localhost , then you should see the immortal..It Works!
[Subversion]
root@locahost# tar-zxvf subversion-1.6.16.tar.gz
root@localhost# cd subversion-1.6.16
root@localhost@ ./configure --prefix=/usr/local/svn --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config --disable-neon-version-check --with-neon=/usr/local/neon --with-sqlite=/usr/local/sqlite --with-zlib=/usr/local/zlib
[I]Correct path of SVN repository
root@locahost # chown -R daemon:daemon /usr/local/svn
root@localhost# svnadmin create datacenter
[II] Create a username and password stored in a txt file
root@localhost# mkdir /usr/local/password
root@locahost# cd /usr/local/password
root@localhost# httpswd -cm /usr/local/password/secret admin
root@localhost# enter a new password: "password"
[III]Config Apache now to access SVN services!
root@locahost# vim /usr/local/apache2/conf/http.conf
1) Add the following lines
1.a) to load dav modules
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule php5_module modules/libphp5.so
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
1.b) to add location of SVN path with authentications
#
DAV svn
SVNPath /usr/local/svn/datacenter
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /usr/local/password/secret
Require valid-user
SetOutputFilter DEFLATE
SetInputFilter DEFLATE
#
root@locahost# cd /usr/local/apache2/bin/
root@locahost# ./apachectl restart
Browse and check : http://localhost/svn/datacenter then enter a user-name and password.
[Php]
root@localhost# curl -L -O http://ar.php.net/distributions/php-5.3.5.tar.gz
root@localhost# tar -zxvf php-5.3.5.tar.gz
root@localhost# cd php-5.3.5
root@localhost# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli
--prefix=/usr/local/php --with-config-file-path=/usr/local/php --enable-force-cgi-redirect --disable-cgi --with-zlib --with-gdbm=/usr/local/gdbm
root@localhost# make
root@localhost make test
root@localhost# make install
Remarks:
Hints:
Problem : Forbidden Error
Solution:
1.0) Do it always in README
2.0) If ever forbidden error
(404,405,400,etc) occurs
2.a) take note the ownership of the /usr/local/svn (directory)
root@localhost# chown -R daemon:daemon /usr/local/svn
root@localhost# ls -alt
Then you should see ownership of the file
Solution:
2.b) check the apahce ownership!
Username daemon
Usergoup daemon
Solution:
2.c) Try to edit the
SVNPath not SVNParentPAth
2.d) and also don't forget to memorize your password
mkdir /usr/local/password
vim secret , then save
htppasswd -cm /usr/local/password/secret
In installing Subversion
Problem: "/usr/bin/ld: cannot find -lexpat "
Solution: download and install expat
Problem: configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!Note:
This happen because , we directly Yum installed mysql yet PHP now needs the complete path of MySQL- grrrr!
1) Be sure to download the mysql libraries and add ons:
mysql devel,mysql-php,libmysql
2) Use again "whereis"
root@localhost# cd /usr/local/php-5.version.xx
root@localhost# whereis mysql
Then use --with-mysql=/usr/bin/mysql libdir=lib64
root@locahost# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/bin/mysql --with-libdir=lib64 --with-mysqli=/usr/bin/mysql_config --prefix=/usr/local/php --with-config-file-path=/usr/local/php --disable-cgi --with-zlib --with-gdbm
..and Yahoo it saves the day...
Conclusions:
Somehow it is always possible!