1、安裝 JDK
sudo apt-get update
sudo apt-get install openjdk-8-jdk
(2)設(shè)置環(huán)境變量
輸入如下命令打開profile文件
$ sudo gedit /etc/profile
在文件末尾追加下面內(nèi)容
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
然后執(zhí)行如下命令更新配置
$ 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和連接服務(wù)器子網(wǎng)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 網(wǎng)卡名稱〔舛猓可以用ifconfig查看(最前面的名稱)
iface eth0 inet static? ? //eth0 網(wǎng)卡名稱坟奥◎谧ィ可以用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? ? ? ? ? ? //服務(wù)器地址為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連接服務(wù)器 https://www.aliyun.com/jiaocheng/142298.html
apt-get install openssh-server openssh-client
sudo vim /etc/ssh/ssh_config
取消注釋這兩行
port 22
protocol 2
復(fù)制下面兩行沒有注釋的
#? 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服務(wù)
下一篇 samba配置