Search

User login

Poll

What is your favorite DB Server ?:
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

My YM

Author Information

sentono
Offline
Last seen: 2 days 15 hours ago
Joined: 09/21/2007

Alexa Rank

Who's online

There are currently 0 users and 12 guests online.
Home
  • warning: Invalid argument supplied for foreach() in /usr/home/wowtutorial/public_html/sites/all/modules/adsense_injector/adsense_injector.module on line 352.
  • warning: Invalid argument supplied for foreach() in /usr/home/wowtutorial/public_html/sites/all/modules/adsense_injector/adsense_injector.module on line 35.

How To Install HTTPD PHP and MySQL OpenSUSE 11 i586

What is Apache / HTTPD ?
Apache is a freely available Web server that is distributed under an open source license. It is the most widely-installed Web server.

What is PHP ?
PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in standalone graphical applications.

What is MySQL ?
MySQL is a relational database management system (RDBMS)[1] which has more than 6 million installations.[2] The program runs as a server providing multi-user access to a number of databases.

In This Tutorial, We will start to install and configure Apache Webserver, PHP and Mysql from Source / tar.gz in O/S OpenSUSE 11.

So I assume you already have OpenSUSE11 installed, up and running.
This tutorial also can be implemented in other O/S such as : Centos and Fedora or other Linux O/S.

1. Download All Packages and Other dependency packages.

Login into your server with root access.

#cd /root
#wget http://www.alliedquotes.com/mirrors/apache/httpd/httpd-2.2.12.tar.gz
#wget http://us.php.net/distributions/php-5.3.0.tar.gz
#wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/mysql-5.1.37.tar.gz

Download GD, Freetype, LibXML2,LIBJPEG, LIBPNG, CURL, OpenSSL, ZLIB, DBI, GD

#wget ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
#wget http://www.ijg.org/files/jpegsrc.v7.tar.gz
#wget http://curl.haxx.se/download/curl-7.19.5.tar.gz
#wget http://mirror.dknss.com/nongnu/freetype/freetype-2.3.9.tar.gz
#wget http://mirror.unej.ac.id/cpan/authors/id/T/TI/TIMB/DBI-1.609.tar.gz
#wget http://biznetnetworks.dl.sourceforge.net/project/libpng/00-libpng-stable...
#wget http://www.openssl.org/source/openssl-0.9.8k.tar.gz
#wget http://www.zlib.net/zlib-1.2.3.tar.gz
#wget http://www.libgd.org/releases/gd-2.0.35.tar.gz

2. Extract, Configure and Install MySQL Server

#cd /root
#tar -zxvf mysql-5.1.37.tar.gz
#cd mysql-5.1.37
#./configure --prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/var \
--with-pthread --with-big-tables
#make && make install

Change mysql dir permission

#chown -R mysql.mysql /usr/local/mysql

Copy mysql cnf files from this directory below to /etc/
and change the file to my.cnf

#cd /usr/local/mysql/share/mysql
#cp my-small.cnf /etc/my.cnf

Install mysql DB

#/usr/local/mysql/bin/mysql_install_db --user=mysql

Starting mysql server

#/usr/local/mysql/bin/mysqld_safe --user=mysql &

Create mysql root password

#/usr/local/mysql/bin/mysqladmin -u root password 'new-password'

Add into boot.local

#pico /etc/init.d/boot.local

### add this line below into boot.local ###
/usr/local/mysql/bin/mysqld_safe --user=mysql &[/code]

3. Install OpenSSL

#cd /root
#tar -zxvf openssl-0.9.8k.tar.gz
#cd openssl-0.9.8k
#./configure && make && make install

4. Install Apache/ HTTPD Web Server

#cd /root
#tar -zxvf httpd-2.2.12.tar.gz
#cd httpd-2.2.12
#./configure --prefix=/usr/local/apache2 \
--enable-so --enable-mods-shared=most \
--enable-ssl=static --with-ssl=/usr/local/ssl
#make && make install

Starting Apache Webserver

#/usr/local/apache2/bin/apachectl start

Add into boot.local

#pico /etc/init.d/boot.local
### Add this line below into boot.local ###
/usr/local/apache2/bin/apachectl start[/code]

5. Install Zlib, FreeType, GD, LibXML2,LIBJPEG, LIBPNG, CURL, DBI

#cd /root
#tar -zxvf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure && make && make install

#cd ..
#tar -zxvf freetype-2.3.9.tar.gz
#cd freetype-2.3.9
#./configure && make && make install

#cd ..
#tar -zxvf jpegsrc.v7.tar.gz
#cd jpeg-7
#./configure --prefix=/usr/local  --enable-shared
#make && make install

#cd ..
#tar -zxvf libpng-1.2.38.tar.gz
#cd libpng-1.2.38
#./configure && make && make install

#cd ..
#tar -zxvf curl-7.19.5.tar.gz
#cd curl-7.19.5
#/configure && make && make install

#cd ..
#tar -zxvf libxml2-2.7.3.tar.gz
#cd libxml2-2.7.3
#./configure && make && make install

#cd ..
#tar -zxvf gd-2.0.35.tar.gz
#cd gd-2.0.35
#./configure --with-freetype=/usr/local \
--with-jpeg=/usr/local/lib \
--with-png=/usr/local/lib
#aclocal
#make && make install

#cd ..
#tar -zxvf DBI-1.609.tar.gz
#cd DBI-1.609
#perl Makefile.PL
#make && make install

#cd /usr/local
#wget ftp://ftp.cac.washington.edu/imap/imap-2007e.tar.gz
#tar -zxvf imap-2007e.tar.gz
#cd imap-2007e
#make slx EXTRACFLAGS="-fPIC"
#mkdir include
#mkdir lib
#cp src/c-client/*.h include/
#cp c-client/c-client.a lib/libc-client.a
#cp c-client/osdep.h include/
#cp c-client/env_unix.h include/
#cp c-client/linkage.h include/

6. Install PHP

#cd /root
#tar -zxvf php-5.3.0.tar.gz
#cd php-5.3.0
# ./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-gd=/usr/local \
--with-gd=/usr/local \
--with-jpeg-dir=/usr/local/lib \
--with-zlib-dir=/usr/local \
--enable-ftp \
--with-png-dir=/usr/local/lib \
--with-freetype-dir=/usr/local \
--with-curl=/usr/local \
--with-imap=/usr/local/imap-2007e \
--enable-mbstring
#make && make install

Copy php.ini

#cp php.ini-production /usr/local/lib/php.ini

Configure httpd.conf to support PHP

#cd /usr/local/apache2/conf/
#pico httpd.conf

### make sure this line below is already there
LoadModule php5_module        modules/libphp5.so
AddType application/x-httpd-php .php

Compiling PHP eaccelerator

#cd /root
#wget http://snapshots.eaccelerator.net/eaccelerator-svn358.tar.gz
#tar -zxvf eaccelerator-svn358.tar.gz
#cd eaccelerator-svn358
#export PHP_PREFIX="/usr/local"
#$PHP_PREFIX/bin/phpize
#./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
#make
#make install

Configure php.ini to support eaccelerator

#vi /usr/local/lib/php.ini
### add few lines below in the end of php.ini ###

[eaccelerator]
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so"
eaccelerator.shm_size="128"
eaccelerator.cache_dir="/tmp"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="300"
eaccelerator.shm_prune_period="120"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

Create eaccelerator tmp dir

#mkdir /tmp/eaccelerator
#chmod 0777 /tmp/eaccelerator

NOTE : zend optimizer 3.3.3 is not support with PHP 5.3.0

Modify kernel.shmmax value

#vi /etc/sysctl.conf
### add line below ###
kernel.shmmax = 134217728

Refresh the value with sysctl

#/sbin/sysctl -p

7. Restart Apache Webserver

#/usr/local/apache2/bin/apachectl stop
#/usr/local/apache2/bin/apachectl start

8. Create a test.php with phpinfo in file

#cd /usr/local/apache2/htdocs
#pico test.php

<? phpinfo(); ?>

Or We also can check php result from console

#php -v
PHP 5.3.0 (cli) (built: Aug  5 2009 11:04:23)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
    with eAccelerator v0.9.6-svn358-dev, Copyright (c) 2004-2007 eAccelerator, by eAccelerator

9. Open a test.php from your Browser

You can try to access test.php from your browser
Example your server ip address is 10.10.10.10

Http://10.10.10.10/test.php

If browser show like below it's mean you are success configure Apache, PHP and Mysql
Please make sure you need to crosscheck with the PHP ext module such as mysql module, GD etc.

IMPORTANT :

This tutorial will not working if you are trying to install it into opensuse or other linux 64 bit distro,
This tutorial is for 32 bit linux distro
So i've created another tutorial for other linux 64 bit distro. click here for the complete tutorial

 

Comments

nice

nice

It's my first use

It's my first use

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Recent comments

Facebook Fans

Sponsors

Online Store

Tag Cloud