I
I
Ivan Petrov2018-08-09 13:34:45
ubuntu
Ivan Petrov, 2018-08-09 13:34:45

How to get started with php in ubuntu?

Good day.
Tell me how to start working with php in ubuntu? Just started switching to linux.
How is a development environment usually set up?
Where are projects usually kept (locally), what software do they use, local server?
I installed xammp, but the fact that the files are in the opt directory is not very convenient because I have to use sudo all the time, so for now I keep my projects in the home folder and in opt/lamp/htdocs I put links.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Adamos, 2018-08-09
@Adamos

Start - of course, by throwing out xampp and mastering Vagrant or Docker.
Say, if PHP is supposed to be Laravel, then it's easy to see that its documentation starts with Homestead.

S
Sergey Ryabenko, 2018-08-09
@ryabenko_pro

I recommend not to bother with containers and assemblies, installing and setting up an environment in Ubuntu is not a problem, look for nginx + PHP fpm + MySQL - this bundle is configured in 15 minutes and is enough to get started.
After the basic principles are clear, you can get confused with containers, but already understanding where the flies are where the cutlets are.
It is more convenient to store the file in the home folder, create a directory for projects and tell nginx where to look.
IDE - PhpStorm is the best option. There is a free version, but the paid one is worth it.

D
Denis Davydenko, 2018-08-09
@GooseTheDestroyer

For work, I raise a virtual machine with a server version of Debian. I'm setting up a bridge. I store all projects (except backups) on it.
I work for NetBeans. I connect via SSH+SFTP. Files are synced automatically.
I store the local version in the Documents folder.
Thus, the working panel is not littered with a bunch of tabs and, when the virtual machine is launched in the background, it is loaded only by NetBins, the console and the browser.
I recommend to abandon xammp and learn how to install the necessary software yourself (php + mysql + apache2 / nginx). In general, there is no difference, but oh, how it will come in handy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question