个人的Ubuntu16.04装机记录,包括常用的软件的准备和配置等,需要自取。

准备工作

Disable IPv6

sudo vi /etc/sysctl.d/99-sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
sudo sysctl -p
cat /proc/sys/net/ipv6/conf/all/disable_ipv6

原配置文件备份

sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup

新建配置文件

sudo vi /etc/apt/sources.list

输入以下内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
sudo add-apt-repository 'deb https://typora.io/linux ./'
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

更新

sudo apt update && sudo apt upgrade

安装

sudo apt install vim curl git zsh gdebi proxychains typora apt-transport-https gnome-tweak-tool fcitx-googlepinyin gwenview fcitx-anthy python-pip python3-pip aria2 libcanberra-gtk-module p7zip-full vlc-plugin-fluidsynth
sudo apt install texlive-full texmaker
sudo apt install sublime-text

Oh my zsh

chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Shadowsocks-qt5

方法1

mkdir ~/tools && cd ~/tools
wget https://github.com/shadowsocks/shadowsocks-qt5/releases/download/v3.0.1/Shadowsocks-Qt5-3.0.1-x86_64.AppImage

或去github/ss-qt5下载

sudo chmod +x  Shadowsocks-Qt5-3.0.1-x86_64.AppImage

然后自行添加服务器

方法2

sudo add-apt-repository ppa:hzwhuang/ss-qt5 && sudo apt-get update&& sudo apt-get install shadowsocks-qt5

Chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo gdebi google-chrome-stable_current_amd64.deb

然后去系统设置里打开代理,登录Chrome,等Chrome同步结束(假设已经配置完Chrome插件Switchy Omega)后关闭系统代理。

Proxychains

sudo vim /etc/proxychains.conf

将最后一行的socks4 127.0.0.1 8050改为socks5 127.0.0.1 1080
使用方法:
proxychains {指令}

Dropbox

proxychains wget https://linux.dropbox.com/packages/ubuntu/dropbox_2015.10.28_amd64.deb

或者去Dropbox官网下载
sudo gdebi {Dropbox deb包名称}

下载 dropbox daemon

這裏

下载完后,解压缩后的名字应该是 .dropbox-dist, 然后放在个人目录 ~/ 下面即可。

proxychains dropbox start -i

PyCharm-community

sudo snap install pycharm-community --classic

Sublime

Keys

----- BEGIN LICENSE -----
sgbteam
Single User License
EA7E-1153259
8891CBB9 F1513E4F 1A3405C1 A865D53F
115F202E 7B91AB2D 0D2A40ED 352B269B
76E84F0B CD69BFC7 59F2DFEF E267328F
215652A3 E88F9D8F 4C38E3BA 5B2DAAE4
969624E7 DC9CD4D5 717FB40C 1B9738CF
20B3C4F1 E917B5B3 87C38D9C ACCE7DD8
5F7EF854 86B9743C FADC04AA FB0DA5C0
F913BE58 42FEA319 F954EFDD AE881E0B
------ END LICENSE ------

配置

打开Sublime,ctrl + ~,并粘贴运行

import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())

后重启Sublime,ctrl+shift+P,安装AutoPEP8SublimeREPLConvertToUTF8
Sublime Text > Preferences > Package Settings > AutoPep8 > Settings-User中加入:

{
    "settings": {
        "sublimeautopep8": {
            "max-line-length": 79,
            "format_on_save": true,
            "show_output_panel": true,
            "ignore": "E24,E226,E501",
            "syntax_list": ["Python"],
            "file_menu_search_depth": 3
        }
    }
}

Sublime Text> Preferences > Key Bindings 中加入

[
    {
        "keys":["f5"],
        "caption": "SublimeREPL: Python - RUN current file",
        "command": "run_existing_window_command", "args":
        {
            "id": "repl_python_run",
            "file": "config/Python/Main.sublime-menu"
        }
    }

]

Sublime Text> Preferences > Settings 中加入

{
    "font_size": 12,
    "ignored_packages":
    [
        "Vintage"
    ],
    "tab_size": 4,
    "translate_tabs_to_spaces": true
}

WPS

wget http://kdl.cc.ksosoft.com/wps-community/download/6757/wps-office_10.1.0.6757_amd64.deb

或者去WPS-Community下载
sudo gdebi {WPS deb包名称}

网易云音乐

wget http://d1.music.126.net/dmusic/netease-cloud-music_1.1.0_amd64_ubuntu.deb

或者去网易云官网下载,然后
sudo gdebi {网易云deb包名称}

Aria 2

mkdir ~/.config/aria2 && sudo touch ~/Downloads/aria2.session && sudo chmod 777 ~/Downloads/aria2.session && vim ~/.config/aria2/aria2.conf
#=========文件保存目录自行修改
# username根据实际情况修改
dir=/home/kuro/Downloads
disable-ipv6=true

#打开rpc的目的是为了给web管理端用
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
#rpc-listen-port=6800
#断点续传
continue=true
input-file=/home/kuro/Downloads/aria2.session
save-session=/home/kuro/Downloads/aria2.session

#最大同时下载任务数
max-concurrent-downloads=20

save-session-interval=120

# Http/FTP 相关
connect-timeout=120
#lowest-speed-limit=10K
#同服务器连接数
max-connection-per-server=10
#max-file-not-found=2
#最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要
min-split-size=10M
#单文件最大线程数, 路由建议值: 5
split=10
check-certificate=false
#http-no-cache=true

后台运行:

sudo aria2c --conf-path=/home/kuro/.config/aria2/aria2.conf -D

Gnome

插件

到https://extensions.gnome.org/安装以下插件

Dash to Dock
Hide Top Bar
Dynamic Top Bar

主题

https://www.gnome-look.org/

Arc OSX GNOME
下载主题并解压
tar -xzf Arc-OSX-gnome 3.18.tar.gz
sudo mv 'Arc-OSX-gnome 3.18/.' /usr/share/themes

Wine

  1. 安装deepin-wine环境:

    https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu页面下载zip包(或用git方式克隆),解压到本地文件夹,在文件夹中打开终端,输入sudo sh ./install.sh一键安装。

  2. 安装deepin.com应用容器:

    http://mirrors.aliyun.com/deepin/pool/non-free/d/中下载想要的容器,点击deb安装即可。以下为推荐容器:

Dev

Basic

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install build-essential && sudo apt-get autoremove
pip install virtualenv

安装CUDA8

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
sudo apt-get update && sudo apt-get install cuda
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.zshrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.zshrc
source ~/.zshrc

安装cuDNN

tar xvf cudnn-8.0-linux-x64-v5.1.tgz && cd cuda
sudo cp */*.h /usr/local/cuda/include/ && sudo cp */libcudnn* /usr/local/cuda/lib64/
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*

安装 caffe

sudo apt-get install libatlas-base-dev
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler 
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev python-yaml
pip install numpy easydict opencv-python scikit-image protobuf exifread tornado flask

2 Comments

发表评论

电子邮件地址不会被公开。 必填项已用*标注