Page 1 of 7 123 ... LastLast
Results 1 to 10 of 61

Thread: How To: Setup a Development Webserver

  1. #1
    Join Date
    Oct 2004
    Location
    parts unknown
    Beans
    69

    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

  2. #2
    Join Date
    Oct 2004
    Location
    /home
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    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?

  3. #3
    Join Date
    Nov 2004
    Beans
    34

    Re: How To: Setup a Development Webserver

    Also you can use xampp for linux

  4. #4
    Join Date
    Oct 2004
    Location
    parts unknown
    Beans
    69

    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 =)

  5. #5
    Join Date
    Oct 2004
    Location
    parts unknown
    Beans
    69

    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.

  6. #6
    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.

  7. #7
    Join Date
    Oct 2004
    Location
    parts unknown
    Beans
    69

    Re: How To: Setup a Development Webserver

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

    *looks at the ubuntu-geek

    hehe...

  8. #8
    Join Date
    Oct 2004
    Location
    USA
    Beans
    3,774

    Re: How To: Setup a Development Webserver

    Quote Originally Posted by eNiNjA
    Where i come from JSP is a dirty, dirty word.

    *looks at the ubuntu-geek

    hehe...
    My Blog | Forum Search | Forum Guidelines
    Please don't PM support questions--post a thread so everyone can benefit!

  9. #9
    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.


  10. #10
    Join Date
    Nov 2004
    Beans
    49

    Re: How To: Setup a Development Webserver

    Quote Originally Posted by eNiNjA
    Where i come from JSP is a dirty, dirty word.

    hehe...
    Weird dictionary you have

    I've some PHP experience and a LOT of JSP experience (first did JSPs for a customer in 2000 and now work on a project that has over 500 of them).
    JSP are far easier to maintain (if written properly, as with any language spaghetti code is possible) which makes them infinitely more suitable to large projects.

Page 1 of 7 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •