0

I've been hosting websites on Ubuntu for a while. I use webmin/virtualmin to setup the environment without having to worry about command lines. Now I am trying to get better understanding about the whole process, and my question comes from the following command:

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

When I search for how to install PHP, most articles just give this command without further explanation. I understand what sudo apt-get install does, if it's up to me myself, I would only know to do sudo apt-get install php but not the other items(are they called module?). So where in the first place does ppl get to know that they need to install those other things? There should be an official manual or instruction telling ppl something like "in order for PHP to run, not only you need to install PHP, but also libapache2-mod-php/php-mcrypt/php-mysql etc.". Where is it? I'd like to read it for learning purpose.

Secondly, there are many different PHP versions atm, using this command, what version would be installed? And if I have to do "sudo apt-get install php5.6" do I need to put in the version number for the rest of the command? During my learning of Ubuntu, I've always felt that there are too many factors like this that leaves me clueless and greatly increase the complexity and frustration. Is there any basic principals that I can follow so I can conduct my own command-line without having to do a lot of googling every time?

shenkwen
  • 439
  • 1
  • 8
  • 18

1 Answers1

0

That depends on which script/php-framework do you want to run. For example, if you want to run a Laravel application you have to enable/install the following PHP-extensions:

  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

Additionally you can read here Laravel official documentation that you need PHP >= 5.6.4 to ensure that everything will work properly.

So it depends on what kind of framework do you use.

Peshmerge
  • 688