1、安装 JDK
sudo apt-get update
sudo apt-get install openjdk-8-jdk
(2)设置环境变量
输入如下命令打开profile文件
$ sudo gedit /etc/profile
在文件末尾追加下面内容
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JRE_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH={JAVA_HOME}/bin:$PATH
然后执行如下命令更新配置
$ source /etc/profile
输入$ echo $JAVA_HOME ,如果输出为openjdk字样表示配置正确
(3)安装一些编译工具
sudo apt install git-core
sudo apt install gnupg
sudo apt install flex
sudo apt install bison
sudo apt install gperf
sudo apt install build-essential
sudo apt install curl
sudo apt install libc6-dev
sudo apt install libssl-dev
sudo apt install libncurses5-dev:i386
sudo apt install libxml2-utils
sudo apt install zlib1g-dev:i386
sudo apt install libx11-dev:i386
sudo apt install libreadline6-dev:i386
sudo apt install libgl1-mesa-dev
sudo apt install g++-multilib
sudo apt install tofrodos
sudo apt install python-markdown
sudo apt install python-mako
sudo apt install x11proto-core-dev
sudo apt install xsltproc
sudo apt install dpkg-dev
7.配置固定ip和连接服务器子网ip(可选)
sudo vim /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0 //eth0 网卡名称。可以用ifconfig查看(最前面的名称)
iface eth0 inet static //eth0 网卡名称。可以用ifconfig查看(最前面的名称)
address 172.16.1.27 //IP地址
netmask 255.0.0.0
gateeay 172.16.1.1
auto eth0:1
iface eth0:1 inet static
address 10.1.1.125 //服务器地址为10.1.1.100,添加个不一样的
netmask 255.0.0.0
gateway 172.16.1.1
sudo vim /etc/resolv.conf \\修改DNS
2 # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 172.16.1.1
nameserver 172.16.1.2
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 202.96.128.86
nameserver 114.114.114.114
8.window使用SecureCRT连接服务器 https://www.aliyun.com/jiaocheng/142298.html
apt-get install openssh-server openssh-client
sudo vim /etc/ssh/ssh_config
取消注释这两行
port 22
protocol 2
复制下面两行没有注释的
# Cipher 3des
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
sudo vim /etc/ssh/sshd_config
粘贴到Protocol 2下方
Protocol 2
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
service sshd restart重启ssh服务
下一篇 samba配置