Showing posts with label Unix Linux The Stable Platform. Show all posts
Showing posts with label Unix Linux The Stable Platform. Show all posts

Thursday, August 9, 2007

PHP4 installation on apache2 (require root permission)

Download the php binary distribution from php site and execute the following commands in the same order

$gzip -d php-4.4.4.tar.gz
$tar -xvf php-4.4.4.tar
$cd php-4.4.4
$./configure --with-apxs2=/portal/apache0/bin/apxs --with-config-file-path=/portal/apache0/conf
$make
$make install
$cp php.ini-dist /portal/apache0/conf/php.ini

edit httpd.conf and add below lines
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

restart apache

How to set date in Linux OS

$ date -s "07/24/2007 15:24:00"

some useful unix commands

Free Memory check
$ free -m

Free Memory and Total Memory check
$ free -m -t

Process wise memory usage
$ vmstat
$ top (hit q to stop)

To get to know the environment
$ env

UNIX command to run script as a backend process

example 1: nohup java Reminder &

example 2: nohup ./start.sh &

CHMOD

A combination of:
  • u user (file owner)
  • g group
  • o others
  • a all (same as ugo)

And combination of:
  • r read
  • w write
  • x execute

with the Permissions:
  • = assigned
  • + added
  • - subtracted

one of the following to copy permissions:
  • u user
  • g group
  • o other
or, to set user id:
  • s
example: chmod a+rw temp/

to have read/write access to everyone to the temp folder