Ubuntu 入门学习之从安装部署到java环境的安装

这篇博客介绍了在Ubuntu上从安装到部署Java环境的详细步骤,包括使用VMware下载和安装Ubuntu,配置IP地址和SSH服务,学习常用的Linux命令,以及如何安装和配置Java JDK和Tomcat。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

文章目录

linux部署

vmware 中安装Ubuntu

参见Windows10下安装Ubuntu18.04LTS详细教程

VMware 下载

VMware 下载网页
在这里插入图片描述

vmware 许可证:

VMware 2018 v14.x 永久许可证激活密钥
FF31K-AHZD1-H8ETZ-8WWEZ-WUUVA
CV7T2-6WY5Q-48EWP-ZXY7X-QGUWD

Ubuntu 下载

Ubuntu 下载网页
在这里插入图片描述

Ubuntu 的安装教程

参见Windows10下安装Ubuntu18.04LTS详细教程

Ubuntu ip地址的配置

参见Ubuntu 18.04 LTS设置固定ip

NAT 地址配置 需要编辑虚拟网络编辑器和vmnet8;

配置ssh 服务

安装openssh-server
sudo apt-get install openssh-server

在这里插入图片描述
这上面我已经安装过了

查看ssh服务是否启动

sudo ps -e |grep ssh

在这里插入图片描述

出现了sshd 则服务已经启动

如果没有启动 ,则输入sudo service ssh start 就OK

查看或修改配置文件vim /etc/ssh/sshd_config

在这里插入图片描述

默认端口是22
如果要修改的话,将Port 22 前面的#去掉,将22改成你想要设置的端口

使用putty登陆Ubuntu

在这里插入图片描述

接下来的练习,我们将在putty下进行

note:关于使用sudo apt-get install 软件名 出现Unable to lock the administration directory (/var/lib/dpkg/), is another proc错误的解决方案
首先:ps -A | grep apt 查看有关apt 的进程

892 ?        00:00:00 apt.systemd.dai
2516 ?        00:00:00 aptd

执行sudo kill -9 892 杀死进程

Linux 常用命令

内部命令

系统启动时就调入内存,是常驻内存的,所以执行效率高

外部命令

系统的软件功能,用户需要时才从硬盘中读入内存

通过type 命令名称 可以查看 命令的类型
eg:

xiaomo@xiaomoU:~$ type ls
ls is aliased to `ls --color=auto'
xiaomo@xiaomoU:~$ type cd
cd is a shell builtin

cd 就是系统的内部命令
ls 是外部命令

linux 下的帮助命令
man

man 命令 得到的内容比用 help 更多更详细,而且 man 没有内建与外部命令的区分,因为 man 工具是显示系统手册页中的内容,也就是一本电子版的字典,这些内容大多数都是对命令的解释信息,还有一些相关的描述。通过查看系统文档中的 man 也可以得到程序的更多相关信息和 Linux 的更多特性

eg:

man ls

在这里插入图片描述

在尝试上面这个命令时我们会发现最左上角显示“ LS (1)”,在这里,“ LS ”表示手册名称,而“(1)”表示该手册位于第一章节。这个章节又是什么?在 man 手册中一共有这么几个章节

章节数 说明
1 Standard commands (标准命令)
2 System calls (系统调用)
3 Library functions (库函数)
4 Special devices (设备说明)
5 File formats (文件格式)
6 Games and toys (游戏和娱乐)
7 Miscellaneous (杂项)
8 Administrative Commands (管理员命令)
9 其他(Linux特定的), 用来存放内核例行程序的文档。
打开手册之后我们可以通过 pgup 与 pgdn 或者上下键来上下翻看,可以按 q 退出当前页面

info

得到的信息比 man 还要多,info 来自自由软件基金会的 GNU 项目,是 GNU 的超文本帮助系统,能够更完整的显示出 GNU 信息

eg:

info ls

在这里插入图片描述

help

help 命令只能用于内部命令,不能用于外部命令
信息很简陋

eg:

xiaomo@xiaomoU:~$ help cd
cd: cd [-L|[-P [-e]] [-@]] [dir]
    Change the shell working directory.

    Change the current directory to DIR.  The default DIR is the value of the
    HOME shell variable.

    The variable CDPATH defines the search path for the directory containing
    DIR.  Alternative directory names in CDPATH are separated by a colon (:).
    A null directory name is the same as the current directory.  If DIR begins
    with a slash (/), then CDPATH is not used.

    If the directory is not found, and the shell option `cdable_vars' is set,
    the word is assumed to be  a variable name.  If that variable has a value,
    its value is used for DIR.

    Options:
      -L        force symbolic links to be followed: resolve symbolic
                links in DIR after processing instances of `..'
      -P        use the physical directory structure without following
                symbolic links: resolve symbolic links in DIR before
       
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值