News for hackers. Stuff that matters.

Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10?

I recently changed my pc from windows to Ubuntu 19.10 I Love linux so much faster and simple than windows

but I want to learn php on this machine what's the best way to get MySQL php lamp or apache and all that good stuff for PHP development on this ubuntu machine?

everything seems outdated or there is always new stuff and new code hard to differinate what to use and keep up with.

( 13 comments | 3 points | on HN )
Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by roosgit on Tuesday January 07, 2020 @06:00AM (#21978841)
Try tasksel. It has a simple wizard-like setup. I used it to install Apache, PHP and MySQL on a server by following a video tutorial. You can preview the whole process in this video https://www.youtube.com/watch?v=QxuAwCKIoKg.

Unfortunately, it doesn't also install phpMyAdmin like MAMP does. But from a quick search, it seems that phpMyAdmin can be installed by running a single command in terminal.

Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by monoideism on Monday January 06, 2020 @11:24PM (#21976816)
Haven't worked with PHP in years, but I found a good LAMP install tutorial from Digital Ocean:

https://www.digitalocean.com/community/tutorials/how-to-inst...

Probably, you'll use the same process on 19.04 as on 18.04.

Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by futurechange on Tuesday January 07, 2020 @04:45AM (#21978446)
seems like getting PHP dev on Ubuntu is more complicated than a simple MAMP on OS X or Wamp on Windows.
Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by monoideism on Tuesday January 07, 2020 @01:06PM (#21982647)
Yeah, it is, but it's also much closer to how PHP is deployed on a production server if you're not using a shared host, so it's good for someone to learn these kinds of command line skills if they have any plans of working in the software industry.
Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by lovelearning on Tuesday January 07, 2020 @12:23PM (#21982088)
I generally use Bitnami's stacks. There's one for LAMP too.

Benefits: Fairly latest versions. Everything in one directory (I usually install them under /opt). No effect on system packages. No need to add PPAs for new versions.

Drawbacks: Can't update an existing installation; have to install a new version of the stack in another location and migrate.

[1]: https://bitnami.com/stack/lamp/installer

[2]: https://bitnami.com/stack/lamp/README.txt

Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by futurechange on Tuesday January 07, 2020 @03:49PM (#21984651)
this looks interesting and it works for Ubuntu? I can have PHP/MYSQL and phpmyadmin ?

I like this, so basically it's the MAMP or WAMP version for like Linux ubuntu?

Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by lovelearning on Tuesday January 07, 2020 @08:39PM (#21987380)
It works on Ubuntu. I use it on Ubuntu.

It's LAMP. There are different ways to deploy LAMP on Ubuntu but they are all LAMP stacks at the end of the day. 1)From system packages is most common. 2) From PPAs if you want latest versions. 3) As virtual machine. 4)As containers. 5) As software bundles like the Bitnami stack 6) Building all components from their sources.

Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by futurechange on Tuesday January 07, 2020 @09:04PM (#21987529)
wow main you're a life saver this worked perfectly on ubuntu. most of the online saved was outdated this helped a lot thanks
Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by LarryMade2 on Tuesday January 07, 2020 @10:36AM (#21980906)
Ubuntu runs a little behind in the PHP versions...I think it is mainly for compatibility sake (which is good if you are looking long-term without much breakage)

I switched to Linux Mint recently (which is a offshoot of Ubuntu) to have more recent PHP/MySQL versions. There are many guides out there for getting LAMP up and running with Mate as well as Ubuntu. Just include the version with it (i.e. search install php mysql ubuntu 19.10 )

Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by saluki on Monday January 06, 2020 @10:06PM (#21976412)
Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by monoideism on Monday January 06, 2020 @11:22PM (#21976812)
Note: that first program installs Nginx, not Apache if OP wants true LAMP.
Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by p0d on Tuesday January 07, 2020 @01:03PM (#21982621)
Just to segway a little I am a fan of lxc. I would be happier fiddling with PHP in a container than the main os.

I run lxc containers and PHP on another box and run sublime seemlessly on the remote box to edit code.

Re:Ask HN: How to get PHP lamp or mamp on Ubuntu 19.10? by tyzerdak on Wednesday January 08, 2020 @03:22AM (#21989462)
Check digital ocean / linode tutorials