Exclusive 2-First lesson Ubuntu system installation and configuration

Source: Internet
Author: User

1.1 Installing Ubuntu using VMware

1.1.1 Preparatory work

1) VMware's installation package

VMware will use at least 10.0, this article with the latest version of VMware12, this version of USB3.0 support is more stable, if the installation of more than 10.0 version can be directly upgraded via the VMware Help menu option, the installation and upgrade of VMware is no longer described here.

2) image file for Ubuntu

The official recommendation is to use Ubuntu 14.04 64bit or later as a development environment. This article uses the Ubuntu-14.04-desktop-amd64.iso file.

3) Windows system

It is recommended to use the Win7 64-bit flagship version, your computer's physical memory at least 8GB, because we allocate to the virtual machine memory at least 4GB. And since compiling Android at least 80GB of disk space, Ubuntu system needs 20GB, so that the remaining space of a disk must have at least 100GB, can be used as a virtual hard disk for the entire virtual machine.

4) Router

As an embedded developer, a router is an essential tool, just as important as a development board, because we need to use a router to communicate with the PC through the Development Board and the computer.

1.1.2 Creating a virtual machine

1) Open the installed VMware, click "File" and select "New Virtual Machine".

2) then tick the "Custom (Advanced)" option and click "Next".

3) to select the virtual machine compatibility, select the highest version of the virtual machine in your system, the default is the highest version, and then "next".

4) in the Install Client OS interface, select "Install the operating system later" and then click "Next".

5) Select "Linux" on the client operating system interface, choose "Ubuntu 64", and click "Next".

6) Virtual machine name: garyandroid, in Location: Specify where you want your virtual machine to be placed under Windows, of course, on a disk with at least 100GB of space left.

7) in the processor configuration interface, the number of processors is generally 1, indicating that there is only one CPU, the number of cores per processor to be configured according to their own processor situation, here Select 4.

8) to the virtual machine memory configuration interface, at least to allocate 4GB of memory.

9) in the Network Type Settings screen, select "Use Bridged network"

10) in the I/O Controller Select interface, select the "LST Logic" type, then click "Next".

11) Select the "SCSI" type when selecting the virtual disk type.

12) in the Select Disk interface, select Create new Virtual disk.

13) in the specified disk capacity interface, specify the size of the virtual disk that we want to allocate for Ubuntu, at least 100GB. By default, the new virtual machine disk is also in the previous virtual machine directory. and checking "Save virtual disk as a single file" will improve the performance of your virtual disk.

Note: The so-called virtual disk, in fact, under Windows is a file, this file is virtual into a hard disk for the operating system inside the virtual machine to use. Although 100GB of space is specified as a virtual disk, my Windows system does not immediately lose 100GB of hard drives, It just creates a fairly small. vmdk file, which increases as you store data in the virtual machine, and as it grows, the available disk space under the window decreases.. vmdk files The intelligence increase does not decrease.

14) Specify the disk file, the name of the previously mentioned VMDK file, the default is the same as the name of the virtual machine, using the default is good.

15) complete, but still need to install the operating system.

16) Select the "CD/DVD" option, in the new pop-up "virtual machine settings" sub-window, in the right "connection" section, tick "Use ISO image file", click "Browse" button to find the pre-prepared Ubuntu image file Open, then go back to the Virtual machine settings screen, click "OK" button, you can return to the VMware main interface. This step is analogous to setting the BIOS to specify the boot device for the virtual system.

17) Select "Turn on this virtual machine",->install ubuntu-> do not tick "update at Installation", you can choose to tick "install third party software", select "Something Else" in the installation type interface, to indicate a custom installation, That is, we manually partition, do not let it auto-partition, click on the "New partion Table" button, will pop up a new dialog box, asked if you are sure to format the disk to create a new partition, click Continue, indicating that you want to continue to create the partition table, then will be more free Space's column, click on the newly created "free space", and then click the "+" button below, will pop up the creation of a new Partition dialog box, we first created a boot partition, so we give boot partition 200MB, like BIOS, Bootloaer to the space, is a guide program required space, do not need to be too big, 200MB is sufficient. It is important to note that Ubuntu does not turn on the keypad by default, so you need to manually turn on the keypad when entering numbers. mount point Select Mount to/boot, select the partition type primary partition (primary), the beginning of the new partition is the location of the disk, the file system select the EXT4 type, click the OK button to create a good boot partition, and then create a swap partition, The swap partition is used for memory exchange, click "Free Space", then click the "+" button, then select the file system type (use as entry) is the swap area, the mount point option will automatically disappear, also we choose the partition type is the primary partition, The partition size is best set to 1.5 to twice times the amount of memory you assign to the virtual machine,ok-> click the "freespace" "+" number, create the root partition, select mount point/, and select the primary partition, the file system type is also the EXT4 type, and size is the remaining free Space, click on the "OK" button to create a root partition, so that the entire Ubuntu system partition is complete, mount points under the other mount points (partition) temporarily ignore, with the three partitions can be normal use of Ubuntu system. Click Install now-> Default Shanghai time zone->continue-> fill in your username (for login system), the name of the PC (that is, the name of Ubuntu in the virtual machine, used for other computers to access the virtual machines), password, continue- > Installation complete, restart now.

1.1.3 Setting the network connection mode

The computer has a wireless card, a wired network card. VMware's "edit", "Virtual network Editor", and then in the bridge mode section, bridge to the back click the dropdown box, select the actual network card used by window. If it is a network cable, select the wired network card, if using WiFi internet connection Select the wireless network card, select OK.

1.1.4 setting up VMware Memory usage

Although we allocate more than 4GB of memory for the virtual machine, sometimes it seems to be out of order, when a large program in Ubuntu, the consumption of 3GB memory, shut down the program, it is supposed to recycle 3GB memory, but in fact not; this is a bug for VMware, through VMware's "edit", "Preferences", click Memory, tick "Adjust all virtual machine memory to the reserved host RAM" option, the above scroll bar by default, click on the "priority" option, the "crawled input" entry is selected as "high", it is "normal" by default. In the main interface, click on the "Memory" option of the Ubuntu virtual machine you created to enter the virtual machine settings interface,-> in the virtual machine Settings screen once click on "Options", "advanced", the right of the "crawl input" entry is set to "high", This setting is only for the Ubuntu we currently use, then tick "Disable memory page trimming", OK----in the folder where the virtual machine is located, locate the "virtual machine name. vmx" file, open with a text editor, and in the end, create a new row, Add the following: Mainmem.usenamedfile= "FALSE" to save the exit. Restarting a virtual machine can improve memory usage performance.

1.1.5 Installing VMware Tools

To transfer files from Windows and Ubuntu, on a personal level, with a virtual machine, you can use VMware's own VMware tools tools to get your files copied directly from Windows by dragging files into VMware's windows. You can also copy and paste files directly from VMware to Windows, which is two-way possible. In addition, the Clipboard can be shared between Windows and the operating system in the virtual machine, and in any one system, you can paste the copied text content between the two systems arbitrarily. The disadvantage is that the real Linux master disdain to use this stuff, after all, when you are using the Linux real machine, this will no longer exist, at this time to achieve the Linux and Windows between the transfer of files, only through the network.

1) in the virtual machine boot state, click on "Virtual Machine", "Install VMware Tools"

2) in the popup dialog box, select Yes, and then close the prompt window that appears at the bottom. Because VMware Tools is mounted as a CD-ROM to the inside of the virtual machine operating system.

3) Double-click the DVD icon in the Ubuntu system to jump out of the VMware Tools CD directory and copy the package to the Ubuntu documents directory.

4) Use Ctrl+alt+t to open the terminal, enter the documents directory, unzip it, enter the folder, run the vmware-install.pl script to start the installation of VMware tools. The process has been selected y,enter.

5) With this VMware tools, we can optimize the display of Ubuntu in the virtual machine, otherwise the display range is very narrow, using VMware tools to set the Ubuntu display to automatically adapt to the screen. In the virtual machine state, click "Edit", "preferences", then "display", then make the following settings

, back to the VMware main interface, re-open the Ubuntu virtual machine, the login screen is still a very small window, but after entering the password, it will display full screen.

1.2 Modifying the Software update source

After entering the Ubuntu system, click on the "Settings" icon on the left menu bar, select "Software&updates" in the pop-up dialog, select the "Download from" drop-down list in the popup dialog box and select " Select Best server, a progress bar appears indicating that the fastest software source in all software sources is being inspected. Click Choose server-> Enter the root password,-> Click close-> in the dialog box to select "Reload" to update the local cache, complete the software update source settings. If the reload after the failure, prompted that "network connection is not normal" or "failed" prompt, the terminal using the following command to cache updates can be sudo apt-get update.

1.3 Install Sogou Pinyin Input Method

1) under Ubuntu Open Sogou Input Method Linux version of the official website Http://pinyin.sogou.com/linux/?r=pinyin, and download the required version, here choose 64-bit version, download, select SaveFiles, The browser will say that the Deb installation package is downloaded to the download subdirectory of the current user directory.

2) from the graphical user interface into the download directory, double-click the Deb software package, Ubuntu will automatically pop up the software manager, and then click on the upper right corner of the install, enter the Rootmiami can be installed Sogou input method.

3) Enter Im-config in the terminal, this will appear a dialog box, click OK, there is a dialog box, click Yes, select Fcitx,ok, and then restart the Ubuntu virtual machine.

4) Restart after the terminal input: FCITX-CONFIG-GTK3, click on the bottom left corner of the dialog (+) button, pop Up another dialog box, and then, cancel only show the current language (it is important, otherwise can not find just installed Sogou Input Method!) Finally, enter Sogou in the input box, check Click OK, this time the Input method list will be more than sogou pinyin.

5) Close these dialogs and use CTRL + SPACEBAR to switch to 3 input methods. You can enter Chinese in the browser, text editor, and command line.

1.4 Installing common network services

Several common network services are used to pass files.

1.4.1 NFS Services

1) Installation command:

NFS is an abbreviation for a network file system that can be used to transfer files between Linux and Linux for data sharing.

sudo apt-get install nfs-kernel-server portmap

2) Modify the configuration file

Modify/etc/exports, add content, and later boards and other Linux hosts can access the/NFS directory over the network:

/nfs * (Rw,sync,no_root_squash,no_subtree_check)

Of course, the premise is that Ubuntu's/nfs directory exists, and the permissions are best changed to 666 or 777, indicating that anyone can read and write the directory.

3) Restart the NFS service:

After the modification is complete, perform the following command to restart the NFS service

Sudo/etc/init.d/nfs-kernel-server restart

4) Verify the NFS service:

Mount the/nfs directory of this machine to the current user's document directory and create a new file in/nfs, you will find that this file will appear synchronously in the document directory, indicating that the mount was successful.

sudo mount-t NFS Localhost:/nfs ~/documents/

Select the target mount directory, it is best to choose an empty directory, or the target directory before the file will be temporarily missing, do not need to mount, can be uninstalled with the Umount command, for the above Mount test

sudo umount ~/documents/.

1.4.2 Samba Services

1.4.3 TFTP service

When using the board's Uboot and Linux for data transfer, the TFTP service is used.

1.4.4 FTP Service

1.5 Modifying the Hosts file to access the Android website

1.6 Installing the developer kit needed to build Android

Exclusive 2-First lesson Ubuntu system installation and configuration

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.