[Linux] PHP Programmer Topsy Linux Series-How to install using

Source: Internet
Author: User

Now the server mainstream Linux system, the main distribution is CentOS, the latest CentOS version number is 7.3, my company is using CentOS6.5, so, I am still mainly to learn the 6.x version of CentOS. Desktop version of the Linux system, the use of Ubuntu more, I also installed the latest version of Ubuntu16.10 LTS, in the later study and use, I mainly say the centos6.x and Ubuntu16.10 these two versions.

Download image

To learn CentOS naturally to install this system, I use VirtualBox virtual machine to install the CentOS system, while in an abandoned notebook installed Ubuntu16.10 desktop system, first say VirtualBox by CentOS. Download and install the VirtualBox this software, the process of installing this software and ordinary Windows software, just like the next step, and then to download the CentOS image, I went to look for NetEase's open source mirror station, Found that CentOS6.5 has gone, 6.x version of only 6.8 left, then only install CentOS6.8, the following is the mirror:

http://Mirrors.163.com/centos/6.8/isos/x86_64/centos-6.8-x86_64-minimal.iso

Resolving a virtual machine can only install a 32-bit system

Open VirtualBox, in the new system drop-down list, found that only 32-bit systems can be installed to solve this problem, you need to allow CPU hardware virtualization and shut down the Windows system's own Hyper virtual machine service. My notebook is ThinkPad e550, after the boot in the logo interface, press FN+F1 key into the BIOS, find setup==>security==>virtualization replaced with enabled, save reboot can be, If you close the Hyper service, you need to go to service management to close it.

VirtualBox installation system, or is very simple, click New, choose a system, the next step. Select this Virtual PC, right-click Settings, find storage, add a virtual CD-ROM, select the ISO file.

Installation system

Because we are in the virtual machine inside the press, so don't worry about what partition data what, the next step, encountered the detection of skipping, encountered to write the confirmation of the disk, only the following two are note, select the Asian Shanghai time zone and enter the root password (very important)

Troubleshoot network and no eth0 NIC issues

System installed, restart, enter the user name root and password xxx, I entered the CentOS system, because I can not always use the terminal to knock command, I want to use the SSH remote software under Windows to connect the system, so I want to know its IP address is what, View IP address using command ifconfig, found that it has only one LO network card, the address is 127.0.0.1, this is its local loopback address, can not connect remotely, and now also not connected to the Internet, I ping baidu.com, it prompts PING:UNKONW host. In the list of VirtualBox, right-click on this virtual computer, select the network, NIC 1 on the connection mode drop-down list select Bridge network card, bridge network card means that this virtual machine is equivalent to a separate LAN within the computer, has its own LAN IP, LAN computer can be accessed.

/etc/sysconfig/network-scripts# edit this file vi ifcfg-eth0# Press I edit # change onboot =no toonboot= yes# Press ESC to exit the Edit Status # Press: Wq Save this file # Restart the Web service network restart# view IPifconfig

At this time, you can see the ETH0 network card and dynamically assigned LAN IP, for example: 192.168.2.141, on the win system to open the command line ping 192.168.2.141, at this time can ping pass. Check the IP of the win system, use Ipconfig, for example: 192.168.2.145, ping 192.168.2.145 in the virtual machine CentOS, you can also ping. Ping baidu.com in the virtual machine to see if the network is accessible, this should be able to ping is completely normal.

Remote connection

The SSH remote tool I used is SECURECRT because it can open multiple tab tabs and is very convenient to open more windows. Download after the installation, right-left that session, select Quick Connect, and then enter the hostname, user name root, click Connect on it, it will require the root of the secret, fill on it can be. Connection can be in this Windows software inside the command, but also easy to copy and paste commands, in the virtual machine terminal is not easy to paste.

How to set a static IP address

Now the IP address is dynamically allocated, may change at any time, we can not always in the remote connection to change the IP, of course, I can not control this, before that can be normal use. Solve the IP will change this problem, it is necessary to set the static IP, or edit just that NIC configuration file, address is/etc/sysconfig/network-scripts/ifcfg-eth0, I first on the win system to see Ipconfig, look at the mask, What are gateways?

And then to modify the Linux configuration file, we must look at their own computer network, can not copy

#设置静态ip
bootproto=static#ip地址
IPAddr=192.168.2.100#掩码
NETMASK=255.255.255.0#网关
GATEWAY=192.168.2.1

Service Network Restart Restart the network, now my virtual machine static IP address is set, remote connection is OK

The above setup steps, I did not succeed in the company test, the IP network segment changed every day, unable to set the static IP, at home test is successful.

Next Manual Build Lnmp environment

[Linux] PHP Programmer Topsy Linux Series-How to install using

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.