1.ping
apt-get install iputils-ping -y
2.ifconfig
apt-get install net-tools -y
3.ssh
apt-get install openssh-server -y
#配置
vim /etc/ssh/sshd_config
修改:
#Port 22 为 Port 22
#PermitRootLogin prohibit-password 为 PermitRootLogin yes
#StrictModes yes 为 StrictModes yes
#启动
service ssh start
4.vim
apt-get install vim -y
5.apt-get
apt-get update
6.python3.7
1.下载包&&安装依赖
https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
apt-get install build-essential -y
apt-get install zlib* -y
apt-get install libffi-dev -y
2.解压
tar -zxvf Python-3.7.4.tgz -C /usr/local
3.
cd /usr/local
4.修改文件夹名称
mv Python-3.7.4 python3.7.4
5.
cd python3.7.4
6.
./configure
(如果有提示 please run ./configure --enable-optimizations)
则运行./configure --enable-optimizations 否则略过
7.编译并安装
make && make install
8.测试
python3.7 看看能否进入python3.7
9.修改软连接
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/bin/python3.7 /usr/bin/python
mv /usr/bin/pip /usr/bin/pip.bak
ln -s /usr/local/bin/pip3 /usr/bin/pip
10.测试
python 看看能否进入pyhont3.7
7.时间设置,校验时间
1.安装
apt-get install tzdata -y
2.编辑timezone
vim /etc/timezone
里面内容是:Asia/Shanghai
3.
rm -f /etc/localtime
4.
dpkg-reconfigure -f noninteractive tzdata
8.pip更改源
1.检查pip.conf文件是否存在
ls ~/.pip
有看看里面是否有这个文件,如果没有,自己创建一个
2.修改成阿里云源
vim pip.conf
添加
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
9.中文乱码
1.安装中文包
apt-get install language-pack-zh-hans -y
2.在/etc/environment 添加
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"
3.在/var/lib/locales/supported.d/local 添加
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_CN.GBK GBK
zh_CN GB2312
4.刷新
locale-gen
5.中文空格问题
apt-get install fonts-droid-fallback ttf-wqy-zenhei ttf-wqy-microhei fonts-arphic-ukai fonts-arphic-uming -y
原文:https://blog.youkuaiyun.com/weixin_39792252/article/details/80415550