How to set up a development environment manually

Asked

Viewed 3,023 times

7

I’m trying to set up my own development environment on a machine with Windows 10.

The idea would be to install Apache + PHP + MySQL. The problem is that the software documentation is quite complicated for beginners like me and tutorials didn’t help me much.

The biggest difficulty I found was in installing the MySQL.

I know that there are several options of ready environments, such as the XAMPP, and the installer of MySQL, but my intention is to do it manually (command line and configuration files) to understand how everything works.

If someone can explain or indicate a place to read about, it would help me a lot.

  • Since you are on Windows, why not enable iis and install php manager? Then install Mysql.

  • 1

    Learn how things work without using crutches: great initiative! But you’re using Windows, so you don’t need to compile the business. Download the app installers and install one by one.

  • The installation order is the same: Apache, afterward PHP (which should give you the option to configure the Apache already installed) afterward Mysql. If I’m not mistaken, after installing everything you’ll have to arrange some configuration on PHP for it to work with _Mysql, but it’s just.

  • @Shutupmagda doing all this on Linux is easier, isn’t it? I’m thinking of migrating.

  • 1

    It’s not exactly "easier," it depends. If you know Linux Debian, for example, you can install all this in a single command on the terminal. But you need to know at least the basics of system administration Linux, otherwise, continue on Windows itself. The decision to migrate from OS (in my opinion) should have more to do with performance. It is undeniable that Linux no graphical interface is better in performance (mainly in memory usage), but if vc dominates well Windows and has no problem with features, continue in it ;)

  • The initiative is very good, but if your version of Windows is not a pro you will have to install a wampserver, xamp among other php servers, but as you mentioned that you want to learn I recommend installing Ubuntu in the lts version and installing the distros manually by command line, I advise to search independent tutorials for each application, it is not necessary to format the machine just install a vm.

  • It reminded me of my contact with php. In 2002 I read the Windows documentation and through them I learned ASP. Soon after I heard about php. I tried to install mysql, php and apache in a 486 with windows 98. Caught everything. I was angry. I went to the center of the city to cool my head and, when passing the door of a magazine and saw a magazine called Conectiva with a big penguin, 4 cd and written Linux. I didn’t even know about it. I bought it and I’m still with GNU/Linux, but specifically Slackware. I never touched Windows again. Good memories!

  • I recommend Vagrant: https://www.vagrantup.com/ In addition to keeping PHP and Mysql versions up to date easily, you’ll have the web environment experience you need

Show 4 more comments

1 answer

2

First download the php

In http://windows.php.net/download download the latest version of php, download the first file that is a zip and extract in a folder, in this example I will extract in a folder named php, which I created in c:

Look for a file named php.ini-Development and rename it to php.ini

Now add php to the environment variables

Right click on my computer and choose properties, on the screen that opens enter advanced system settings, will open another screen, on it in the Advanced tab click on environment variables, on the screen that opens, on system variables, select Patch and click edit, on this other screen click new and put the C:php or the way you extracted the zip from php, you can also use the search button

For anyone using another version of windows, other than 10. I searched for "add environment variable in windows 8 /7/Xp"

Ready, your php is already installed in windows!

Now all that’s left is the server

In the case of a development environment, you don’t need to install apache, the current PHP version already has a built-in server. Create a www folder in c: or anywhere else, then navigate to that folder by cmd and run the command php -S localhost:8080

Ready your served is already running! Just put your files in this folder and access the address localhost:8080

If you are not going to use database, this is enough to start developing

Accessing the mysql

In the case of mysql, I will not put any link step by step for installation, I believe that most you find in google serve, what many mess is not in the installation, but in accessing mysql after installation.

It is one thing to install the server, another is to install a client to access the mysql server, which would be the access interface.

After installing mysql I recommend using Heidi SQL, which is very simple, light and free http://www.heidisql.com/

With Heidi open, just put localhost in the hostname field and your user and password you chose in mysql installation in the fields below.

Ready, your essential development environment is ready.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.