ubuntu server 18.04的安装 以及配置网络还有ssh服务

 

服务器是 dell T420

安装过程中规中矩,其中最关键的是分区部分,由于是服务器,如果磁盘比较大的话,一定要用 uefi + gpt

其次最好是多分一些区,将home 以及一些目录独立出来 实现程序与数据分离

安装完以后需要配置静态的ip

首先一、查看网络配置状态

ifconfig -a
 
二、配置dhcp客户端
修改:/etc/network/interface文件
auto lo
iface lo inet loop back
 
三、配置静态ip
sudo vim /etc/network/interfaces
 

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
address 10.131.252.160
netmask 255.255.254.0
broadcast 10.131.253.255
gateway 10.131.252.1
dns-nameservers 202.120.224.26

auto eno1
iface eno1 inet6 auto

 
四、配置生效
重启一下网络即可
sudo /etc/init.d/networking restart
 
也可以重启网卡:
sudo ifdown eth0
sudo ifup eht0
如果从远端登录的,执行ifdown eth0则会中断连接的。
ping一下网关,通的话说明没有问题
 
之后便需要安装openssh
首先是apt-get update
不行的话需要更换源
vi /etc/apt/source.list

清华大学源(教育网)

  1.  
    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
  2.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
  3.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
  4.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
  5.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
  6.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
  7.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
  8.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
  9.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
  10.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
  11.  
    deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

阿里云源

  1.  
    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
  2.  
    deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
  3.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
  4.  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
  5.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
  6.  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
  7.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial universe
  8.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
  9.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
  10.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
  11.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
  12.  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
  13.  
    deb http://archive.canonical.com/ubuntu xenial partner
  14.  
    deb-src http://archive.canonical.com/ubuntu xenial partner
  15.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
  16.  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
  17.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
  18.  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
 
之后我们就可以安装了   apt-get install openssh-server
 
打开"终端窗口",输入"sudo ps -e |grep ssh"-->回车-->有sshd,说明ssh服务已经启动,如果没有启动,输入"sudo service ssh start"-->回车-->ssh服务就会启动。
 
打开"终端窗口",输入"sudo gedit /etc/ssh/sshd_config"-->回车-->把配置文件中的"PermitRootLogin without-password"加一个"#"号,把它注释掉-->再增加一句"PermitRootLogin yes"-->保存,修改成功。

ubuntu server 18.04的安装 以及配置网络还有ssh服务的更多相关文章

  1. Ubuntu Server 18.04 LTS 安装

    版本:Ubuntu Server 18.04.1 LTS 环境:VMware Workstation 14 Player 下载地址:https://www.ubuntu.com/download/se ...

  2. Ubuntu server 16.04的安装 以及配置(服务器版)

    1.在电脑上下载最新版本的Ubuntu服务器ISO映像,刻录到CD或创建一个可启动的USB盘. 2.视情况而定,进入到服务器的boot界面,把cd或者usb设置为启动第一项 3.开始安装   1)Ub ...

  3. Ubuntu Server 18.04 LTS安装

    Please choose your preferred language. 选择您喜欢的语言 这里直接选择[English] Keyboard configuration 键盘配置 Please s ...

  4. ubuntu server 18.04 单机安装openstack

    https://ubuntu.com/openstack/install#workstation-deployment sudo snap install microstack --classic - ...

  5. 如何在Ubuntu 18.04上安装和配置Apache 2 Web服务器(转)

    如何在Ubuntu 18.04上安装和配置Apache 2 Web服务器 什么是Apache Web Server? Apache或Apache HTTP服务器是一个免费的开源Web服务器,由Apac ...

  6. ubuntu server 18.04 有线网卡默认关闭,需要手工配置才能使用的方法

    1.安装完ubuntu server 18.04 后,笔记本电脑的有线网卡已经识别了,但是没有ip, 并且插上网线后端口灯不亮. 解决方法: 第一步.配置端口链路状态为 up # ip link se ...

  7. 如何在Ubuntu Server 18.04 LTS中配置静态IP地址

    安装Ubuntu Server 18.04后需要分配一个的静态IP地址.先前的LTS版本Ubuntu 16.04使用/etc/network/interfaces文件配置静态IP地址,但是Ubuntu ...

  8. ubuntu server 18.04 lts 终端中文显示为乱码的解决方案

    .最近安装ubuntu server 18.04 lts版本发现系统自带的终端下无论是编辑中文,还是显示中文均出现乱码,还是老毛病, 今天无意中发现通过ssh,远程访问,在windows中安装开源的p ...

  9. VMWare、Ubuntu Server 18.04 共享文件夹

    背景:VMWare选项中配置了共享文件夹,装完Ubuntu Server 18.04在 /mnt/下都没有 hgfs文件夹,更别提共享文件夹了 参考:Ubuntu16.04版安装VMwareTools ...

随机推荐

  1. Linux之目录结构解析

    /    /bin 存放[二进制可执行命令]目录,与usr/bin相比,它是系统性的.主要放置一些系统的必备执行档.例如:cat.cp.chmod df.dmesg.gzip.kill.ls. mkd ...

  2. <crtdbg.h> 的作用

    1.在调试状态下让win程在输出窗口中显示调试信息,可以用_RPTn 宏n为显示参数比如_RPT0(_CRT_WARN,"text"); _RPT1(_CRT_WARN," ...

  3. HTTP协议中PUT和POST使用上的区别

    有的观点认为,应该用POST来创建一个资源,用PUT来更新一个资源:有的观点认为,应该用PUT来创建一个资源,用POST来更新一个资源:还有的观点认为可以用PUT和POST中任何一个来做创建或者更新一 ...

  4. freeRTOS中文实用教程3--中断管理之中断嵌套

    1.前言 最新的 FreeRTOS 移植中允许中断嵌套.中断嵌套需要在 FreeRTOSConfig.h 中设置configKERNEL_INTERRUPT_PRIORITY 和configMAX_S ...

  5. Python3学习笔记12-定义函数及调用

    函数是组织好的,可重复使用的,用来实现单一,或相关联功能的代码段,能提高应用的模块性,和代码的重复利用率 Python提供了许多内建函数,比如print().也可以自己创建函数,这被叫做用户自定义函数 ...

  6. 【转】Visual Studio——多字节编码与Unicode码

    多字节字符与宽字节字符 1) char与wchar_t 我们知道C++基本数据类型中表示字符的有两种:char.wchar_t. char叫多字节字符,一个char占一个字节,之所以叫多字节字符是因为 ...

  7. WebRTC服务器——Licode 环境搭建

    WebRTC服务器--Licode 环境搭建 系统配置 阿里云服务器 Ubuntu 14.04.5 LTS Docker 环境搭建 在一台空的机器上搭建docker环境,先要安装docker,执行下面 ...

  8. eclipse总是自动跳到ThreadPoolExecutor解决办法

    出现这种状况是因为Eclipse默认开启挂起未捕获的异常(Suspend execution on uncaught exceptions),只要关闭此项就可以了. 解决方法:在eclipse中选择W ...

  9. 转载:2.2.4 配置项的单位《深入理解Nginx》(陶辉)

    原文:https://book.2cto.com/201304/19629.html 大部分模块遵循一些通用的规定,如指定空间大小时不用每次都定义到字节.指定时间时不用精确到毫秒. 当指定空间大小时, ...

  10. Android通讯:短信

    Android通讯之短信功能实现: 使用android.telephony.SmsManager对象,可以发送短信和彩信.// 构造回调函数,短信发送结束后,会发出对应的Intent请求Intent ...