Results 1 to 5 of 5

Thread: Ubuntu on WSL2 for Drupal website development

  1. #1
    Join Date
    Jun 2020
    Beans
    1

    Ubuntu on WSL2 for Drupal website development

    Hello all, this is my first post here.

    I am interested in installing ubuntu on Windows WSL2 to use it for Drupal website development and website maintenance.

    Currently I am using WAMPserver on Windows, I'm very happy with it, but Drupal requires Drush and Composer for website maintenance and updates, all the literature is written for linux.

    So I am looking into using WSL2 with ubuntu - and I am looking for a tool similar to WAMPserver for ubuntu.

    What I particularly appreciate in WAMPserver is that everything comes pre-installed and pre-configured, and the program takes care of creating new vhosts, etc. as needed, no need to do anything in the Windows hosts file, etc. It just works directly out of the box. Also, changing PHP or MySQL versions takes just a mouseclick, for example I can click database->mysql5 and then PHP version->5.56, services-> restart and it's done. Or activating and deactivating Apache modules, setting PHP parameters, etc.
    I was using XAMPP for Windows before and ditched it for WAMPserver because XAMPP for Windows was too unflexible.

    So what tool would you recommend I use on ubuntu ?
    Last edited by manarak; June 7th, 2020 at 05:28 AM.

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,120
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Ubuntu on WSL2 for Drupal website development

    I suggest running VirtualBox in Windows (download) and installing an ordinary Ubuntu distribution rather than futz with WSL.

    Make sure to install the Extension Pack after creating the Ubuntu VM. Double-clicking the downloaded Pack will install it.

    I often use the "Seamless" display mode to have both OSs display their application windows on the common screen. I run Windows VMs on Linux, and configure my Windows desktop to have the panel at the top of the screen and hide itself automatically. To run a Windows app, I just move the mouse to the top of the screen so the panel appears. You can set up Ubuntu to do the same. Or you can use multiple monitors.

    One other advantage of using virtual machines is you can try out different flavors of Ubuntu (download) and different distributions of Linux. I've used the K Desktop Environment for years so I install Kubuntu. Other people prefer more "light-weight" flavors like Lubuntu (download), using the LX Desktop Environment, or Xubuntu (download) which uses yet-another desktop, XFCE.

    Ubuntu has a package called "lamp-server" that will install Apache, PHP, and MySQL together plus any interstitial connectors they require like the "php-mysql" package. After you've installed Ubuntu, open a Terminal window and type the command:
    Code:
    sudo apt install lamp-server^
    The tilde ("^") is required. Preceding the command with "sudo" means it runs with administrative privileges so you'll be prompted for your password. (You get admin privileges for 15 minutes by default, then you'll be asked your password again.) The command apt runs the basic program that manages software installation from the Ubuntu "repositories" where all the freely-available software resides.

    There's no graphical app I know of that will manage the tasks you describe. Webmin might be a possibility. I haven't used it in years because I prefer the command line, and I don't like the idea of installing a web application with admin privileges across my server. That security issue is less critical while you're experimenting with running Linux in a virtual machine. If you decide to try webmin, use the "Debian package" listed in the menu.

    Changing PHP versions won't be as easy as you describe either. The current Ubuntu release with long-term support, 20.04 or "Focal Fossa," includes PHP 7.4. I could probably code a method to have a second instance of Apache that runs 5.6 listening on a separate port. But clicking a button to change versions? Don't know of anything like that.

    Activating or deactivating Apache modules can be done from the command line with the a2enmod and a2dismod commands. You'll always need to restart Apache after any such change with the command
    Code:
    sudo systemctl restart apache2
    You don't need to use the "server version" of Ubuntu to run any of this. You can just install the needed packages onto any desktop distribution. Besides, the server version has no GUI.
    Last edited by SeijiSensei; June 7th, 2020 at 09:38 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Jun 2020
    Beans
    1

    Re: Ubuntu on WSL2 for Drupal website development

    Wow, I'm curious about web development and Ubuntu. https://keenbuliag2020.wixsite.com/davaohenyo

  4. #4
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Ubuntu on WSL2 for Drupal website development

    or you can just download Drupal virtual machine from bitnami stack, load it up in virtualbox, select user name and password and you are good to go (you can start developing): https://bitnami.com/stack/drupal
    Read the easy to understand, lots of pics Ubuntu manual.
    Do i need antivirus/firewall in linux?
    Disk backup (works on newer PC): Clonezilla
    User friendly full disk backup Redobackup is now back as Rescuezilla

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    20,554
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Ubuntu on WSL2 for Drupal website development

    WSL and WSL2 are slow compared to straight Ubuntu: https://www.phoronix.com/scan.php?pa...-tr3970x&num=8

    Beware. WSL2 is faster than WSL almost always, however.

    it is always best to develop on the platform for which production will be deployed.

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
  •