Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Installing a web server

  1. #1
    Join Date
    Jul 2008
    Beans
    13

    Unhappy Installing a web server

    Hi
    I have downloaded Apache2.2.9 tar file.The instalation guide asks me to copy the tar file in /usr/local/directory.but i am not able to do it because it says I don't have any rights since i am not in root.Also I tried to do in my own directory.This is what i did:
    I unzipped the tar file of Apache(its name being httpd-2.2.9.tar.bz2) in my own directory.Then using terminal i connected directory by 'cd' then did ./configure.
    After that it does lots of checking and then i did 'make' and after lots of procedure i did 'make install'.These were the instructions given in the LINUX FOR YOU magazine in one of the articles regarding setting up web servers.But then how do i know my server has started,
    Then anyone could anyone guide me with PHP5.2.6 installation in short word. I also want to install MySQL.I wanted one more advice which databse platform is better MySQL or SQlLite.I dont know the difference.Thank you for the efforts for reading these.Please help i hav tried almost all the sources and i am a newbie in linux and have installed UBUNTU_8.04

  2. #2
    Join Date
    Jun 2007
    Beans
    1,745

    Re: Installing a web server

    why not just install apache etc from the repo's? go to Application>accessories>terminal
    and enter:
    Code:
    sudo apt-get install apache2 mysql-server php5-mysql
    you can then copy anything you want to be accessable to the /var/www directory, it will ask for the mysql root password as well, install mysql-admin if you want to manage mysql easier.

  3. #3
    Join Date
    Jul 2008
    Beans
    13

    Unhappy Re: Installing a web server

    I did all this things that u have mentioned(but not the MySQLadmin).After that how to make a PHP file in www directory.It is not showing me any option to create since it is in root directory.How to get the rights of root?

  4. #4
    Join Date
    Jun 2007
    Beans
    1,745

    Re: Installing a web server

    I'm guessing this is a localhost where nothing needing high security is going right(because if not these tips are way too insecure, you should use sudo instead: https://help.ubuntu.com/community/RootSudo ):
    Chown the www folder
    Code:
    sudo chown -R USERNAME /var/www
    of you can make /var/www a public folder:
    Code:
    sudo chmod 777 /var/www


    make a note of there 3 commands somewhere as well, they start/stop/restart apache:
    Code:
    sudo /etc/init.d/apache2 start
    sudo /etc/init.d/apache2 stop
    sudo /etc/init.d/apache2 restart
    , rather essential basics I think.
    Last edited by scragar; July 5th, 2008 at 06:39 PM.

  5. #5
    Join Date
    Dec 2007
    Location
    GH
    Beans
    120
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Installing a web server

    Quote Originally Posted by scragar View Post
    why not just install apache etc from the repo's? go to Application>accessories>terminal
    and enter:
    Code:
    sudo apt-get install apache2 mysql-server php5-mysql
    you can then copy anything you want to be accessable to the /var/www directory, it will ask for the mysql root password as well, install mysql-admin if you want to manage mysql easier.
    I agree to that! Don't do it with a tar file unless there's a specific reason for doing so! The repositories are there to make your life easier! However, if you're running the Desktop version, I'd say go through Synaptic Package Manager (system > administration) to avoid the terminal if you're not that familliar with it.. Search for apache2, and download it.. If running the server version of ubuntu with no gui, run:

    Code:
    sudo apt-get install apache2 mysql-server php5-mysql
    It will ask for your password to "perform administrative tasks"..

    When installed, type in a terminal:

    Code:
    sudo nano /etc/apache2/apache.conf
    and edit the configuration file. ctrl-X to exit and y to save, followed by enter to accept the default filename. It is pretty easy to figure out.

    Then go to /var/www/

    This is your http://127.0.0.1/

    (where 127.0.0.1 is to be replaced with your public broadcast IP for global internet access)

    If you want to add a folder such as http://127.0.0.1/folder/
    just add /var/www/folder/

    There is a default index.html file in /var/www/ if you install apache2 from the repositories. Just edit this, this is your start page!
    Last edited by jesushero; July 5th, 2008 at 06:56 PM.

  6. #6
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Installing a web server

    Do not change the user in /var/www it should only be root or www-data. To copy files to /var/www use either:

    Code:
    gksu nautilus
    or in a terminal:

    Code:
    sudo cp <file> /var/www
    Jim

  7. #7
    Join Date
    Jul 2008
    Beans
    13

    Re: Installing a web server

    Thanks for the advice.
    But still i am not able to start apache.Because when i restart my apache with command i get the following error.

    * Restarting web server apache2 Syntax error on line 1 of /etc/apache2/conf.d/fqdn.save.1:
    Invalid command 'exit', perhaps misspelled or defined by a module not included in the server configuration

    [fail]



    I feel this is because before posting my query in this forum i had edited thi file but i wasnt able to exit.So i typed exit in it but no help then i closed the terminal window to exit.Probably this could have been saved automatically.So what can i do now?

  8. #8
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Installing a web server

    Open up the file with a command line editor like nano and edit the file. Nano is the default editor installed eg:

    Code:
    sudo nano /etc/apache2/conf.d/fqdn.save.1
    or just delete the file and start all over again.

    Jim

  9. #9
    Join Date
    Jul 2008
    Beans
    13

    Re: Installing a web server

    Ya it has worked.I am extremely Thank you to all of you!!

    Thanks to cariboo907,jesushero,scragar

  10. #10
    Join Date
    Jul 2008
    Beans
    13

    Re: Installing a web server

    Hey can anyone tell how to make MySql start.Also i downloaded phpMyadmin from synaptic.But it is not giving me option for create database a cross appears near it and says NO PRIVILEGES.What mistake i may i have done??
    Plz tell me.

Page 1 of 2 12 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
  •