1 Ubuntu 16.04 系統基礎環境配置
1.1 安裝ssh服務
apt-get update
# 安裝ssh服務器
apt-get install openssh-server
# 重啓服務
service ssh restart
# 檢查服務是否啓動
sudo ps -e |grep ssh
# 允許root用戶採用遠程密碼登陸
# PermitRootLogin prohibit-password
$ PermitRootLogin yes
1.2 更新源替換
源文件位置
vi /etc/apt/source.list
# vi下批量替換命令,注意網址中的/用\轉義
:1,$s///g
# 北科校內ubuntu源地址
ftp://ftp.ustb.edu.cn/pub/ubuntu
# 簡單的整個文件替換
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial main restricted
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial main restricted## Major bug fix updates produced after the final release of the
## distribution.
deb ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial-updates main restricted
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial universe
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial universe
deb ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial-updates universe
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial multiverse
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial multiverse
deb ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial-updates multiverse
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial-updates multiverse## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu/ xenial-backports main restricted universe multiverse## Uncomment the following two lines to add software from Canonical’s
## ‘partner’ repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partnerdeb ftp://ftp.ustb.edu.cn/pub/ubuntu xenial-security main restricted
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu xenial-security main restricted
deb ftp://ftp.ustb.edu.cn/pub/ubuntu xenial-security universe
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu xenial-security universe
deb ftp://ftp.ustb.edu.cn/pub/ubuntu xenial-security multiverse
# deb-src ftp://ftp.ustb.edu.cn/pub/ubuntu xenial-security multiverse
1.2 更換pip源
- cd ~
mkdir .pip
vi .pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
1.3 vi編輯器錯誤
- # 問題描述:無法進入插入模式,方向鍵鍵碼變成ABCD,退格鍵無法使用。
vi /etc/vim/vimrc.tiny
# set compatible
set nocompatible
set backspace=2
# 由於默認安裝的是vi,可以嘗試安裝完整版vim,並使用別名。
1.4 python相關
- # 配置系統默認python版本,採用別名方法,僅對當前用戶有效,添加到 /etc/profile則所有用戶都能使用
apt-get install python3-pip
# 升級pip
pip install tensorflow
# 安裝matplotlib
pip install sklearn
# 安裝scipy
$ pip install scipy
1.5 系統配置
總核數 = 物理CPU個數 X 每顆物理CPU的核數
# 總邏輯CPU數 = 物理CPU個數 X 每顆物理CPU的核數 X 超線程數
# 查看物理CPU個數
cat /proc/cpuinfo| grep “physical id”| sort| uniq| wc -l# 查看每個物理CPU中core的個數(即核數)
cat /proc/cpuinfo| grep “cpu cores”| uniq# 查看邏輯CPU的個數
cat /proc/cpuinfo| grep “processor”| wc -l# 查看CPU信息(型號)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
1.6 時區
- # 查看當前時間
date -R
# 查看機器時鐘信息
timedatectl
# 修改時區
dpkg-reconfigure tzdata
1.7 安裝虛擬環境
- # 安裝虛擬環境工具
pip3 install virtualenv
# 創建一個虛擬環境
mkdir /var/virtualenvs
cd /var/virtualenvs
virtualenv py3virv
# 啓動虛擬環境
source py3virv/bin/activate
# 配置虛擬環境
cd py3virv/bin
# 刪除原有python->python2.7軟連接
rm -rf python
# 添加一條軟連接
ln -s /usr/bin/python3.5 /var/virtualenvs/py3virv/bin/python
ln -s /usr/bin/pip3 /var/virtualenvs/py3virv/bin/pip
# 推出虛擬環境
deactivate
1.8 掛載U盤
- # U盤格式化FAT,可以在dev下查看可能的盤符
muont /dev/sdc1 /mnt/usb
- windows 軟件
2.1 Chrome
- # 主頁主題
Momentum
# 廣告屏蔽
uBlock Origin
# 瀏覽器時鐘
酷時鐘
# 主題
House Stark - Winter Is Coming
2.2 VMware Workstation 14
- # 激活密鑰
CG54H-D8D0H-H8DHY-C6X7X-N2KG6
ZC3WK-AFXEK-488JP-A7MQX-XL8YF
AC5XK-0ZD4H-088HP-9NQZV-ZG2R4
ZC5XK-A6E0M-080XQ-04ZZG-YF08D
ZY5H0-D3Y8K-M89EZ-AYPEG-MYUA8
2.3 帳號密碼
2.3.1 3樓機房虛擬集羣
- # 遠程桌面
202.204.62.18 user Passw0rd
# 管控服務器
https://192.168.10.65/vsphere-client/?csp
[email protected] [email protected]
# 開發用虛擬機
202.204.62.73
root micl1203
2.4 VPN
用戶 [_zde] 的配置信息:
I P : 66.98.122.176
端口 : 8081
密碼 :
加密 : aes-128-ctr
協議 : auth_aes128_md5
混淆 : tls1.2_ticket_auth_compatible
設備數限制 : 0(無限)
單線程限速 : 0 KB/S
用戶總限速 : 0 KB/S
禁止的端口 : 無限制已使用流量 : 上傳: 0 B + 下載: 0 B = 0 B
剩餘的流量 : 125.00 GB
用戶總流量 : 125.00 GBSSR 鏈接 : ssr://NjYuOTguMTIyLjE3Njo4MDgxOmF1dGhfYWVzMTI4X21kNTphZXMtMTI4LWN0cjp0bHMxLjJfdGlja2V0X2F1dGg6ZW1oaGJtZGtaV1Z1
SSR 二維碼 : http://doub.pw/qr/qr.php?text=ssr://NjYuOTguMTIyLjE3Njo4MDgxOmF1dGhfYWVzMTI4X21kNTphZXMtMTI4LWN0cjp0bHMxLjJfdGlja2V0X2F1dGg6ZW1oaGJtZGtaV1Z1v6 N6.TERRANCE.TOP
# 教程