dboettger's Blog

Archive for the ‘Installation’ Category

Again a quick documentation about my installation on my Macbook


curl -O ftp://ftp.cac.washington.edu/imap/imap.tar.gz
tar xvzf imap.tar.gz
cd imap-2007e
./configure
make
sudo mkdir -p /usr/local/imap-2007e/include /usr/local/imap-2007e/lib
sudo cp c-client/*.h /usr/local/imap-2007e/include/
sudo cp c-client/*.c /usr/local/imap-2007e/lib/
sudo cp c-client/c-client.a /usr/local/imap-2007e/lib/libc-client.a

curl -O http://heanet.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
curl -O http://www.ijg.org/files/jpegsrc.v8.tar.gz
curl -O http://freefr.dl.sourceforge.net/project/libpng/00-libpng-stable/1.2.42/libpng-1.2.42.tar.gz
curl -O http://de.php.net/distributions/php-5.3.1.tar.gz

tar xvzf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure
make
sudo make install

tar xvzf jpegsrc.v8.tar.gz
cd jpeg-8
./configure
make
sudo make install

tar xvzf libpng-1.2.42.tar.gz
cd libpng-1.2.42
./configure
make
sudo make install

tar xvzf php-5.3.1.tar.gz
cd php-5.3.1
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --sysconfdir=/private/etc --with-config-file-path=/etc --with-ldap=/usr --with-ldap-sasl=/usr --with-libxml-dir=/usr --with-kerberos=/usr --with-curl=/usr --with-zlib-dir=/usr --enable-bcmath --enable-exif --enable-exif --with-bz2=/usr --enable-ftp --with-openssl=/usr --enable-mbstring --enable-mbregex --enable-calendar --enable-sockets --with-iodbc=/usr --with-curl=/usr --sysconfdir=/private/etc --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-xmlrpc --with-xsl=/usr --with-pear --with-libxml-dir=/usr --with-iconv=/usr --with-pdo-mysql=mysqlnd --with-gd --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-xsl=/usr --with-iconv-dir=/usr --with-iodbc=/usr --with-snmp=/usr --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-iconv=/usr --with-pcre-regex --with-imap=/usr/local/imap-2007e --with-imap-ssl --with-mcrypt=/usr/local --enable-soap --enable-cli --with-pear
make
sudo make install

sudo nano /etc/apache2/httpd.conf

Uncomment the following line:
#LoadModule php5_module libexec/apache2/libphp5.so
to
LoadModule php5_module libexec/apache2/libphp5.so

Restart Apache!

sudo apachectl restart

Advertisements

Updated Guide with php 5.3.1

MySQL

Just install the package from mysql.com.

Macports

First install the Macport from macports.org. You also need the Apple developer tools to compile software. The developmentkit from apple ships with the wonderful gcc compiler 😉 .

After you install macports ( a package management for MacOSX) you are able to install the needed libraries. Just execute the following commands:

sudo port install jpeg
sudo port install libpng
sudo port install freetype
sudo port install mcrypt
sudo port install libiconv
sudo port install cclient

Oracle Installation (Instantclient only):

Download the oracle client basic Version 10.2 and SDK 10.2 from the Oracle download page.
Move the extracted files to /opt/instantclient_10_2.

export LD_LIBRARY_PATH=/opt/oracle/instantclient_10_2/sdk/include/:/opt/oracle/instantclient_10_2:.

cd /opt/instantclient_10_2
ln -s libclntsh.dylib.10.1 libclntsh.dylib
ln -s libclntsh.dylib libclntsh.so

export NLS_LANG=”American_America.UTF8″
export DYLD_LIBRARY_PATH=/opt/instantclient_10_2

Download php 5.3.1 from php.net.
Extract the php sourcefile into a diretory.

./configure –prefix=/usr –with-apxs2=/usr/sbin/apxs –with-ldap=/usr –with-kerberos=/usr –with-zlib-dir=/usr –enable-exif –enable-ftp –enable-mbstring –enable-mbregex –enable-sockets –with-iodbc=/usr –with-curl=/usr –with-config-file-path=/etc/php5/php5.3.1-apache2 –sysconfdir=/private/etc –with-mysqli=mysqlnd –with-mysql=mysqlnd –with-openssl=shared,/opt/local –with-xmlrpc –with-xsl=/usr –with-pear –with-libxml-dir=/usr –with-iconv=shared,/opt/local –with-pdo-mysql=mysqlnd –with-gd –with-jpeg-dir=/opt/local –with-png-dir=/opt/local –with-freetype-dir=/opt/local –with-mcrypt=/opt/local –with-imap=/opt/local –with-imap-ssl –enable-soap –with-oci8=instantclient,/opt/instantclient_10_2 –with-pdo-oci=instantclient,/opt/instantclient_10_2,10.2.0.4 –enable-cli –with-pear

We have to edit the Makefile to run a successful compile.

nano Makefile
Edit the line with the EXTRA_LIBS = ….. stuff.
Add -lresolv to the line, save and exit the file.

After editing the Makefile we are able to compile the binaries. Just enter make to execute the compilation.

If make was successful we have to execute make install as superuser. The command sudo make install is our friend 😉 .

We have to create the following directory and link the library to it. Don’t ask just the strange oraclestuff.
mkdir -p /b/32_216/rdbms/lib
ln -s /opt/instantclient_10_2/libclntsh.dylib.10.1 /b/32_216/rdbms/lib/

Apache configuration

The last modification we have to add is the initconfiguration of the apacheservice. We need some variables set in the runtime environment.

We will edit the /System/Library/LaunchDaemons/org.apache.httpd.plist file like that or something similar for you locales.

nano /System/Library/LaunchDaemons/org.apache.httpd.plist

 

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”&gt;
<plist version=”1.0″>
<dict>
<key>Disabled</key>
<true/>
<key>Label</key>
<string>org.apache.httpd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/httpd</string>
<string>-D</string>
<string>FOREGROUND</string>
</array>
<key>OnDemand</key>
<false/>
<key>SHAuthorizationRight</key>
<string>system.preferences</string>
<key>EnvironmentVariables</key>
<dict>
<key>DYLD_LIBRARY_PATH</key>
<string>/opt/instantclient_10_2</string>
<key>TNS_ADMIN</key>
<string>/opt/oracle/tns</string>
<key>LANG</key>
<string>de_DE.UTF-8</string>
<key>NLS_LANG</key>
<string>GERMAN_GERMANY.UTF8</string>
</dict>
</dict>
</plist>

 

I hope i was able to help you guys. If you have any question, don’t hesitate to contact me or post some comments.

APC is a free, open, and robust framework for caching and optimizing PHP intermediate code. — http://pecl.php.net/package/APC

The Installation of APC – Cache is quite easy. I assume you already have the Xcode development tools installed on your system and possibly compiled php on your own.

Just open the Terminal.

sudo pecl install apc

The following question should pop up. Please answer with yes:

Use apxs to set compile flags (if using APC with Apache)? [yes] : yes

After the installation completes, just edit the php.ini under /etc.

nano /etc/php.ini

In the extensions subsection just add following line:

extension=apc.so

MySQL

Just install the package from mysql.com.

Macports

First install the Macport from macports.org. You also need the Apple developer tools to compile software. The developmentkit from apple ships with the wonderful gcc compiler ;-).

After you install macports ( a package management for MacOSX) you are able to install the needed libraries. Just execute the following commands:

sudo port install jpeg
sudo port install libpng
sudo port install freetype
sudo port install mcrypt
sudo port install libiconv
sudo port install cclient

Oracle Installation (Instantclient only):

Download the oracle client basic Version 10.2 and SDK 10.2 from the Oracle download page.
Move the extracted files to /opt/instantclient_10_2.

export LD_LIBRARY_PATH=/opt/oracle/instantclient_10_2/sdk/include/:/opt/oracle/instantclient_10_2:.

cd /opt/instantclient_10_2
ln -s libclntsh.dylib.10.1 libclntsh.dylib
ln -s libclntsh.dylib libclntsh.so

export NLS_LANG=”American_America.UTF8″
export DYLD_LIBRARY_PATH=/opt/instantclient_10_2

Download php 5.2.11 from php.net.
Extract the php sourcefile into a diretory.

./configure –prefix=/usr –with-apxs2=/usr/sbin/apxs –with-ldap=/usr –with-kerberos=/usr –enable-cli –with-zlib-dir=/usr –enable-exif –enable-ftp –enable-mbstring –enable-mbregex –enable-sockets –with-iodbc=/usr –with-curl=/usr –with-config-file-path=/etc –sysconfdir=/private/etc –with-mysql-sock=/var/mysql –with-mysqli=/usr/local/mysql/bin/mysql_config –with-mysql=/usr/local/mysql –with-openssl=shared,/opt/local –with-xmlrpc –with-xsl=/usr –with-pear –with-libxml-dir=/usr –with-iconv=shared,/opt/local –with-pdo-mysql=/usr/local/mysql/bin/mysql_config –with-gd –with-jpeg-dir=/opt/local –with-png-dir=/opt/local –with-freetype-dir=/opt/local –with-mcrypt=/opt/local –with-imap=/opt/local –with-imap-ssl –enable-soap –with-oci8=instantclient,/opt/instantclient_10_2 –with-pdo-oci=instantclient,/opt/instantclient_10_2,10.2.0.4

We have to edit the Makefile to run a successful compile.

nano Makefile
Edit the line with the EXTRA_LIBS = ….. stuff.
Add -lresolv to the line, save and exit the file.

After editing the Makefile we are able to compile the binaries. Just enter make to execute the compilation.

If make was successful we have to execute make install as superuser. The command sudo make install is our friend ;-).

We have to create the following directory and link the library to it. Don’t ask just the strange oraclestuff.
mkdir -p /b/32_216/rdbms/lib
ln -s /opt/instantclient_10_2/libclntsh.dylib.10.1 /b/32_216/rdbms/lib/

Apache configuration

The last modification we have to add is the initconfiguration of the apacheservice. We need some variables set in the runtime environment.

We will edit the /System/Library/LaunchDaemons/org.apache.httpd.plist file like that or something similar for you locales.

nano /System/Library/LaunchDaemons/org.apache.httpd.plist

<code>

<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”&gt;
<plist version=”1.0″>
<dict>
<key>Disabled</key>
<true/>
<key>Label</key>
<string>org.apache.httpd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/httpd</string>
<string>-D</string>
<string>FOREGROUND</string>
</array>
<key>OnDemand</key>
<false/>
<key>SHAuthorizationRight</key>
<string>system.preferences</string>
<key>EnvironmentVariables</key>
<dict>
<key>DYLD_LIBRARY_PATH</key>
<string>/opt/instantclient_10_2</string>
<key>TNS_ADMIN</key>
<string>/opt/oracle/tns</string>
<key>LANG</key>
<string>de_DE.UTF-8</string>
<key>NLS_LANG</key>
<string>GERMAN_GERMANY.UTF8</string>
</dict>
</dict>
</plist>

</code>

I hope i was able to help you guys. If you have any question, don’t hesitate to contact me or post some comments.


Tweets

Advertisements