PHP Installation From Source Code

May 2, 2008 Linux Services Config | Comments (0) admin @ 7:22 pm

PHP Installation

This guide will help you for installing your php script on your linux server (install with php source code)PHP

1. Downloading and untaring PHP package.
#cd /usr/local/src/webserver
#wget ‘php-version.tar.gz’
#tar zxpf php-version.tar.gz 2. Create your configuration file.
#pico php_install

3. Add the following.
#cd php-version-folder
#./configure –with-apxs2=/usr/local/apache/bin/apxs –disable-debug –enable-ftp –enable-inline-optimization –enable-magic-quotes –enable-mbstring –enable-mm=shared –enable-safe-mode –enable-track-vars –enable-trans-sid –enable-wddx=shared –enable-xml –with-dom –with-gd –with-gettext –with-mysql=/var/lib/mysql –with-mysqli=/var/lib/mysql/bin/mysql_config –with-regex=system –with-xml –with-zlib-dir=/usr/lib –with-jpeg-dir=/usr/lib

Read More…

MySQL Installation from Source

MySQL Installation

1. Remove any old packages if they exist and kill the processes.MySQL
#rpm -e MySQL-devel
#rpm -e MySQL-client
#rpm -e MySQL-server
#killall mysqld

2. Create your source file directory.
#mkdir /usr/local/src/mysql
#cd /usr/local/src/mysql

3. Download your source file into this directory.

4. After download complete.
#tar -zxvf mysql -*
#cd /usr/local/src/mysql/mysql-version
#groupadd mysql
#useradd -g mysql mysql
#pico conf_mysql

5. Now add the following to the conf_mysql file.
CFLAGS=”-03″
CXX=gcc
CXXFLAGS=”-03 -felide-constructors -fno-exceptions -fno-rtti”

./configure –prefix=/usr/local/mysql –with-extra-charsets=complex –enable-thread-safe-client –enable-local-infile –enable-assembler –disable-shared –with-client-ldflags=-all-static –with-mysqld-ldflags=-all-static

Read More…

Apache Installation From Source Code

April 30, 2008 Linux Services Config | Comments (0) admin @ 5:19 am

Apache Installation

Check what packages is requires for httpd with command and remove it : #rpm -q –whatrequires httpd

1. Remove any old packages if they exist and kill the processes.Apache
#rpm -e redhat-config-httpd
#rpm -e httpd
#ps aux | grep httpd
#killall httpd

2. Create a new directory for your source, move to that directory, and download your files.
#mkdir -p /usr/local/src/webserver
#cd /usr/local/src/webserver
#wget ‘apache source file from website .tar.gz’
#tar zxpf filename.tar.gz

3. Create your configure script.
#pico apache_install

4. Add the following to the script.
#cd /usr/local/src/webserver/apache_version
#make distclean

./configure –prefix=/usr/local/apache –enable-module=so –enable-rewrite=shared –enable-setenvif=shared –enable-mime=shared –enable-mime_magic=shared –enable-dir=shared –enable-auth=shared –enable-access=shared –enable-alias=shared –enable-status=shared –enable-userdir=shared –enable-vhost_alias=shared –enable-env=shared –enable-log_referer=shared –enable-log_config=shared –enable-log_agent=shared –enable-headers=shared –enable-speling=shared –enable-ssl=shared

5. Make the script executable.
#chmod +x apache_install

6. Build and install Apache.
#./apache_install
#cd /usr/local/src/webserver/apache_version*
#make
#make install

7. Link your control files.
#ln -s /www/bin/apachectl /usr/bin/apachectl
#ln -s /www/bin/apachectl /usr/sbin/apachectl

8. Start it up.
#apachectl start

Done for Apache Installation.