Search This Blog

Thursday, December 2, 2010

Installation commands for LAPP

#! /bin/bash
cd /usr/local
tar -xvjf src/postgresql-8.2.4.tar.bz2
cd postgresql-8.2.4/
./configure
gmake
gmake install
adduser -M postgres
groupadd apache
adduser -M -g apache apache
mkdir /usr/local/pgsql/data
chown postgres:postgres /usr/local/pgsql/data
su -c '/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data' postgres
su -c '/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1&' postgres
su -c '/usr/local/pgsql/bin/createuser sundar' postgres
cp contrib/start-scripts/linux /etc/init.d/postgresql
chmod a+x /etc/init.d/postgresql
cp /usr/local/postgresql-8.0.3/contrib/reindexdb/reindexdb /usr/local/pgsql/bin
chmod a+x /usr/local/pgsql/bin/reindexdb
cd /etc/init.d
chkconfig --add postgresql
chkconfig postgresql on
/etc/init.d/postgresql restart
sed -i '/\/usr\/local\/pgsql\/bin/!s/\(^PATH\) *=\(.*\)/\1=\/usr\/local\/pgsql\/bin\:\2/' /etc/skel/.bash_profile
cp /etc/skel/.bash_profile /home/sundar
echo Postgresql Installation Completed

cd /usr/local            
tar -xvzf src/apache_1.3.37.tar.Z
tar -xvjf src/php-5.2.5.tar.gz
cd apache_1.3.37/
./configure --enable-module=so
gmake
gmake install
echo Apache Installation Completed
cd ../php-5.2.5/
./configure --with-pgsql --with-apxs=/usr/local/apache/bin/apxs --with-curl=/usr --enable-calendar --with-curl --enable-dba --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-mime-magic --with-zlib-dir --enable-soap --with-regex=php
gmake
gmake install
cp /usr/local/src/httpd.conf /usr/local/apache/conf/httpd.conf
cp /usr/local/src/httpd /etc/init.d/httpd

cd /etc/init.d
chkconfig --add httpd
chkconfig httpd on
/etc/init.d/httpd restart
cp /usr/local/src/phpinfo.php /usr/local/apache/htdocs
echo PHP Installation Completed

No comments:

Post a Comment