Local "lamp" server on external hard drive

mailou Posted messages 525 Status Member -  
Kaheil Posted messages 387 Status Member -
Hello,
I would like to know if it is possible to install a local "lamp" server on an external hard drive. If yes (I hope so), where can I find the necessary information?
I am using ubuntu-12.04 LTS and chromium.
Thank you in advance.

Configuration: Linux / Safari 535.19

--
Computing is like mushrooms; to find them, you must search.
If I’m here, it’s because I haven’t found.

15 answers

  1. smellems Posted messages 135 Status Member 46
     
    Hello Mailou,
    to install a LAMP server you need to install the following packages:

    apache2, mysql-server, php5, libapache2-mod-php5, php5-mysql

    apt-get install apache2 mysql-server php5 libapache2-mod-php5 php5-mysql

    you will need to choose a root password for MySQL.

    by default, the root of the server (http://localhost/) is /var/www/. you can create symbolic links in this directory to point to the desired directories. I believe it would also work to make a link to an external drive.

    I hope this will help..
    0
  2. mailou Posted messages 525 Status Member 13
     
    Hello smellems,
    I already have a local server => File system => /var/www/. However, the links on the site on the computer and those on the external hard drive do not work.
    For example, I have a local site that is a media library, where I present a movie in divx, synopsis, etc... but when you click on the movie title to watch it, which is on the hard drive, it doesn't work.
    That is the whole problem.
    --
    Computing is like mushrooms, to find it, you have to search.
    If I'm here, it's because I haven't found it.
    0
    1. smellems Posted messages 135 Status Member 46
       
      I don't know if I understand well. A site in /var/www and videos on an external disk (e.g., /media/videos). You want to create a link (URL) to the videos (e.g., http://localhost/videos). Is that it?
      0
    2. mailou Posted messages 525 Status Member 13
       
      Exactly that
      0
  3. mailou Posted messages 525 Status Member 13
     
    Hello,
    Here is my approach:

    --My local site is: biblio
    My external hard drive: Elements
    The folder where the movie is: FILMS
    The title of my movie: Soirée.avi
    Looking at the properties of "Elements" we see:
    Location: /media
    volume: Elements

    So the call is: 127.0.0.1/biblio/media/Elements/FILMS/Soirée.avi
    The response: Not Found: The requested URL /biblio/media/Elements/FILMS/Camping2.avi was not found on this server

    I am running Ubuntu-12.04LTS
    My browser: Chromium


    Computing is like mushrooms, to find it you have to search.
    If I'm here, it's because I haven't found it.
    0
  4. mailou Posted messages 525 Status Member 13
     
    Hello,
    Well, I have the impression that this doesn't inspire anyone
    --
    Computing is like mushrooms, you have to look for them to find them.
    If I'm here, it's because I haven't found any.
    0
    1. vordano Posted messages 1981 Status Member 316
       
      Did you put the symbolic link?
      0
  5. mailou Posted messages 525 Status Member 13
     
    The actual and direct link is: media/Elements/FILMS/Soirée.avi, in fact earlier I mentioned "biblio" but that's not correct, I think it should work and yet it doesn't
    --
    Computing is like mushrooms, to find you have to search.
    If I'm here, it means I didn't find it.
    0
    1. vordano Posted messages 1981 Status Member 316
       
      Right-click on FILMS -> create a link (symbolic, I believe, or something else) and then move this link to the localhost folder.
      "Normally," it should allow you to access it.
      0
  6. mailou Posted messages 525 Status Member 13
     
    OK, what comes down to creating a folder that will actually be on the hard drive of the computer (C), that's what I wanted to avoid so as not to overload the C drive
    --
    Computing is like mushrooms, you have to search to find.
    If I'm here, it's because I haven't found it.
    0
  7. smellems Posted messages 135 Status Member 46
     
    I still think the best way is to create a symbolic link in the /var/www directory.

    ln -s /media/Elements/FILMS /var/www/FILMS

    Then you can access it at

    http://localhost/FILMS

    It's true that you need to create a file (link) on the main partition, but it's just a link.
    0
    1. mailou Posted messages 525 Status Member 13
       
      I can't figure out how to create this link, is it in a file?
      0
    2. smellems Posted messages 135 Status Member 46
       


      ln -s /media/Elements/FILMS /var/www/FILMS
      0
  8. mailou Posted messages 525 Status Member 13
     
    I didn't understand that I had to use the terminal, I've done it, but now my C: drive just increased by 35 GB, which I wanted to avoid. Does that mean there are no other solutions?
    --
    Computing is like mushrooms, you have to search to find.
    If I'm here, it's because I haven't found.
    0
    1. smellems Posted messages 135 Status Member 46
       
      It's strange, the disk space shouldn't change that much. A few K for the file (link), but that's all. I would need to test a bit more to give an answer. What space do you have if you run:

      df -h
      0
  9. mailou Posted messages 525 Status Member 13
     
    Sys. file Size Used Available Use% Mounted on
    /dev/sda1 592G 59G 504G 11% /
    udev 1.9G 4.0K 1.9G 1% /dev
    tmpfs 764M 1.2M 763M 1% /run
    none 5.0M 0 5.0M 0% /run/lock
    none 1.9G 284K 1.9G 1% /run/shm
    /dev/sdc1 932G 84G 848G 9% /media/Elements
    --
    Computing is like mushrooms; to find it, you have to search.
    If I am here, it's because I haven't found it.
    0
    1. smellems Posted messages 135 Status Member 46
       
      Your "C" drive is sda1 with 59GB used. It does not contain the 84GB that are in elements.

      You can delete the link and recreate it and see that the result of df -h does not change.
      0
  10. mailou Posted messages 525 Status Member 13
     
    The FILMS folder in /var/www is always 35GB, the df -h result doesn't change
    --
    Computers are like mushrooms, you have to look for them to find them.
    If I'm here, it's because I haven't found it.
    0
  11. mailou Posted messages 525 Status Member 13
     
    Hello,
    I'm fumbling... I'm fumbling, after several unsuccessful attempts, the "ln -s /media/Elements/FILMS /var/www/FILMS" with the folder in the /var/www directory, the link doesn't work, I also tried "ln -s /media/Elements/FILMS /var/www/biblio/FILMS" still nothing and
    "Forbidden
    You don't have permission to access /biblio/FILMS/Camping2.avi on this server."


    --
    Computing is like mushrooms, to find you have to search.
    If I'm here, it's because I haven't found.
    0
  12. Kaheil Posted messages 387 Status Member 65
     
    Hello,

    To make it simple, you can install a server on an external hard drive, but there are a few conditions:

    You need a computer that can serve as a server, the external hard drive will only be used for storage.
    The external hard drive must be readable by Linux.

    From there, you have several ways to proceed; if you know how to do it, great. Otherwise, feel free to ask a question.

    --
    https://www.youtube.com/watch?v=egsgB5RC3G0
    0
  13. mailou Posted messages 525 Status Member 13
     
    Hello,
    Currently, my external hard drive only serves as storage, after
    You need a computer that can serve as a server, the external hard drive will only be used for storage. The external hard drive must be readable by Linux.

    In this case, I don't know how to do it and help would be appreciated,
    Thank you in advance.

    --
    Computing is like mushrooms; to find them, you have to search.
    If I'm here, it's because I haven't found.
    0
    1. Kaheil Posted messages 387 Status Member 65
       
      Sure, let's start from your computer. Plug in the external hard drive and open gparted. If it is recognized by gparted, that's good.

      Then, choose the method that suits you best from this list
      https://wiki.ubuntu.com/LiveUsbPendrivePersistent and follow the instructions.

      I've never tried Portable Linux, but it seems quite good in terms of functionality; however, this method has a serious issue: the OS may not be suited to your hardware.

      In my opinion, the best method is method 1. It's the one I use, and it works perfectly.

      Note: you can also use a VM to do this. However, it will be much less clean and prone to errors.
      0
  14. mailou Posted messages 525 Status Member 13
     
    Hello,
    I don't know gparted, but I already have Oracle VM installed, I need it to update my TomTom, it doesn't give me any particular problems except when I update either VM or Ubuntu. If you can inform me about gparted, I just downloaded the version "gparted-live-0.12.1-1.iso"
    Thank you

    --
    Computing is like mushrooms, to find you have to search.
    If I'm here, it's because I haven't found it.
    0
  15. mailou Posted messages 525 Status Member 13
     
    Hello,
    I installed Gparted via the Ubuntu software center and my external hard drive is recognized, I tried randomly but I can't see anything, however, the link you gave me is in English and I don't understand anything, if you still want to help me, I would be happy
    Thank you
    --
    Computing is like mushrooms, you have to search to find.
    If I'm here, it's because I haven't found it.
    0
    1. Kaheil Posted messages 387 Status Member 65
       
      Mhh, if you don't speak English, it does complicate things a bit. Try looking on Ubuntu-fr to see if there's a similar article. You can also use Google Translate on the page to translate it (though it works only moderately well).
      0