SECURECRT connected to VirtualBox under the installation of Ubuntu and NMP with the host to access the Nginx server process

Source: Internet
Author: User
Tags nginx server

Always use WAMP as a development environment, but the work is often encountered in the Wamp no problem but submitted to the server production environment will have some unexpected situation, resulting in the idea of building LNMP environment in this machine, I personally do not know the other people's Virtual machine build server environment is how, But I was a lot of online tutorials pit for a long time, optical card in trying to connect Ubuntu with SecureCRT spent two or three hours.

First you need to have a virtual machine already installed Ubuntu, this online tutorial many also very simple to cross.

First open the terminal, enter the command sudo-i, password, get root permissions, easy to do next.

1, apt-get Update (update your list)

2, Apt-get install Openssh-server (get ssh, used for remote connection)

3, ps-e |grep ssh (if you see sshd, that means the service started successfully)

4. Shutdown-h Now

5, open VirtualBox, Management-Global Settings-network-host only ...

  

Then take a look at the IPv4 address and remember it.

6.

   

7.

  

8, port forwarding, the address of the previous step 5 to fill the host IP, sub-system IP is generally the following, do not, you can enter the input ifconfig to see, the first card on the IP address to fill in the sub-system IP, this step is finished with Nginx and SSH forwarding.

  

9, then is to open Ubuntu, with SECURECRT SSH2 protocol access to the above host IP on it.

10, then through SECURECRT apt-get install nginx php7.0-fpm mysql-server-5.6 php7.0-mysql

  

11, after installation Vim/etc/nginx/sites-available/default (there is a problem with the VI, suggest Apt-get install VIM, and then use), find the location, a few lines of comments removed.

  

12, and then restart the service, systemctl restart Nginx.

13. Open the Host browser and enter the virtual machine Ubuntu IP address.

   

14, then open Cd/var/www/html,vim index.php, write a sentence <?php echo "Hello World"; ESC wq! Exit

15.

  

This essay is a wish to make a record, a good memory than a bad pen, and also hope to help to build this virtual machine server environment of the people, the rest is some shared folders, server settings, expansion of the problem, not mentioned here.

SECURECRT connected to VirtualBox under the installation of Ubuntu and NMP with the host to access the Nginx server process

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.