Beyond the myths, beliefs or the opinion that GNU / Linux is complicated to use, I consider it to be an excellent Operating System for those who are developers, especially web developers.
I have had the opportunity to converse with many people who prefer OS X and even Windows to develop, as they say, because of its ease and its tools, and although it is a very individual opinion of each person, I believe that any GNU / Linux distribution or at least the most popular ones, offer everything you need to install and work.
[quote] The most popular distributions offer all the necessary packages in their repositories for a web developer. [/ quote]
Now, on the development issue there is a dilemma, is a very updated distribution like Antergos or one that maintains a balance between stable and up-to-date as Ubuntu?
I put a very simple example, while in Ubuntu Trusted the latest version of Netbeans is 7.0.1, in ArchLinux version 8.0.2 is available. The same thing happens with NodeJS and other packages that we will see below that are widely used by front end.
Anyway, it is everyone's decision to choose the distribution of their preference according to the work to be carried out. For this article, we will start from an Ubuntu installation, and since it is focused on new users, we will show the process step by step.
Install Ubuntu 14.04
The first thing we will do is download the Ubuntu installation image from its official website. The link below will allow you to choose whether to download a 32-bit or 64-bit iso.
Once we download it, we must "burn" a DVD with the downloaded iso or prepare a Flash memory to boot and install from it. In Windows we can do it by following this guide and on Mac This other. Once this is done, we restart the PC and start through the memory or the DVD.
Ubuntu 14.04 installation steps
The first thing is to select the language with which we want to install Ubuntu:
Later we will see if we have all the necessary requirements for the installation:
Later we go to partitioning the hard drive. If you are not experienced with this, it is preferable that you leave everything as default once you have backed up your data.
We choose the time zone:
We choose the language of our keyboard:
We define our username, the name of our computer, our password:
And we wait for it to finish:
Once the installer finishes, we restart the computer and enter our session. We can run the Update Manager or open a terminal and put:
$ sudo apt update && sudo apt upgrade
And if there is nothing to update, we can start.
Preparing our workspace for testing
So, as we are developers, we only want to focus on what we know how to do: develop. We are not interested in knowing how to configure a web server, or how a database works, we just want something that works and is easy to implement to start writing code.
If we only had to write in HTML, CSS, JS, everything would be simpler, but sometimes we must have a test server for code in PHP, Ruby, DJango, etc. Therefore, it is best to set up our own web server. Luckily for us we have this facility in two different ways:
- Using the installer XAMPP what provides us Apache.
- Using LAMP Bitnami.
Installing Bitnami
The LAMP installation via Bitnami we already saw it in a previous article, therefore it will not be necessary to address it in this article. Once Bitnami is installed, we can manage our test server through the web browser.
All the necessary documentation on how Bitnami works can be found at his wiki.
XAMPP installation
The XAMPP installer also comes from Bitnami, but the installation process is somewhat different, so we will see it step by step. The first thing of course is to download the file that interests us according to the architecture of our processor:
Once downloaded, we open a terminal and access the folder where the file is, to which we will give execution permissions. In the case of the 64 Bit file it would be:
$ sudo chmod a+x xampp-linux-x64-5.5.19-0-installer.run
Now in the same terminal we execute it:
$ sudo ./xampp-linux-x64-5.5.19-0-installer.run
And we follow the following steps.
In the previous image it asked us if we wanted to install the files for developers and in the later one, if we agree with the selection we chose.
Now it asks us the path where we want to install (by default it is in / opt / lampp), and although we can change it, I recommend leaving it as is.
One more step of verification before starting to install
Installing XAMPP
Installation completed.
Now, to start XAMPP we just have to execute:
$ sudo / opt / lampp / lampp start Starting XAMPP for Linux 5.5.19-0 ... XAMPP: Starting Apache ... ok. XAMPP: Starting MySQL ... ok. XAMPP: Starting ProFTPD ... ok.
And this way we already have our Apache + MySQL + PHP + Perl server running. If you have a problem, I recommend that you visit the FAQ.
Custom DNS and Virtual Host with XAMPP
Assuming that we have several sites hosted on our test server, we can set each of them to be viewed locally in the file / Etc / hosts. Let's take an example, let's say we have the site dev.tests.com, what we do is open the file / Etc / hosts with our favorite text editor (and as root) and add it in the following way:
$ sudo vim /etc/hosts
and we add the line:
127.0.0.1 dev.prueba.com
But of course this is not enough, because we have to tell Apache that when someone makes a request to dev.test.com For 127.0.0.1, you have to return our test site.
We edit the file /opt/lampp/etc/httpd.conf
$ sudo vim /opt/lampp/etc/httpd.conf
and uncomment (removing the pound sign) the line that says:
# Include etc/extra/httpd-vhosts.conf
and we leave it like this:
Include etc/extra/httpd-vhosts.conf
Now we go to the file /opt/lampp/etc/extra/httpd-vhosts.conf which should have something like this:
# use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any block. # ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/opt/lampp/docs/dummy-host.example.com" ServerName dummy-host.example.com ServerAlias www.dummy-host.example.com ErrorLog "logs / dummy -host.example.com-error_log "CustomLog" logs / dummy-host.example.com-access_log "common ServerAdmin webmaster@dummy-host2.4.example.com DocumentRoot "/opt/lampp/docs/dummy-host80.example.com" ServerName dummy-host80.example.com ErrorLog "logs / dummy-host2.example.com-error_log" CustomLog "logs / dummy-host2.example.com-access_log" common
We modify it and leave it this way:
# use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any block. # DocumentRoot "/ home / path / folder / project /" ServerName my_blog.dev Require all granted
Obviously, the path to our project folder must be specified when replacing "/ Home / path / folder / project /".
Manual LAMP Installation
Now, although it may not seem like it, I think it is more cumbersome to do the installation in the previous way than installing the packages directly from our repositories. To have the same Stack on our PC we just have to open a terminal and put:
$ sudo apt install apache2 mysql-server-5.5 phpmyadmin
With these 3 packages only, the necessary dependencies will be installed to start working with the minimum required when developing.
Custom DNS and Virtual Host with LAMP
On the part of the DNS (Domain Name Server) we keep everything the same, that is, we add the names of our test sites in the file / Etc / hosts. Now, in the case of Apache, the path of the VHost (Virtual Hosts) is different.
Normally what is done is to place what we put in the file /opt/lampp/etc/extra/httpd-vhosts.conf in the route /etc/apache2/sites-available/vhostname.conf, and then a symbolic link is made to that file in the folder / etc / apache2 / sites-enabled / but we are not going to complicate. We will directly put the file in / etc / apache2 / sites-enabled / with the following configuration:
$ sudo vim /etc/apache2/sites-enabled/dev.pruebe.com.conf DocumentRoot "/ home / path / folder / project /" ServerName my_blog.dev Require all granted
I think it is valid to clarify that when we install manually, the default path of the website folders is / var / www / http /.
NodeJS and Ruby installation
If we use NodeJS o Ruby (instead of PHP and Perl) we can manually install the packages by running in the console:
$ sudo apt install nodejs ruby
And if they need any more packages, they just have to search for it by running the package manager or in the console:
$ sudo apt search paquete a buscar
Until this part we already have the server-side part ready for our sandbox, now let's see some of the applications that we can use.
Web development tools
In the repositories we have some applications that will allow us to work comfortably when it comes to HTML, CSS, JS and others. Among them we have:
- Bluefish
- geany
- Gedit
- Kate
Being bluefish (in my opinion) the most complete when it comes to work front end, but I recommend installing third-party applications that offer us much more functionality. We have for example brackets, SublimeText o Komodo-Edit. All these applications have their own installation package for Ubuntu, except for Komodo-Edit, which you only have to unzip and run a .sh file.
(… in process …)
Does anyone else see a ghost bat in the goat image from this version of ubuntu?
Hahaha it's true .. looking only at the orange beard and the hollows of the muzzle 😀
Now that you mention it… that's called "Pareidolia."
About which Distros to choose when programming is quite complicated. "Formerly" it was developed for a couple of browsers and voila, because the development was much slower. Today, there are an infinity of browsers and platforms on which to develop WEB applications, call it ASP.Net, PHP, JAVA, etc. where the applications are much more transversal, I mean by this, that they are not only accessed from typical desktop or laptop computers, but they are already done (and the same functionality is wanted) from a tablet, mobile, etc.
I believe that today it is necessary to stay at the forefront, safeguarding first of all the stability and security of the applications, in that sense I am paranoid, it still costs me a lot to carry out, for example, a banking transaction from the other device that is not mine , many times I hope to get to the safety of my home to do so, even if it sounds illogical.
The other. Let's be honest: it is well known that most programmers (at least the ones I know), whether they are web, JAVA, BB.DD, etc., at least 80% use a Unix platform to program. People who without all the tools that are offered on the platform, openly and free, would be very complicated when moving forward. Also, I can say for sure that almost the entire WEB platform, or BB.DD. it is mounted on a Unix server, therefore wouldn't it be logical for the other part to work the same way?
Thanks for sharing and greetings.
Shut up… i'm Batman!
Looks like an owl to me lol
That's right .. here we think the same after looking again
I am a web developer mainly PHP, I have been using Debian as my work environment for several years, as they comment in the post, the decision of which distro to use depends on each person, and in the Linux development area if it provides a large number of tools that make life easier.
Just as a comment, I have seen in many places that some developers install XAMPP, LAMP and / or the like, in Linux it is not necessary to do that since we remember that apache is native to linux, for example I only install apache2 and php5 on my Debian with the typical one (aptitude install apache2 php5) and voila, I no longer have to do anything other than put my projects in / var / www
That's right, what happens I tried to do it "easy", although in the post I mention the two methods 😉
Regards. That seems fine to me that you install apache2 and php5, but I feel like you would need to put mysql and also How do you configure phpmyadmin? Thank you.
Let's be honest, despite the effort Dreamweaver goes over all those programs, it is a shame but in Linux we do not have something at the height of this Adobe program.
Yes there is (well, partly), it's called Brackets and it also considers Vim and Emacs. : v
Putting garbage in the code of course Dreamweaver passes everyone by
Dreamweaver is more for designers than for programmers, for people who work with code it is too cumbersome and slow. It is much more comfortable to use a program like sublime text, brackets or webStorm / phpStorm. The times I used Dreamweaver I had problems, after leaving my code ready, I went to design mode, where if I put a point or move something, Dreamweaver takes care of completely disassembling my code that I had left so neat. Not to say that it is payment. I have designer friends and for them it is fantastic, since they can make a page without writing a single line of code.
breamweaver Hahaha I will never learn with that if you will learn to clip
Dreamwho?… Baff, buddy, Artisteer, Dreamweaver, all those are pure bullshit, sorry to say it like that but it's the truth.
They put seven hundred lines of junk code, lots of tags or goals that are not needed, etc etc etc.
Brackets, Sublime, with any of these is more than enough to do any CSS job.
Aptana Studio 3 much better than Dreamweaver.
What did you say? Dreamweaver? And soooo queee essss?
Hopefully you see all the garbage code that generates you ... dreamweaver is for NON-PROFESSIONALS, period!
Sensational post, really
Congratulations
Thanks
Your info is very useful… Thank you. Are you going back to Ubuntu / Debian waters?
HAHA he always keeps a space in his heart for Debian, but… Ubuntu I don't think so hehehe
You never know 😀 😀
Although it should never be said NEVER, I really don't think I'll be going back to Debian for a long, long, long time.
Poor tomcat nobody wants it.
Who wants Java? 😛
I think the themes are getting confused (again), there are you who are only designers, others who are only programmers, there are both, there are those who see winbug "easy" because they install next next and "all set" ( implying that they may or may not be working with proprietary and / or licensed software), there are those who are a little more advanced (and "brave") and also know about linux and normally work with the tools they find in between, and thus a long etc, as we are sharing in this blog the idea is that one develops on gnu-línux whatever the distro it is and therefore opensource tools are used, the underlying issue (I think) is that it depends on each person, there are tools that we don't even know but when we want to learn we have to invest a few hours until we give it, and if we feel comfortable (regardless of what others think) we will be happy !! (:
you can also download the version for php5.6.3
http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/5.6.3/xampp-linux-x64-5.6.3-0-installer.run
http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/5.6.3/xampp-linux-5.6.3-0-installer.run
It depends on what you are developing or the compatibility you need, to keep version 5.5 I simply install the packages that are in the repo and that's it, I have apache 2.4, php5.5.13 etc. also the other libraries like phpcs are easy to install, it is clear that I like the shell and I prefer to install and configure all the things that I can.
You have seen this project wpn-xm.org, it would be interesting to achieve something like this for linux, I say integrated because I use some of those tools, and I am sorry to say that despite its large number of libraries and that the hostings are almost all mounted on Apache I have changed for nginx. I found wpn-xm looking for alternatives to LAMP and XAMPP and it is good for the work machine. It is undoubtedly a good alternative. by the way sorry for my previous comment on W $ + chrome
Your contribution is very interesting, keep developing it, it is appreciated
Hello I am new to Ubuntu, I have always used windows but I am wanting to migrate to a linux environment using Ubuntu but when I want to create folders or put files in the htdocs as in windows it does not allow me or there are some things that by custom in windows I could do but in Ubuntu I can't make it block a lot or it doesn't allow me to make modifications, if I use sublime to create files in htdocs it doesn't allow me either, if you can help me, I would appreciate it.
Someone can help me?
Many years ago I took a small course in web design and I loved it, and although they gave me the programs for windows, they never let me install them.
A few months ago I was finally able to switch to Linux Ubuntu and I can't find any programs
I remember that in the course I saw three programs
Dreamweaver, Flash MX and another one that was for photo retouching but I can't remember the name.
Could you indicate download websites or routes to install the equivalent of what I saw in the course?
All the best
Thank you.