Configuration summary for Linux (ubuntu12.04) basic services (Network Service, SAMBA,NFS) and Vim editor

Source: Internet
Author: User
Tags get ip

One, Configuration of network services:

1.1 location of the configuration file:/etc/network/interfaces

1.2 contents of the configuration file:

Auto Loiface Lo inet loopback# The following is the newly added content, set to static get IP address auto eth1 iface eth1 inet static #ip地址设置成与主机Windows同一网段, others same as Windows Address 192.168.1.30 netmask 255.255.255.0gateway 192.168.1.1

1.3. Restart Network service:/etc/init.d/networking restart

1.4. Network test:

Ping the Windows host ok! if the virtual machine network is set up as a bridging mode and the network card that is currently being used by your Windows host is bridged

Additional Note: If you want to access the extranet also need to configure DNS, the configuration file in:/etc/resolv.conf, to add the following content to the configuration file: NameServer 192.168.1.1, where the DNS is set to the same as my windows, Then ping www.baidu.com ok!


Two, the configuration of Samba services:

Samba services are used to enable Windows and Linux to implement file sharing.

2.1. Installing Samba services: sudo apt-get Installsamba

2.2.samba configuration file location for the service:/etc/samba/smb.conf

2.3. the contents of the configuration file (added at the end of the configuration file):

[Share] Comment = sambaserver Path =/opt #共享目录为根目录下的opt文件夹 public = yes writable = yes

2.4. Restart Samba service (I prefer to restart, hehe):/etc/init.d/smbdrestart

2.5.samba the test:

Under Windows, select the mapped network drive, and then the folder that entry is: \\ip\share, where IP is your linux IP address, share for your Samba config file inside the share (if you have other names inside the config file, Then you can write the name you set, and then connect the ok!


Third, the configuration of the NFS service:

NFS services are used for file sharing in different Linux systems and are often used for application development and driver development in embedded Linux development.

3.1.nfs installation of the service: sudo apt-get install nfs-kernel-server

3.2.nfs location of the configuration file:/etc/exports

3.3. The contents of the configuration file (added at the end of the configuration file):

/opt* (Rw,sync,no_root_squash) #共享根目录下的opt文件夹, any network segment can be accessed

3.4. Restart The NFS service (I prefer to restart, hehe):

Start the port mapping service first:/etc/init.d/portmaprestart

then start the NFS service:/etc/init.d/nfs-kernel-server restart

3.5. Testing for NFS services:

We take ubuntu12.04 both as a server and as a client, input instructions: Mount 192.168.1.30:/opt/mnt/nfs/ Mount the OPT folder under the server-side root of the IP address 192.168.1.30 to the NFS folder under the client's mnt ok!


Iv. configuration of the Vim editor:

4.1 install VIM Editor: sudo apt-get install vim

4.2 Vim location of the configuration file:/ETC/VIM/VIMRC

4.3 the contents of the configuration file (added at the end of the configuration file):

Set nu #设置显示行号set ai #设置自动对齐set ts=3 #设置缩进宽度为3个空格set HLS #设置搜索结果高亮显示 set mouse=a #设置能使用鼠标操作

4.4 Save exit and open Vim ok!


This article is from the "Stop Thinking" blog, make sure to keep this source http://9110091.blog.51cto.com/9100091/1595659

Configuration summary for Linux (ubuntu12.04) basic services (Network Service, SAMBA,NFS) and Vim editor

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.