简体   繁体   English

如何在 Ubuntu 中离线安装 Mysql-server

[英]How to install Mysql-server in Ubuntu offline

I need to install Mysql-server in an Ubuntu 18 machine which do not have any internet access.我需要在没有任何互联网访问权限的Ubuntu 18机器上安装Mysql-server There are plethora of instruction material exist on this this subject but all they require Ubuntu machine to be online.关于这个主题有大量的说明材料,但它们都需要 Ubuntu 机器在线。

One such documentation can be available here (quite comprehensive though)可以在此处获得这样的文档(尽管相当全面)

https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04 https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04

Any help on offline installation of Mysql-server will be highly helpful.任何关于Mysql-server离线安装的帮助都会非常有帮助。

I suggest you follow this guide on how to use apt-offline.我建议您按照本指南了解如何使用 apt-offline。https://linoxide.com/debian/install-debian-packages-offline/https://linoxide.com/debian/install-debian-packages-offline/

As a general guide:作为一般指南:

You start by having apt-offline installed on both PCs, this is done by default on the desktop releases, but can easily be installed by just downloading the .deb package for your release from the packages.ubuntu.com website: https://packages.ubuntu.com/bionic/all/apt-offline/download您首先在两台 PC 上安装 apt-offline,这是在桌面版本上默认完成的,但只需从 packages.ubuntu.com 网站下载.deb包即可轻松安装: https:// package.ubuntu.com/bionic/all/apt-offline/download

Then create a signature that can be put onto another PC that'll do the downloading/fetching updates and make a note that we also need mysql-server然后创建一个可以放在另一台 PC 上的签名,该 PC 将执行下载/获取更新并记下我们还需要 mysql-server

apt-offline set offline-servers-state.sig --install-packages mysql-server

You can then use this signature on a PC connected to the internet using the same tool to check for updates and/or download the required files into a zip file然后,您可以在连接到 Internet 的 PC 上使用此签名,使用相同的工具检查更新和/或将所需文件下载到 zip 文件中

apt-offline get --bundle zip/file/location/bundle.zip offline-servers-state.sig

Once downloaded you can put this .zip back on the offline server to install the packages下载后,您可以将此.zip放回离线服务器以安装软件包

apt-offline install zip/file/location/bundle.zip

You can visit https://dev.mysql.com/downloads/mysql/ from a computer that can go online.你可以在可以上网的电脑上访问https://dev.mysql.com/downloads/mysql/

Then, select your OS and version然后,选择您的操作系统和版本

MySQL下载页面

Download DEB Bundle on a computer that can go online.在可以上网的电脑上下载DEB Bundle。 Move the downloaded file internally to your system that cannot hit the Internet.将下载的文件在内部移动到无法访问 Internet 的系统。

下载选项

Your downloaded file will be a .tar.您下载的文件将是 .tar。 Use command tar -xvf filename.tar (See https://www.cyberciti.biz/faq/tar-extract-linux/ for command).使用命令tar -xvf filename.tar (有关命令,请参阅https://www.cyberciti.biz/faq/tar-extract-linux/ )。

You will get a new directory.您将获得一个新目录。 cd that-directory will get you in that directory. cd that-directory将使您进入该目录。 You will see a bunch of .deb files.你会看到一堆 .deb 文件。

Install the deb files one by one using sudo apt-get install filename.deb depending on what you want to install.根据您要安装的内容,使用sudo apt-get install filename.deb一一安装 deb 文件。 Other commands to install deb files can be found in this discussion https://unix.stackexchange.com/questions/159094/how-to-install-a-deb-file-by-dpkg-i-or-by-apt .可以在此讨论https://unix.stackexchange.com/questions/159094/how-to-install-a-deb-file-by-dpkg-i-or-by-apt 中找到安装 deb 文件的其他命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM