Oh-my-zsh

  • 安装zsh:$sudo apt-get install zsh
  • 确认zsh安装:$zsh --version
  • 直接用$ sodu vim /etc/passwd更改对应用户所用的shell,将root用户和自己用户(katherine)的shell从bash改为zsh。
  • 注销重新登录
  • 确认zsh是否是默认SHELL,输出/usr/bin/zsh:$echo $SHELL
  • 安装Oh-My-Zsh:$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" (如果提示没安装cur,那么先$ sudo apt-get install curl先安装)
  • Oh-My-Zsh的默认配置文件在~/.zshrc,样式重启终端后生效

.zshrc

在.zshrc上部加入如下内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# LLVM
export LLVM_HOME=${HOME}/LLVM/llvm-30
# export Melton_HOME=${HOME}/LLVM/Melton/build/bin
export Melton_HOME=${HOME}/LLVM/Melton/llvm/Release+Asserts/bin

# PANDA_HOME
export PANDA_HOME=${HOME}/LLVM/preprocess/panda

# BEAR_HOME
export BEAR_HOME=${HOME}/LLVM/preprocess/bear

# Java
# export JAVA_HOME=/home/katherine/Java/jdk1.7.0_80
export JAVA_HOME=${HOME}/Java/jdk1.8.0_181
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

export CATALINA_HOME=${HOME}/Software/apache-tomcat-8.5.35

export MAVEN_HOME=${HOME}/Software/apache-maven-3.6.0

# If you come from bash you might have to change your $PATH.
export PATH=.:${Melton_HOME}:${PANDA_HOME}:${BEAR_HOME}:${HOME}/LLVM/preprocess/bear:${LLVM_HOME}/build/bin:${JAVA_HOME}/bin:${JRE_HOME}/bin:${MAVEN_HOME}/bin:$HOME/bin:/usr/local/bin:$PATH

# node
export N_PREFIX=/usr/local #node实际安装位置
export PATH=$N_PREFIX/bin:$PATH

Vim及其插件配置

1
sudo apt-get install vim

详细配置见:[Vim安装及我喜欢的配置]

apt源

系统:【Ubuntu 18.04】(其他版本请查找源名称)
将系统自带的source.list备份:

1
$ sudo cp /etc/apt/source.list /etc/apt/source.list.back

将内容全部删除,并更新为 阿里 or 中科大 的源:

1
$ sudo vim /etc/apt/source.list

阿里源:

1
2
3
4
5
6
7
8
9
10
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

中科大源:

1
2
3
4
5
6
7
8
9
10
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

更新源:

1
$ sudo apt-get update

nodejs

1.用PPA安装
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install -y nodejs
2.第一种办法由于不能翻墙,或者网速等各种原因,日常失败,这里使用另一中方法。
淘宝镜像手动安装:参考链接
https://npm.taobao.org/mirrors/node/
找到你所需要的版本包,我使用的是https://npm.taobao.org/mirrors/node/v6.12.0/node-v6.12.0-linux-x64.tar.gz
解压,改名,放入指定目录:

1
2
3
$ tar -zxvf node-v6.12.0-linux-x64.tar.gz
$ mv node-v6.12.0-linux-x64 node-v6.12.0
$ mv node-v6.12.0 ~/Software

这个包是已经编译好了的,只需要添加两个软链接:

1
2
$ sudo ln -s /home/katherine/Software/node-v6.12.0/bin/node /usr/local/bin
$ sudo ln -s /home/katherine/Software/node-v6.12.0/bin/npm /usr/local/bin

查看node和npm的版本:

1
2
$ node -v
$ npm -v

GDebi

GDebi能够根据软件库自行解决.deb包的依赖关系。

1
$ sudo apt-get install gdebi

下载.deb安装包后,安装时不要直接双击使用Ubuntu软件中心安装,推荐右键使用GDebi打开安装。

缺少依赖包

首先sudo apt update
从我的安装经验来说,Ubuntu14.04安装时没有这个现象,Ubuntu16.04安装时即使update了,也提示’The following packages hava unmet dependencies’。
那么对于Ubuntu16.04进行如下操作可解决该问题:
1.$ sudo gedit /etc/apt/sources.list
2.将以下内容粘贴到文本的最下方:
deb cdrom:[Ubuntu 16.04.3 LTS Xenial Xerus - Release amd64 (20170801)]/ xenial main restricted
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
3.$ sudo apt update

Git

  • $sudo apt-get install git
  • $ssh-keygen -t rsa -C "email"
  • Key的存储地址为:/home/katherine/.ssh/id_rsa.pub

Oh-my-zsh

  • 安装zsh:$sudo apt-get install zsh
  • 确认zsh安装:$zsh --version
  • 设置zsh为默认shell:$sudo chsh -s $(which zsh)
  • 注销重新登录
  • 确认zsh是否是默认SHELL,输出/usr/bin/zsh:$echo $SHELL
  • 安装Oh-My-Zsh:$sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • Oh-My-Zsh的默认配置文件在~/.zshrc,样式重启终端后生效

SVN

查看是否已经安装svn:

1
$ svn

如果已经安装,可通过下面的命令来卸载:

1
$ sudo apt-get remove --purge subversion

–purge表示彻底删除该软件和相关文件
然后再重新安装svn:

1
$ sudo apt-get install subversion

tree

目录查看工具:

1
sudo apt-get install tree

GTK+环境(包含C/C++环境)

  • gcc/g++/gdb/make等基本编程工具:$sudo apt-get install build-essential
  • libgtk2.0-dev libglib2.0-dev 等开发相关的库文件:$sudo apt-get install gnome-core-devel
  • 用于在编译GTK程序时自动找出头文件及库文件位置:$sudo apt-get install pkg-config
  • 安装 devhelp GTK文档查看程序:$sudo apt-get install devhelp
  • 安装 gtk/glib 的API参考手册及其它帮助文档:$sudo apt-get install libglib2.0-doc libgtk2.0-doc
  • 安装基于GTK的界面GTK是开发Gnome窗口的c/c++语言图形库:$sudo apt-get install glade libglade2-dev$sudo apt-get install glade-gnome glade-common glade-doc`
  • 安装gtk2.0 或者 将gtk+2.0所需的所有文件统通下载安装完毕:$sudo apt-get install libgtk2.0-dev$sudo apt-get install libgtk2.0*

搜狗输入法

  • 在官网下载deb文件,点击进行安装
  • System Settings->Language Support中:Keyboard input method system改选为fcitx(默认为iBus)
  • $fcitx-config-gtk3
    1. Input Method中加入搜狗输入法
    2. Global Config中设置输入法切换快捷键

Markdown软件:ReText

  • $sudo apt-get install retext
  • 顶栏-Edit-Live Preview勾上即可实时预览

Java

  • 下载jdk压缩包(http://www.oracle.com/technetwork/java/archive-139210.html)
  • 解压:$tar -zxvf jdk-8u111-linux-x64.tar.gz
  • 移动到自己想放的位置:$sudo mv jdk1.8.0_111 /home/katherine/Java
  • 设置环境变量:
    1. $sudo gedit ~/.zshrc
    2. export JAVA_HOME=/home/katherine/Java/jdk1.8.0_181
    3. export JRE_HOME=${JAVA_HOME}/jre
    4. export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
    5. export PATH=.:${JAVA_HOME}/bin:${JRE_HOME}/bin:$HOME/bin:/usr/local/bin:$PATH
    6. $source ~/.zshrc
    7. $java -version

CMake

准备工作:官网下载cmake-3.6.3.tar.gz(https://cmake.org/download/)
1.解压文件tar -xvf cmake-3.6.3.tar.gz,并修改文件权限chmod -R 777 cmake-3.6.3
2.检测gcc和g是否安装,如果没有则需安装gcc-g:sudo apt-get install build-essential(或者直接执行这两条命令sudo apt-get install gcc,sudo apt-get install g++)
3.进入cmake-3.6.3 进入命令 cd cmake-3.6.3
4.执行 sudo ./bootstrap
5.执行 sudo make
6.执行 sudo make install
7.执行 cmake –version,返回cmake版本信息,则说明安装成功

LLVM

详见:[LLVM、Clang安装及测试]

MySQL

  • $apt-get install mysql-server
  • $apt-get install mysql-client
  • $apt-get install libmysqlclient-dev
  • $netstat -tap | grep mysql
  • $mysql -u 用户名 -p

SMPlayer

播放器

utServer

aMule