ubantu 16.04 config nfs / ssh / proxy

本文详细介绍了如何在Ubuntu系统上配置NFS共享、SSH服务和代理设置。包括NFS服务的安装与配置、SSH服务的启动与端口修改、以及Intel代理的自动与手动配置方法。

一 NFS

1.sudo apt-get install nfs-kernel-server 安装nfs.

2.sudo mkdir /home/share/nfs 建立nfs共享文件夹.

3.sudo vi /etc/exports 配置nfs

在文档的最后一行加入/home/song/nfs *(rw,sync,no_root_squash,no_subtree_check),保存退出。

4.sudo /etc/init.d/rpcbind restart 重启rpcbind

5.sudo /etc/init.d/nfs-kernel-server restart 重启nfs

6.sudo mount -t nfs 10.67.112.182:/home/share/nfs 在目标机中挂载服务器的共享文件夹,把以上指令写到/etc/rc.local 当中可实现开机自动挂载

二 SSH

1. 安装ssh server ,开一个终端输入如下命令:

sudo apt-get install openssh-server

2. 之后,查看ssh 的状态:

sudo service ssh status

3. 你也看要通过修改如下的文件来改变默认的端口等信息的配置:

sudo nano /etc/ssh/sshd_config

On Ubuntu desktop, you may use gedit instead of nano:

4.最后重启服务应用新的配置信息:

sudo service ssh restart

 

三 proxy

1.Ubuntu 12.04 LTS and Newer Automatic Shell Script

The following shell script will set up Intel proxies on Ubuntu. The script has been tested on Ubuntu 12.04, 14.04, 16.04.2, and 18.04, but will probably work on other versions as well. Run it as follows:

 wget --no-proxy --no-check-certificate https://intelpedia.intel.com/images/8/88/Setup_intel_proxy.sh.zip
 unzip Setup_intel_proxy.sh.zip
 chmod +x setup_intel_proxy.sh
 sudo ./setup_intel_proxy.sh

Matthew Fernandez: why does the above script set include 134.134.0.0/16 in no_proxy? At first I thought this was a mistake and it was supposed to be the private rage 172.16.0.0/12 (which is also missing), but after looking up 134.134.0.0/16 it seems this might be a range assigned to Intel in Hillsboro. Is this range universally reachable without a proxy for users outside US?

Proxy Environment Variables to set

Linux/UNIX/MinGW users who are using clients not capable of auto-configuration will want to define these environment variables.

 export http_proxy=http://proxy-chain.intel.com:911
 export https_proxy=http://proxy-chain.intel.com:912
 export ftp_proxy=http://proxy-chain.intel.com:911
 export socks_proxy=http://proxy-us.intel.com:1080
 export no_proxy=intel.com,.intel.com,localhost,127.0.0.1

On OpenSuse or SLES look at /etc/sysconfig/proxy or use yast proxy, on other platforms consider modification of /etc/environment or ~/.bashrc

Manual Configuration

  • Edit the /etc/environment file
 sudo vi /etc/environment
  • Copy the following lines in the file:
 http_proxy=http://proxy-chain.intel.com:911
 https_proxy=http://proxy-chain.intel.com:912
 ftp_proxy=http://proxy-chain.intel.com:911
 socks_proxy=http://proxy-us.intel.com:1080
 no_proxy=intel.com,.intel.com,localhost,127.0.0.1
  • Save the file.
  • Let's make the Proxy available every time that we use sudo
  • Edit the /etc/sudoers file with visudo. To use nano, instead run sudo EDITOR=nano visudo /etc/sudoers.
 sudo visudo -f /etc/sudoers
  • Find entry:
 Defaults        env_reset
  • Below add
 Defaults        env_keep += "http_proxy https_proxy ftp_proxy socks_proxy no_proxy"
  • Edit the /etc/apt/apt.conf file
 sudo vi /etc/apt/apt.conf
  • Add the following lines:
 Acquire::http::proxy "http://proxy-chain.intel.com:911";
 Acquire::https::proxy "http://proxy-chain.intel.com:912";

 

 

 

 

 

 

 

### Ubuntu 16.04 安装、配置与使用教程 #### 准备工作 为了顺利安装Ubuntu 16.04,建议先准备好一个至少8GB容量的U盘作为启动介质。下载官方提供的ISO镜像文件`ubuntu-16.04-desktop-amd64.iso`并利用工具如Rufus将其写入至U盘中创建可引导USB设备。 #### 开始安装过程 当计算机从U盘启动进入Live CD环境后,在桌面环境中会弹出提示询问是否立即尝试不改变硬盘数据的方式体验Ubuntu或是直接开始安装程序。选择后者即正式开启操作系统部署流程[^3]。 对于采用UEFI模式启动的情况,默认设置通常无需调整GRUB位置;而对于BIOS Legacy (MBR) 方式的机器,则可能需要指定将GRUB安装到根目录所在的磁盘分区上以便后续由Windows bootloader管理多系统切换逻辑[^1]。 #### 网络连接设置 完成基本系统的搭建之后,如果遇到无线网络适配器无法正常工作的状况,可以参照特定版本下的预编译二进制驱动包路径定位对应固件资源,并借助命令行执行如下操作来进行本地离线安装: ```bash sudo dpkg -i /path/to/bcmwl-kernel-source_*.deb ``` 这里假设已经提前获取到了适用于目标硬件平台的`.deb`格式软件包副本[^2]。 #### 虚拟机环境下优化集成 针对那些在虚拟化平台上运行Linux实例的需求场景,比如基于VMware Workstation的产品系列,可以通过额外加载Open VM Tools套件增强宿主机同客户机之间的交互协作能力,具体做法涉及移除旧版组件以及重新拉取最新发行版中的相应特性支持库: ```bash sudo apt-get update && \ sudo apt-get dist-upgrade -y && \ sudo apt-get autoremove --purge open-vm-tools* -y && \ sudo apt-get install open-vm-tools open-vm-tools-desktop fuse -y ``` 上述脚本不仅完成了必要的依赖关系更新处理还启用了共享剪贴板等功能从而改善用户体验[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值