Linux(kali)安装-初始化

1,050 阅读1分钟

Linux安装相关工具初始化

1.更新数据源

vi /etc/apt/source.list

# 阿里云源
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib

# 中科大源
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib 

# 清华大学
deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free

## Debian Main
deb http://ftp.debian.org/debian testing main contrib non-free
deb-src http://ftp.debian.org/debian testing main contrib non-free
## Debian Updates
deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ jessie-updates main contrib non-free
## Debian Security
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

#官方源
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

2.更新系统

apt update && apt upgradde -y && apt dist-upgrade -y

3.安装常用软件

apt install -y qstardict uget htop

4.配置ohmyzsh和vim配置文件

# 生成ssh公钥
ssh-keygen -t rsa

# 下载常用配置文件
git clone git@github.com:BarryPro/shareconf.git

# 克隆cupp密码破解字典
git clone https://github.com/Mebus/cupp.git

# 1.安装zsh
sudo apt install zsh

# 2.导入最新的ohmyzsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

5.把shareconf文件下的配置文件和目录移动到用户home目录下

6.安装输入法

dpkg -i sogou.xxx.deb

apt --fix-broken install

#设置fcitx配置
im-config

7.汉化火狐浏览器

apt -y install firefox-esr-l10n-zh-cn

8.安装docker

#step 1
apt-get update
apt-get install -y apt-transport-https ca-certificates
apt-get install dirmngr

#step 2
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 \
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D

#step 3
echo 'deb https://apt.dockerproject.org/repo debian-stretch main' > \
/etc/apt/sources.list.d/docker.list

#step 4
apt-get update
apt-get install docker-engine  //这一步得等很久。。

#step 5
service docker start //启动docker服务即可

# 允许docker服务开机启动/不启动
update-rc.d docker enable/disabled

9.安装jdk

#1. 解压缩文件并移动至/home/root/module/jdk1.8 注:我的电脑是home单独分区
mkdir -p /home/root/module/jdk1.8
tar -xzvf jdk-8u91-linux-x64.tar.gz -C /home/root/module/jdk1.8
cd /home/root/module/jdk1.8

#3. 设置环境变量
vi ~/.bashrc
# 添加如下内容
# install JAVA JDK
export JAVA_HOME=/home/root/module/jdk1.8
export CLASSPATH=.:${JAVA_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
# 保存退出 :wq
source ~/.bashrc

#4. 安装并注册
update-alternatives --install /usr/bin/java java /home/root/module/jdk1.8/bin/java 1
update-alternatives --install /usr/bin/javac javac /home/root/module/jdk1.8/bin/javac 1

<!--查看当前配置-->
update-alternatives --config java
update-alternatives --config javac

10.配置startdict字典

将其他翻译工具的词库文件(.dict.dz,.dix,.ifo.syn)复制到/usr/share/stardict/dic目录下,就可以用了