【UI篇】UBUNTU 部署

Ubuntu 部署

  • System Install
  • Setup the login account by root
  • Disable/enable iptables for system
  • Update the apt-get soft source
  • Install vim
  • Set the network name
  • Set login the system with ssh service by secure_CRT

0. 本文参考的材料由于时间过长导致无法在文档中列举出来。如果您发现文章内有您的内容并认为需要删除的话,请您留言,我一定会删除。先行谢过。

1. System Install

  1. 进入系统安装界面,一路下一步就可以,其中硬盘安装模式推荐选择擦除所有。用户名和机器名推荐下面:

login
##2. System initialization
###2.1 设置喜好:terminal

  1. Login system.

open terminal

  1. lock to launcher

lock to Launcher

2.2 Login by root

  1. Enable the root account
    vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
    set greeter-show-manual-login=true
  2. Enable it by echo

echo

  1. Set the root password

ubuntu#passwd root

  1. 解决root account login error;

set /root/.profile modify mesg n for tty -s && mesg n

# sed -i 's/mesg n/tty -s \&\& mesg n/' /root/.profile
  1. Reboot system
# reboot
  1. login by root
    root

2.3 Set the network

  1. Set the network name
  1. vim /etc/default/grub
  2. add “GRUB_CMDLINE_LINUX” after params net.ifnames=0 biosdevname=0
  3. Update-grub update the grub config
  4. reboot the system
  5. ifconfig check the network name
  1. Set the network config
auto eth0
iface eth0 inet static
netmask 255.255.0.0
gateway 10.0.0.1
address 10.0.10.210
  1. Restart the network
    Service networking restart
  2. Check the network status
    ifconfig

3. Soft server install

3.1 apt-get source update

  1. 更新apt-get source
    https://www.linuxidc.com/Linux/2017-11/148627.html
  2. 寻找国内镜像源
    https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

llink

  1. 修改source list

list
check

  1. 更新源
    不报错则通过

pass by no issues

  1. 测试

check with apt-get

  1. Comand for apt-get
sudo apt-get update  更新源
sudo apt-get install package 安装包
sudo apt-get remove package 删除包
sudo apt-cache search package 搜索软件包
sudo apt-cache show package  获取包的相关信息,如说明、大小、版本等
sudo apt-get install package --reinstall  重新安装包
sudo apt-get -f install  修复安装
sudo apt-get remove package --purge 删除包,包括配置文件等
sudo apt-get build-dep package 安装相关的编译环境
sudo apt-get upgrade 更新已安装的包
sudo apt-get dist-upgrade 升级系统
sudo apt-cache depends package 了解使用该包依赖那些包
sudo apt-cache rdepends package 查看该包被哪些包依赖
sudo apt-get source package  下载该包的源代码
sudo apt-get clean && sudo apt-get autoclean 清理无用的包
sudo apt-get check 检查是否有损坏的依赖

3.2 Install vim

  1. Command
    apt-get install vim
  2. Setup vim
    /etc/vim/vimrc
" Only do this part when compiled with support for autocommands
if has("autocmd")
  augroup redhat
  autocmd!
  " In text files, always limit the width of text to 78 characters
  autocmd BufRead *.txt set tw=78
  " When editing a file, always jump to the last cursor position
  autocmd BufReadPost *
  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
  \   exe "normal! g'\"" |
  \ endif
  " don't write swapfile on most commonly used directories for NFS mounts or USB sticks
  autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
  " start with spec file template
  autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
  augroup END
endi

3.4 Install wireshark

  1. Command
    apt-get install wireshark
  2. Setup ssh
记得中间选择yes
修改/etc/wireshark/init.lua 中的disable_lua=false为 disable_lua = true  就可以了,这样就不会显示Lua错误
  1. restart service
    service sshd restart
  2. setup when the system is reboot
    vim /etc/rc.local

3.3 enable login root by ssh

1. Install the openssh-server

root@Robot-F:~# apt install openssh-server

2. Setup the sshd-config

PermitRootLogin yes

3. Enable the ssh server
在这里插入图片描述

4. Disable/enable iptables

  1. Disable iptables
    这里写图片描述
  2. Enable iptables
    ufw enable
  3. uninstall iptables
    apt-get remove iptables
  4. Other iptables command
    iptables -P INPUT ACCEPT
    iptables -P FORWARD ACCEPT
    iptables -P OUTPUT ACCEPT
    iptables -F
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞翔的荷兰人seven

启航:欢迎乘坐飞翔的荷兰人

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值