Helpful Tutorial for Install(Move) a New Linux

Helpful Tutorial for Install(Move) a New Linux

Table of Contents

公司的编译环境是debian 8 (jessie)。系统装在一个500GB的HDD上,数据盘是一个2T的希捷监控盘。

由于近期在运行git status的时候巨慢无比,感觉硬盘快到年头了,但是smartctl正常。

同时由于最早安装系统的时候,只给根目录之分了10GB,其余的都mount到/home目录了(其实没用,用户目录被我链接到了数据盘)。

在后续使用的过程中,根目录经常爆满(使用/tftpboot作为交换目录)。

趁着这次清明节假期,正好把编译环境重新整理一下:

  • Boot Disk: Samsung SSD 850 256GB
  • Data Disks:
    • Seagate 3T -> /data
    • Seagate 2T -> /home
    • Seagate 1T -> /data/sdk
    • Seagete 1T -> /tftpboot
    • WDC 500G ->
    • WDC 500G ->

Install with a netinst CD

由于笔者习惯使用debian,所以直接安装debian的最新版本。

同时netinst容量小,仅具备必须的文件包,自己可以根据需要安装其他的包,非常适合我们这种不需要桌面显示的开发环境。

从debian官网下载netinst安装包:Debian netinst URL

Install additional package

  • vim cscope git sudo ctags tcpdump
  • tftpd-hpa sshd
  • gcc make autoconf cmake autogen bison bc libncursesw5 libtinfo-dev libtool
  • libc6-dev-i386 indent flex
  • linux-headers-`uname -r`
  • parted uuid rsync ntfs-3g
  • net-tools (ifconfig .)
  • u-boot-tools (mkimage)
  • sysstat (iostat)
  • ddclient (DDNS for remote connect)
  • smartmontools (DISK monitor)

Copy data if needed

Copy directory from source to dest

  • -a: 存档模式,等同于-rlptgoD (没有-H,-A,-X)
    • -r: 递归模式
    • -l: 保留符号链接(symlink)
    • -p: 保留权限(permissions)
    • -t: 保留修改时间(modification times)
    • -g: 保留属组(group)
    • -o: 保留所有人(owner)
    • -D: 等效于–devices –specials
      • –device: 保留设备文件
      • –specials: 保留特殊文件
  • -H: 保留硬链接(hard links)
  • -A: 保留ACLs
  • -X: 保留额外属性(extended attributes)
  • –progress: 在传输时显示传输过程

1.7TB的数据拷贝的两天。。。

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.