Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old November 8th, 2004   #1
eNiNjA
Just Give Me the Beans!
 
eNiNjA's Avatar
 
Join Date: Oct 2004
Location: parts unknown
Beans: 64
Send a message via ICQ to eNiNjA Send a message via MSN to eNiNjA
How To: Setup a Development Webserver

This may not be the best or easiest route, but this is how I setup mine on a fresh Ubuntu install.

Your results may vary...

Development Webserver, Using Apache2, PHP 5, and MySQL 4, Running on Ubuntu Linux

sudo aptitude install build-essential
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install libgd-dev

download the binary version of MySQL (currently MySQL 4.1.7) from http://mysql.com
download the latest version oh PHP (currently PHP 5.0.2) from http://php.net
download the latest version of apache 2 (currently Apache 2.0.52) from http://apache.org
download the latest libxml2 library (currently libxml2-2.6.15.tar.gz), from http://xmlsoft.org
download the latest zlib library (currently zlib 1.2.1), from http://gzip.org/zlib

:~ $ mv php-5.0.2.tar.gz \
> libxml2-2.6.15.tar.gz \
> mysql-standard-4.1.7-pc-linux-i686.tar.gz \
> httpd-2.0.52.tar.gz \
> zlib-1.2.1.tar.gz /tmp

cd /tmp

tar -zxvf mysql-standard-4.1.7-pc-linux-i686.tar.gz
tar -zxvf php-5.0.2.tar.gz
tar -zxvf httpd-2.0.52.tar.gz
tar -zxvf libxml2-2.6.15.tar.gz
tar -zxvf zlib-1.2.1.tar.gz

cd libxml2-2.6.15
./configure
make
sudo make install

cd /tmp/zlib-1.2.1
./configure
make
sudo make install

Installing MySQL:

cd /tmp

sudo mv mysql-standard-4.1.7-pc-linux-i686 /usr/local/mysql

sudo groupadd mysql

sudo useradd -g mysql mysql

sudo mv /usr/local/mysql/share/fill_help_tables.sql /usr/local/mysql/support-files

sudo /usr/local/mysql/scripts/mysql_install_db --user=mysql

sudo chown -R root /usr/local/mysql

sudo chgrp -R mysql /usr/local/mysql

sudo chown -R mysql /usr/local/mysql/data

Start it up:

sudo /usr/local/mysql/support-files/mysql.server start

Test it:

/usr/local/mysql/bin/mysql

Secure it:

sudo /usr/local/mysql/bin/mysql -u root
SET PASSWORD FOR ''@'localhost' = PASSWORD('newpass');
SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');

Installing Apache:

cd /tmp/httpd-2.0.52
./configure --prefix=/usr/local/apache2 --enable-so
make
sudo make install

Installing PHP:

cd /tmp/php-5.0.2
nano config.sh

Add (this will vary depend on your needs):

./configure \
--prefix=/usr/local/php5 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-libxml-dir=/usr/local/lib \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-gd \
--enable-sockets

Press ctrl+o
Then ctrl+x

chmod 755 config.sh

./config.sh
make
sudo make install

sudo mv /tmp/php-5.0.2/php.ini-dist /usr/local/lib/php.ini

sudo nano /usr/local/apache2/conf/httpd.conf

Add:

AddType application/x-httpd-php .php

ctrl+o
ctrl+x

sudo /usr/local/apache2/bin/apachectl start

sudo nano /usr/local/apache2/htdocs/test.php

Add:

Code:
 <?php
 phpinfo();
 ?>
Open a browser and visit:

http://localhost/test.php
eNiNjA is offline   Reply With Quote
Old November 8th, 2004   #2
panickedthumb
Cloned
 
panickedthumb's Avatar
 
Join Date: Oct 2004
Location: /home
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to panickedthumb Send a message via AIM to panickedthumb Send a message via MSN to panickedthumb Send a message via Yahoo to panickedthumb Send a message via Skype™ to panickedthumb
Re: How To: Setup a Development Webserver

Just out of curiosity, why did you compile all that when it's all in the repositories for apt-get?
panickedthumb is offline   Reply With Quote
Old November 8th, 2004   #3
Artiom
5 Cups of Ubuntu
 
Artiom's Avatar
 
Join Date: Nov 2004
Beans: 34
Re: How To: Setup a Development Webserver

Also you can use xampp for linux
Artiom is offline   Reply With Quote
Old November 8th, 2004   #4
eNiNjA
Just Give Me the Beans!
 
eNiNjA's Avatar
 
Join Date: Oct 2004
Location: parts unknown
Beans: 64
Send a message via ICQ to eNiNjA Send a message via MSN to eNiNjA
Re: How To: Setup a Development Webserver

Quote:
Originally Posted by Artiom
Also you can use xampp for linux
xampp is very insecure, and i dont like where it puts stuff.
eNiNjA is offline   Reply With Quote
Old November 8th, 2004   #5
jwenting
Just Give Me the Beans!
 
Join Date: Nov 2004
Beans: 49
Re: How To: Setup a Development Webserver

An easier route by far is to install Orion http://www.orionserver.com (or Tomcat http://jakarta.apache.org if you prefer something that's completely free).
Then add a decent database, I prefer Firebird (http://www.ibphoenix.com ).
All that after installing JDK and J2EE.

Won't give you PHP without a bit of work but will give JSP which is superior.
jwenting is offline   Reply With Quote
Old November 8th, 2004   #6
eNiNjA
Just Give Me the Beans!
 
eNiNjA's Avatar
 
Join Date: Oct 2004
Location: parts unknown
Beans: 64
Send a message via ICQ to eNiNjA Send a message via MSN to eNiNjA
Re: How To: Setup a Development Webserver

Quote:
but will give JSP which is superior
Where i come from JSP is a dirty, dirty word.

*looks at the ubuntu-geek

hehe...
eNiNjA is offline   Reply With Quote
Old December 6th, 2004   #7
Alessio
A Carafe of Ubuntu
 
Alessio's Avatar
 
Join Date: Dec 2004
Location: Fano (Italia)
Beans: 130
Re: How To: Setup a Development Webserver

Quote:
Originally Posted by eNiNjA
xampp is very insecure, and i dont like where it puts stuff.
Why do you say this?
Alessio is offline   Reply With Quote
Old January 22nd, 2005   #8
eNiNjA
Just Give Me the Beans!
 
eNiNjA's Avatar
 
Join Date: Oct 2004
Location: parts unknown
Beans: 64
Send a message via ICQ to eNiNjA Send a message via MSN to eNiNjA
Re: How To: Setup a Development Webserver

Quote:
Originally Posted by Alessio
Why do you say this?
http://www.apachefriends.org/en/xampp-linux.html#381
__________________
whooooo stole my lighter?
eNiNjA is offline   Reply With Quote
Old November 8th, 2004   #9
eNiNjA
Just Give Me the Beans!
 
eNiNjA's Avatar
 
Join Date: Oct 2004
Location: parts unknown
Beans: 64
Send a message via ICQ to eNiNjA Send a message via MSN to eNiNjA
Re: How To: Setup a Development Webserver

Quote:
Originally Posted by panickedthumb
Just out of curiosity, why did you compile all that when it's all in the repositories for apt-get?
PHP 5 wasnt compiling correctly, and I wasnt aware that its availible in apt-get.

This was a complete clean install, so I didnt have the universe and multiverse enabled.

Besides, sometimes its just plain fun to do thing on your own =)
eNiNjA is offline   Reply With Quote
Old November 9th, 2004   #10
filattiera
Spilled the Beans
 
Join Date: Nov 2004
Location: Filattiera - Italy
Beans: 11
Question Re: How To: Setup a Development Webserver

Quote:
Originally Posted by eNiNjA
PHP 5 wasnt compiling correctly, and I wasnt aware that its availible in apt-get.

This was a complete clean install, so I didnt have the universe and multiverse enabled.

Besides, sometimes its just plain fun to do thing on your own =)
Thanks for your Howto.
Please, if I want to install LAMP with apt-get, which are the packages to install?

I try:
apache2
libapache2-mod-php4
mysql-server

They are enough or I can install other in addition?
Thanks.

Ciao.
Luke.

filattiera is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:04 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry