美文网首页
虚拟机-Ubuntu配置

虚拟机-Ubuntu配置

作者: guodd369 | 来源:发表于2017-12-08 09:00 被阅读0次

安装Ubuntu Server LTS

安装教程

图-01 图-02 图-03 图-04 图-05 图-06 图-07

网络

ifconfig命令不能使用

1、直接输入:/sbin/ifconfig
2、临时修改环境变量:在shell中输入$export PATH = $PATH:/sbin然后再输入ifconfig命令即可,但是这只是临时更改了shell中的PATH,如果关闭shell,则修改消失,下次还需要重复如上操作。
3、永久修改PATH变量使之包含/sbin路径:打开/etc/profile文件,在其中输入export PATH=$PATH:/sbin,保存并重启X即可,这样一来,PATH路径永久修改成功,以后任何时候只需输入ifconfig命令即可

SSH远程连接

sudo apt-get install openssh-server openssh-client
sudo /etc/init.d/ssh restart

ip配置

方式一:动态ip

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens33
iface ens33 inet dhcp
方式二:静态ip image.png
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
iface ens33 inet static
address 192.168.100.200
gateway 192.168.100.2
netmask 255.255.255.0
dns-nameservers 192.168.100.2
auto ens33

基础配置

文件上传

sudo apt-get install lrzsz

Java环境(JDK)

a.复制jdk-8u65-linux-x64.tar.gz到 ~/Downloads
$>cp /mnt/hgfs/downloads/bigdata/jdk-8u65-linux-x64.tar.gz ~/Downloads
b.tar jdk-8u65-linux-x64.tar.gz
$>cd ~/Downloads
$>ta tar -xzvf jdk-8u65-linux-x64.tar.gz
c.移动到jdk1.8.0_65到/soft下
$>mv ~/Downloads/jdk1.8.0_65 /soft
$>ln -s /soft/jdk-xxx jdk           //创建符号连接
d.配置环境变量
[/etc/environment]
JAVA_HOME=/soft/jdk
PATH="...:/soft/jdk/bin"
e.让环境变量生效
$>source /etc/environment
f.检验安装是否成功
$>java -version

集群搭建

  • 更改hostname
    sudo vi /etc/hostname
  • 配置hosts
    vi /etc/hosts

安装Ubuntu桌面应用

相关文章

网友评论

      本文标题:虚拟机-Ubuntu配置

      本文链接:https://www.haomeiwen.com/subject/ywbsixtx.html