📜 ⬆️ ⬇️

Full replacement of Denwer or deploy Ubuntu-server on VMware (Part 1)

All those who develop websites under windows, probably faced various problems after launching the website on the server. These problems appear because servers usually work under Linux OS. In addition, from time to time there are very interesting things like NodeJS (ported to win, but not immediately), which I really want to twist, but you can't - they are not on windows. However, with all these flaws I don’t want to go away from windows, because here there are a lot of advantages and familiar ones after all.

But do not be upset, because there is virtualization, which hurries to our aid.

Create a virtual machine


There are many different programs to solve this problem, I will use the VMware player.

We start VMware player and go to the "Create a new VM." Then we do everything as on the screen or at its discretion (depending on the resources available to you).
')










After completing the VM creation process, the virtual machine you created will appear in the right column.



Now, it needs to be configured. Go to the settings “Change virtual machine settings”> CD / DVD (IDE). Put the switch on «Use iso image file» and select the image of our Ubuntu.



Note
Ubuntu naturally need to be downloaded from the official site. I chose Ubuntu 11.04 x32, because x64 I did not run (it seems because of the lack of support for hardware virtualization).

Now go to the section "Network Adapter" and set the NAT.

We put Ubuntu


We launch our VM “Start Virtual Machine”. And follow the steps.

Wait while the partitions are formatted and the system components are installed. After that, you will be asked to enter the full username. Think up a name from Latin small letters, for example: Claud is me :).

Running ubuntu


And so Ubuntu is installed and running (if not, then start the virtual machine again). Log in to Ubuntu under your account (username and password that you entered during the installation of Ubuntu).

Now we have a console available. According to this, perform the installation of a couple of necessary programs.
  1. We update the list of packages and then - completely - the system:

    sudo apt-get update
    sudo apt-get upgrade

  2. If the SSH server was not installed during the installation of the system, we do it now.

    sudo apt-get install openssh-server

  3. Install the package "ntp", which will provide us with automatic time synchronization:

    sudo apt-get install ntp ntpdate

  4. Now you can check the configuration of network interfaces.

    ifconfig

    If they coincide with what you entered when installing Ubuntu, then skip the next two points.
  5. We configure network interfaces. To do this, enter the command:

    sudo nano -w /etc/network/interfaces

    and edit the settings (do not forget your IP is different).

    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.80.3
    netmask 255.255.255.0
    network 192.168.80.0
    broadcast 192.168.80.255
    gateway 192.168.80.2
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 192.168.80.2
    dns-search localdomain

  6. If you edited the settings of network interfaces, then restart the network service:

    sudo /etc/init.d/networking restart

Now it's time to go to our main window and connect to the server via ssh.

To do this, download the putty , launch it, and in the session settings we specify our IP address (see: “IP of our Ubuntu”).



All now you can safely connect to our guest OS (Ubuntu) over SSH.

That's all. In the second part, I will tell you how to mount a shared folder from windows to Ubuntu, and work with it as a locally directory. In the meantime, you’ll do php configuration (PHP-FPM is already built in versions over 5.3.3) + nginx + MySQL + something else. The benefit of detailed guides in this case is complete.

A few words about leadership


First of all, it is for beginners, and I myself am in the administration of Linux, I am at the novice level + 1 (that is, only what I need on duty). Therefore, if I made a mistake somewhere, then the comments of the pros are welcome.

Full replacement of Denwer or deploy Ubuntu-server on VMware (part 2)

Source: https://habr.com/ru/post/127090/


All Articles