Ubuntu12.04Server Configuration Record 1. single NIC with single IP address (common) vi/etc/network/interfaceautoeth0ifaceeth0inetstaticaddressIPnetmask subnet mask gateway open file/etc/network/interfaces... ubuntu12.04 Server Configuration Record 1. single NIC with single IP (common) vi/etc/network/interface auto eth0 iface eth0 inet static address IP netmask subnet mask gateway open file/etc/network/interfaces, make sure that The Network Manager is not enabled (see The preceding figure) and configure The following content: [html] # The loopback network interface (configure The loopback Port) auto lo # Auto-boot lo interface iface lo inet loopback # configure lo interface as loopback # The primary network interface (configure The main network interface) auto eth0 # enable the eth0 interface iface eth0 inet static # configure the eth0 interface as the static IP address 10.16.3.99 netmask 255.255.255.0 network 10.16.3.0 broadcast 10.16.3.255 gateway 10.16.3.1 method 1 (recommended ): to install the command line, you only need one command: sudo apt-get install openssh-server. later, Ubuntu automatically downloads and installs openssh server, and resolves all dependencies together. Method 2: first enter the Ubuntu Software Center through Ubuntu Software Center installation, and then enter "openssh-server" in the search box. then, openssh-server is displayed in the search result; click "Install" to Install the SDK. Sudo/etc/init. d/ssh start2. then run the following command to view the IP address: ifconfig. set the IP address. enter sudo gedit/etc/network/interfaces on the terminal. assume that the network card is 0. if it is another network card, change eth0 to the corresponding value. Auto loiface lo inet loopback # use Nic 0 auto eth0 # use static IPiface eth0 inet static # set IPaddress 172.32.1.11 # set the subnet mask. do not make a mistake. you can calculate it by yourself, the specifics may be different, depending on the IP address! Netmask 255.255.255.0.0 # set gateway 172.32.1.2152. configure DNS. if you need to manually configure the DNS terminal, enter sudo vi/etc/resolv. add the following code to conf (211.153.31.2 for your DNS) nameserver 211.153.31.23. restart the network sudo/etc/init. d/networking restart: After prompting OK, try to ping other machines in the Gateway and LAN, and then try again! Pay attention to the differences between the ports of the two Nics. the installation problem is that the plug-in method of the network port is wrong and has nothing to do with the technology .. After installing Ubuntu, I suddenly realized that I didn't set the root password. without knowing the password, I could not access the root user. I searched the internet and found out why. The default root password of Ubuntu is random, that is, a new root password is generated every time you start the system. Enter the sudo passwd command on the terminal, enter the password of the current user, enter, and confirm. the new password is the new root password. After the modification is successful, enter the command su root and then enter the new password. In service networking restart, you need to add sudo ubuntu12.04 in advance to reset the root password when using ubuntu. if you forget the root password, how can you reset it, by default, the latest version of ubuntu enters grub by pressing the shift key when it is started. My previous version of ubuntu11.10 used to change the root password reset method: #1. when the machine is started into grub (press and hold esc to go to grub), move it to the recovery mode of the second line with the up and down keys, press e (note not press enter) #2. add rw init =/bin/bash to the last line of linux/boot/vmlinuz, or (rw single init =/bin/bash) (remove the one after ro in short) and press ctrl + x or press F10 to enter; #3. enter the single user mode, you can do whatever you want. (the command for modifying the root password is passwd root. Then, enter your new password, press ctrl + alt + delete to restart the CMK. (I tried to shut down the instance by using a command. I can only use this command to restart the instance ). The method for ubuntu's latest version 12.04 is: (This method is theoretically feasible, but it fails to pass in version 12.04, and give root password for maintainer is reported) #1. it is the same as the previous step. #2. press Ctrl + x to enter the recovery menu, select drop to root shell, and change the root password. When changing the root password, the system may prompt "Authentication Manipulation error". at this time, enter the following command: mount-rw-o remount /, next, change the password again. if you forget the password of ubuntu or the password is broken, how can this problem be solved? (this method is feasible in this version) 1. when the Grub interface appears, press "Esc" to enter grub: ubunt 8.04.1, kernel 2.6.24-19-generic ubunt 8.04.1, kernel 2.6.24-19-generic (recovery mode) ubunt 8.04.1, MeMtest86 + 2, select "ubunt 8.04.1, kernel 2.6.24-19-generic (recovery mode)" on the second line, and press "Enter" to Enter the Recovery Menu: resume normal boo T dpkg repair broken packages root drop to root shell prompt xfix try to fix x server 3, select "root drop to root shell prompt", press "Enter" and then the prompt is displayed: root @ QA-desktop :~ # You can use passwd to generate a new password. root @ QA-desktop :~ # Passwd root Enter new password: Retype new password: passwd: password updated successfully root @ QA-desktop :~ # Then reboot takes effect.
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.