linux apt 安装mysql tomcat git maven

这篇博客详细介绍了如何在Linux环境下安装MySQL、设置数据库,允许远程访问,接着讲解了Tomcat的安装及验证,Git的安装与配置,以及Maven的安装和环境变量配置。此外,还探讨了Ubuntu软件的默认安装路径。
摘要由CSDN通过智能技术生成

mysql安装

#先查询mysql

webrx@us:~$ sudo apt search mysql-server
正在排序... 完成
全文搜索... 完成  
default-mysql-server/focal 1.0.5ubuntu2 all
  MySQL database server binaries and system database setup (metapackage)

default-mysql-server-core/focal 1.0.5ubuntu2 all
  MySQL database server binaries (metapackage)

mysql-server/focal-updates,focal-security 8.0.27-0ubuntu0.20.04.1 all
  MySQL database server (metapackage depending on the latest version)

mysql-server-8.0/focal-updates,focal-security 8.0.27-0ubuntu0.20.04.1 amd64
  MySQL database server binaries and system database setup

mysql-server-core-8.0/focal-updates,focal-security 8.0.27-0ubuntu0.20.04.1 amd64
  MySQL database server binaries

#安装mysql

sudo apt install mysql-server -y

#查看mysql服务
webrx@us:~$ sudo systemctl status mysql
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; ven>
     Active: active (running) since Mon 2021-12-20 10:52:57 CST; 2mi>
   Main PID: 5142 (mysqld)
     Status: "Server is operational"
      Tasks: 37 (limit: 4583)
     Memory: 355.5M
     CGroup: /system.slice/mysql.service
             └─5142 /usr/sbin/mysqld

12月 20 10:52:56 us systemd[1]: Starting MySQL Community Server...
12月 20 10:52:57 us systemd[1]: Started MySQL Community Server.
lines 1-12/12 (END)

#查看进程号
webrx@us:~$ ps -ef | grep mysql
mysql       5142       1  0 10:52 ?        00:00:01 /usr/sbin/mysqld
webrx       5761    1214  0 10:55 pts/0    00:00:00 grep --color=auto mysql

#登录mysql
webrx@us:~$ sudo mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.27-0ubuntu0.20.04.1 (Ubuntu)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

mysql> select version();
+-------------------------+
| version()               |
+-------------------------+
| 8.0.27-0ubuntu0.20.04.1 |
+-------------------------+
1 row in set (0.00 sec)

mysql> show databases;
+--------------------+
| Database           
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值