Archive

Archive for the ‘Server’ Category

Shell Script to install php

January 22nd, 2011 Sebastian Förster No comments

For my work I have developed a little shellscript to configure and install my php installations:

My folder Structure is like following:

/usr/local/bin/php/phpversion
There is a symlink to current phpversion:
/usr/local/bin/php/current -> /usr/local/bin/php/phpversion

The Script configure php with some standard flags and create the binary files in the folders above:

#!/bin/bash
 
EXTENSION_DIR="/usr/local/bin/php/$1/extensions"
 
if [ $# -lt 1 ]; then
  echo "Usage: $0 php5.3.2 [more options for php configure]"
  exit;
fi
if [ -d /usr/local/bin/php/$1/ ]; then
   mkdir /usr/local/bin/php/$1
fi
 
OPTIONS="$2"
OPTIONS="--without-pear --with-pdo-mysql --with-mysql --with-mysqli --without-pear --enable-force-cgi-redirect $OPTIONS"
cd $1
./configure --prefix=/usr/local/bin/php/$1 $OPTIONS
if [ "$?" -eq "0" ]; then
  make
  make install
fi
if [ -d "$EXTENSION_DIR" ]; then
  mkdir -p $EXTENSION_DIR
fi

you can pass additional configure arguments as second parameter to the script.

Usage

  • Download the php package: wget http://php.net/get…..
  • Extract files: tar xvzf php.tgz
  • execute the script ./scriptname phpfoldername

Now I share the script on github:

https://github.com/Forestsoft-de/forestsoft/tree/master/bash/php

Categories: PHP-Programming, Server Tags:

Mit apt-get eine bestimmte Version einer Bibliothek installieren

October 12th, 2009 Sebastian Förster No comments

Da mein Subversion aus dem Debian Archiv kein Sasl unterstützt muss ich das mir das Paket selbst bauen.

Leider ist im Laufe der Zeit die Paketverwaltung durcheinander gekommen.
Auf meinem Server ist die SASL Version 2.1.22.dfsg1-8 installiert.
In den Archiven auf die ich jetzt Zugriff habe sind jedoch nur Pakete der Version 2.1.19.dfsg1-0sarge2.

Um explizit diese Version zu installieren gibt man apt-get folgendes an:

apt-get install libsasl2=2.1.19.dfsg1-0sarge2

Damit wird die gewünschte Version installiert.

Categories: Server Tags: , , ,