Windows7 64-bit system installs VMware Centos 64-bit system to build a development environment

Source: Internet
Author: User
Tags root access

I. Overview

Windows is our most commonly used work system, Linux development many people usually install virtual machines under Windows, and then install Linux in the virtual machine. This paper mainly records the problems encountered in the process of building the development environment and how to solve them.

The environment used by bloggers:

Computer: Laptop with wireless internet
Host operating systems: Windows 7 Ultimate, 64-bit 6.1.7601, Service Pack 1
Vmware:vmware? Workstation 9.0.0 build-812388
Linux:centos 6.4 (Final) 64-bit
Ii. installation of VMware and CentOS

Installation is simple, many online materials, the installation process is omitted here. It is necessary to note that the virtual network adapter is NAT-free, no modification is required, and Linux can connect to the Internet after installation, and at least one root user at this time.

third, log in to Linux using SecureCRT

The operation of Linux in the virtual machine is not very convenient, especially when the computer configuration is not good when the card, using Windows with SECURECRT login Linux, under the SECURECRT console operation is more convenient. Previously need to do a static setup of Linux IP, convenient securecrt login. First look at the settings of the NAT network card, in the VMware menu: Edit, virtual network editor, select the NAT network card in the open window, namely VMNET8, then select DHCP settings, you can see the range of IP, select NAT settings can see the gateway, such as:

The IP range of the visible NAT network card is between 128 and 254 of the 192.168.141 network segment, so Linux can be set to static ip:192.168.141.128, and the network management is set to 192.168.141.2. Such as:

After Linux is set up, set SECURECRT link, securecrt menu file->connect ..., select New session-> in the window next, in the new window hostname fill in the Linux IP address, Username uses super User root for Linux, the next step, the description can be completed without filling, directly press.

and then saw the first figure sessions appeared in 192.168.141.128, select it, then press Connect (the first icon in the first image), the login interface, you need to enter the root login password, enter the Linux Root password, you can log in. Such as:

At this time, also need to set SECURECRT, to avoid garbled display, menu options->session Options, Settings window settings, the VT100 changed to Linux, the code to be consistent with Linux, in the Linux shell input echo $LANG command can see the Linux encoding, Bo Master's Linux encoding for UTF-8, so SECURECRT also changed to UTF-8, other settings according to the personal use of custom settings can be.

At this point, you can enter the shell command to operate Linux in the SECURECRT console.

Note : The above uses root login, if Linux added other users, you can also use these users to log on, the principle is the same.

iv. Windows access to Linux SMB

People familiar with source insight know that it is convenient to develop software engineering and to edit software engineering in source insight, and it is difficult to have such a convenient and easy-to-use editor under Linux. Therefore, Linux software development, in the hope that under windows with source insight under the editing of sources, in the SECURECRT console with the command line compilation, so it is best to achieve under Windows and Linux file sharing, VMware installed VMware Tools, which itself has settings for shared folders, can be shared.

Here's another share: Linux turns on the SMB service, Windows maps the shared directory of Linux SMB to Z-disk, and accesses Linux files as if it were a local Z-disk.

  1. Linux Turn on SMB service

    You can turn on the SMB service by entering the following command in SECURECRT.

    [[Email protected] ~]# service SMB start
    Start the SMB service:                                            [OK]
  2. Linux adds root access to SMB services Add the root user access to SMB by entering the following command in SECURECRT.
    [Email protected] ~]# smbpasswd-a root
    New SMB Password:
    Retype new SMB Password:
    Note that the password entered here is not the password for root login to Linux, but the login password for the root user of the Linux SMB to access the new password. Assume that the password is set to 123456. At this point, the Linux SMB has the root user, the login password is 123456, Access directory is the/root directory. 
  3. Windows maps the shared directory of Linux SMB to Z-disk in the command line console of Windows, enter the following command to map the access directory/root for the root user of Linux SMB to Z disk.
    C:\users\kenrabook>net use Z: \\192.168.141.128\root 123456/user:root
    Command completed successfully.
    C:\users\kenrabook>
    At this point, you can see the z-disk in Windows Explorer. However, Win7 64-bit system access may prompt for no permissions after this is resolved.

    Note : If you need to delete a mapping, you can use the following command.
    C:\users\kenrabook>net Use/delete Z:
    Z: Has been deleted.
    C:\users\kenrabook>
  4. Windows7 64-bit encountered problem solvingfor Win7 64-bit, it is still inaccessible to SMB, to determine that the firewall has been shut down the Linux, Windows Firewall is also closed, or not, through the network search, found the following reasons: By default, Windows 7 No normal access to shared folders on NAS or samba servers. The reason is that starting with Vista, Microsoft defaults to the NTLM V2 Protocol's authentication response message, and the current NAS system and samba only support LM or NTLM.
    The workaround is to modify the local security policy by the following method:

    1) Win7 in the Win+r button, enter secpol.msc and run in the Run window. The Local Security Policy window appears, select Local Policies, security options, network security: LAN Manager authentication level, double-click the network security: LAN Manager Authentication Level Properties window, select options, OK.



    The directory for SMB is still inaccessible after modification, or the prompt does not have permissions.

    2) Close Linux SELinux, and enter the following command to edit the SELinux file. SELinux is changed to equal disabled. Disk, and then SECURECRT re-login to Linux, the Win7 64-bit system will have normal access to the SMB shared directory, read and write no problem.
    Edit the highlighted line and change to disable
    system.
    # selinux= can take one of these three values:
    #     Enforcing-selinux security policy is enforced.
    #     Permissive-selinux Prints warnings instead of enforcing.
    #     Disabled-no SELinux policy is loaded.
    Selinux=disabled
    # selinuxtype= can take one of these the values:
    #     targeted-targeted processes is protected,
    #     Mls-multi level Security protection.
    selinuxtype=targeted

At this point, you can put the software engineering in the Z-disk, edit it with source insight, and then compile it with GCC in SECURECRT.

Windows7 64-bit system installs VMware Centos 64-bit system to build a development environment

Related Article

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.