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则所有用户都能使用
vi ~/.bashrc
alias python=’/usr/bin/python3.5’
# 安装 pip 工具 vi ~/.bashrc alias python=’/usr/bin/python3.5’ # 安装 pip 工具 apt-get install python3-pip
# 升级pip
pip install –upgrade pip
# 安装tensorflow,同时安装依赖numpy, protobuf, html5lib, bleach, markdown, werkzeug, tensorflow-tensorboard, enum34 pip install –upgrade pip # 安装tensorflow,同时安装依赖numpy, protobuf, html5lib, bleach, markdown, werkzeug, tensorflow-tensorboard, enum34 pip install tensorflow
# 安装matplotlib
pip install matplotlib
# 安装sklearn pip install matplotlib # 安装sklearn 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
administrator@vsphere.local Passw0rd@test.com.cn
# 开发用虚拟机
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
# 教程