Find the answer to your Linux question:
Results 1 to 10 of 10
Hey, Hope LAMP stands for Linux Apache MySQL PHP. So long I was working with Apache,MySQL and php in winodws. Now slowly I want to shift to Linux. Now I ...
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Posts
    80

    Question LAMP- need help!

    Hey,

    Hope LAMP stands for Linux Apache MySQL PHP. So long I was working with Apache,MySQL and php in winodws. Now slowly I want to shift to Linux.
    Now I have Linux running on hardrive and not VM.


    Can anyone tell me how to download and configure Apache,MySQLand php in linux?

    Thanks!
    Rachel

  2. #2
    Just Joined!
    Join Date
    Aug 2009
    Posts
    76
    Hiya Rachel,

    Setting up LAMP is easy, fortunately. Just open up synaptic, go to 'File' -> Mark packages by Task. There should be a checkbox that says 'LAMP Server'. If you are managing mysql databases, a good package to install on top of that is phpmyadmin.

  3. #3
    Just Joined!
    Join Date
    Aug 2009
    Posts
    80
    Hello,

    I'm not aware of the LAMP server thing, coz this is first time I'm working with Ubuntu(Jaunty), so after posting it here, I tried google and followed the steps below but didn't work that good.

    Apache2 installation
    sudo apt-get install apache2

    Then typed http//localhost on my browser, but I wasn't able to see the apache page, though the broswer informed DONE below.

    But I did see *Starting webserver Apache2 on my terminal.
    Then went for PHP5 install:
    sudo apt-get install php5 libapache2-mod-php2
    to restart apache2:
    sudo /etc/init.d/apache2 restart.

    I wanted to configure apache to my company's configuration. Coz I have a localdb in my comapny to connect apache,mySQL and php ( the code ) to work with apache and mySQL.


    How do I do that?

    Any help!

    Rachel

  4. #4
    Just Joined!
    Join Date
    Aug 2009
    Posts
    76
    You are including the colon (:) symbol in your URL right? So its
    http://localhost/
    not
    http//localhost



    And since this is your first time with ubuntu then more specific instructions are needed then. So forget the other howto for now. The easiest way to install all of your LAMP software is to go to the top-left menu, 'System' -> 'Administration' -> 'Synaptic Package Manager'

    You will be asked for your password so input it, then Synaptic Opens. Open the 'File' Menu -> 'Mark packages by task' -> Check 'LAMP server', then click OK. The menu will close. Click on the button that say 'Apply' and ubuntu will begin installing all the packages you need for Apache, PHP and MySQL.

    From there http://localhost/ should give you a blank webpage, and putting an index.html or index.php file in /var/www should make it visible from localhost

  5. #5
    Just Joined!
    Join Date
    Aug 2009
    Posts
    80
    Hey,

    Alright I did as mentioned, System-> Adminstration -> synaptic package manager.
    Edit-> mark packages for installation->checked against LAMP server box.
    Mark->Apply. Downloaded 11 packages.

    Set up my SQL root password, with my company password. But when I typed Open Source and Linux Forums

    It gave me same problem as earlier. Also I want to configure server settings for apache2, how do I do that?

  6. #6
    Just Joined!
    Join Date
    Aug 2009
    Posts
    80
    Alright, there was some update problem on my browser, now when I typed localhost, it shows IT WORKS! Guess I'm on right track.

    But how do I configure apache2, coz I gotta to edit server configuration.

    Thanks!

  7. #7
    Just Joined!
    Join Date
    Aug 2009
    Posts
    76
    The configurations are stored in the text files apache2.conf and httpd.conf located in /etc/apache2/. You can edit them by opening a terminal and typing

    cd /etc/apache2
    sudo nano apache2.conf

    Theres also the graphical method which can be done by hitting alt-f2 and typing the following command
    gksu nautilus /etc/apache2


    You can also change the default location where your website files (html and images and stuff) go by editing the file /etc/apache2/sites-available/default

  8. #8
    Just Joined!
    Join Date
    Aug 2009
    Posts
    80
    For graphical method, it shows as below on the terminal:

    Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
    Please ask your system administrator to enable user sharing.
    ** (nautilus:4833): WARNING **: Unable to add monitor: Operation not supported



    Also I'm bit surprised to note http.conf file as empty one.

  9. #9
    Just Joined!
    Join Date
    Aug 2009
    Posts
    76
    I ran the terminal command 'locate httpd'

    And found this file:
    /usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-default.conf

    That one contains your default settings. Anything settings you set in /etc/apache2/httpd.conf will override the defaults. But since there are no settings being used except for the default settings, this file is blank.

  10. #10
    Just Joined!
    Join Date
    Aug 2009
    Posts
    80

    Lightbulb

    Alright I wanted the localhost to open my company site. Let's say for example it's www.rachsite.com and serveradmin admin@rachsite.com.

    So I did few modification in cd /etc/apache2/sites-available
    sudo nano default

    <VirtualHost *:80>
    ServerAdmin admin@rachsite.com

    DocumentRoot /rachsite.com/www
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /rachsite.com/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    </VirtualHost>

    I've highlighted the place where I made the changes. So when I type localhost on webserver, it has to display the site www.rachsite.com rather than IT WORKS thing.

    What Am I missing here?

Posting Permissions

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