Virtual Machine Development (LAMP)

Source: Internet
Author: User
Get started with cainiao. I would like to ask, many people use virtual machines for development on local computers. I want to know how Daniel installs and configures the virtual machine environment, and then how to access the Virtual Machine server locally? Can you give me more details? Thanks to every big brother who answered the question, great God, great ox. Get started with cainiao. I would like to ask, many people use virtual machines for development on local computers. I want to know how Daniel installs and configures the virtual machine environment, and then how to access the Virtual Machine server locally? Can you give me more details? Thanks to every big brother who answered the question, great God, great ox.

Reply content:

Get started with cainiao. I would like to ask, many people use virtual machines for development on local computers. I want to know how Daniel installs and configures the virtual machine environment, and then how to access the Virtual Machine server locally? Can you give me more details? Thanks to every big brother who answered the question, great God, great ox.

My current practice is to install linux (centos) in vituralbox and run it in the background (to minimize installation, only command line ). Build a LAN between my host and the virtual host, and then deploy my website on linux, finally, enter the IP address of the VM in the browser of the host to access the website. In this way, not only can the host access the site, but other virtual machines in the same LAN can also access the site, or even mobile phones connected to the laptop hotspot can access the site.

As for how to upload the written code to linux, I configured a git remote repository on linux, and then pushed the written code to the host.

I used tiny core, a 12 m Linux release, to start it with the vbox -- headless parameter and configure the ssh and samba services in it.

It is almost impossible to run in a virtual machine, which is as convenient as the local environment.

Tiny core is very small and runs completely in the memory. The speed is also superb.

A person who has been developing on a linux virtual machine for a long time will answer you.
Virtual Machine version (ubuntu14.04)

The environment is set to LNMP. As for how to access the local machine, I have never tried it. Just access it directly from the virtual machine.

Actually, it is no different from local development.

Virtual Machine environments can be packaged with one click.

Use samba to share files between virtual machines and physical machines.

The NIC mode of the virtual machine is set to bridging or NAT, and then ifconfig gets the ip address, and then ssh is connected to OK

Ubuntu server in vbox. nfs server is enabled on the local machine. It is automatically mounted to/opt when vbox is started. The directory of apache2 is set to/opt. I can write it on the local machine at any time, the VM can be accessed as soon as it is used. Pay attention to setting port ing in vbox.

Er ...... I am very professional in the building. I wonder if my cainiao answer is suitable ......
Directly phpstudy, and then localhost access ......

Host Windows, run arch in the virtual machine, enable the Samba service on the virtual machine, share a directory with Windows, and the code is under this directory. This enables editing in Windows and running in Linux, this method has been used for several years, and no better method has been found yet.

The VM runs the ftp server. In Windows, it connects to the shared data and files through the ftp client.

Install the la/nmp environment in the virtual machine. The host in the environment does not need to be configured. View the IP address of the VM and turn off the protection walls. Enter the host of the Local Machine and bind the Virtual Machine ip address to the vhost domain name configured by nginx.

VirtualBox is used on Windows to virtualize an Ubuntu 14.04 LTS. We recommend that you use a lightweight desktop Xfce Xubuntu 14.04.
Then, Windows and Xubuntu Use Network Address Translation (NAT) connection, so that Xubuntu can automatically connect to the Internet.
Xubuntu can access the host machine service through the IP address of the host machine Windows.
To access the Virtual Machine Xubuntu in Windows, you need to configure port forwarding in VirtualBox. For example, you need to forward the local port 80 of Windows to the port 80 of the virtual machine, in this way, you can access the HTTP service in Xubuntu on Windows. similarly, you need to access the OpenSSH service in Xubuntu and forward port 22. file transmission can also be implemented through the SFTP of OpenSSH. of course, you can also configure VirtualBox shared folders so that you can develop projects in Windows Local shared folders and run code in Xubuntu.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.