Jump to content

Install LAMP to wsl2 in windows 10 and configure VS Code for wsl2.


Michael

 

instructions in the video:

  1.  sudo add-apt-repository ppa:ondrej/php
  2. sudo add-apt-repository ppa:ondrej/apache2
  3. sudo apt update && sudo apt upgrade
  4. sudo apt install apache2 mysql-server curl php7.4 php7.4-xml php7.4-zip php7.4-mbstring php7.4-curl php7.4-mysql php7.4-gd php7.4-imagick
  5. nano .bashrc (go to end of file and add the follow, each on new lines):
    1. sudo service apache2 start
    2. sudo service mysql start
    3. sudo service cron start
  6. cd ~
  7. sudo a2enmod userdir
  8. sudo nano /etc/apache2/mods-available/userdir.conf (in the allowoverrid remove what is there and add ALL)
  9. sudo nano /etc/apache2/mods-available/php7.4.conf (comment out the php_admin_flag engine off by placing a # before it).
  10. sudo service apache restart
  11. cd ~/public_html
  12. code . (to install the vscode app inside wsl2 and open it to your public_html directory).

securing mysql:

  1. sudo mysql -u root -p
  2. CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypassword';
  3. GRANT ALL ON *.* TO 'myuser'@'localhost';
  4. flush privileges;
  5. quit

mysql should now be secured with a user and password. 


User Feedback

Recommended Comments

There are no comments to display.



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...