admin管理员组

文章数量:1604931

次更新扩充一下内容,系统版本是Manjaro 24.0,增加图片,以及安装系统过程,增加了一些常用的软件,另外有些网站的域名也发生了变化,这次一并更新。

目录

1 系统安装篇

1.1 安装VMWare Workstation Pro 17.5

1.2 下载Manjaro 24.0安装镜像

1.3 虚拟机安装Manjaro 24.0

2 系统初始化篇

2.1 开启SSH远程操作

​2.2 换源与更新

2.3 安装防火墙

2.4 安装vim

2.5 安装GCC

2.6 安装make

2.7 安装curl

2.8安装输入法

3 虚拟机安装篇

3.1 安装VMWare Workstation Pro 17.6 For Linux

4 开发环境安装篇

4.1 安装JDK8

4.2 安装Node.js

4.3 安装SVN

4.4 安装Git

4.5 安装Redis

4.6 安装Nginx

4.7 安装MongoDB

4.8 安装Python3

5 数据库安装篇

5.1 安装MySQL 5.7

5.2 安装PostgreSQL-15

6 压缩软件安装篇

6.1 安装7zip

6.2 安装zip

7 浏览器安装篇

7.1 安装Edge浏览器

7.2 安装Chrome

8. 开发辅助工具安装篇

8.1 安装Another Redis Desktop Manager

8.2 安装SSH工具electerm

8.3 安装FTP/SFTP工具FileZilla

8.4 安装VS Code

9 办公软件安装篇

9.1 安装百度网盘

9.2 安装WPS

9.3 安装微信

9.4 安装QQ

9.5 安装钉钉

9.6 安装迅雷

9.7 安装本地文件搜索软件

9.7.1 Fsearch

9.8 安装PDF阅读器Okular

10 影音软件安装篇

10.1 安装视频/音频播放器

10.1.1 SMPlayer

10.1.2 VLC

10.2 安装网络音乐播放器

10.2.1 QQ音乐

10.2.2 网易云音乐

10.3 安装图片软件

10.3.1 nomacs

10.3.2 Gwenview

11 格式软件安装篇

11.1 安装mkvtoolnix

11.2 安装格式转换工具

11.2.1 ffmpeg

11.2.2 Curlew

12 硬件工具安装

12.1 安装烧录工具

12.1.1 balenaEtcher(可烧录Linux,不能烧录Windows)

12.1.2 WoeUSB(可烧录Windows,不能烧录Linux)

13 远程工具安装篇

13.1 安装桌面远程工具

13.1.1 ToDesk(有bug)

13.1.2 向日葵命令行

13.2 安装内网穿透工具

13.2.1 nattunnel(收费)

13.3 安装异地组网工具

13.3.1 openlink/zerotier(收费)(不能保证一定成功)

13.3.2 蒲公英(收费)

14 模拟器篇

14.1 安卓模拟器


1 系统安装篇

1.1 安装VMWare Workstation Pro 17.5

VMWare Workstation Pro 17.5允许个人用户免费用于学习,默认自行安装完成,由于VMWare已经被博通收购,所以下载前需要注册成功博通的账号,并且处于登录状态,下载地址如下

Please select your identity provider. - Support Portalhttps://support.broadcom/group/ecx/productdownloads?subfamily=VMware+Workstation+Pro

1.2 下载Manjaro 24.0安装镜像

官网下载页面地址

Download x86 – Manjarohttps://manjaro/products/download/x86/Manjaro 24.0镜像直接下载地址,我这里选了GNOME桌面
https://download.manjaro/gnome/24.0.8/manjaro-gnome-24.0.8-240908-linux69.iso

1.3 虚拟机安装Manjaro 24.0

Manjaro反而建议打开3D加速,否则很容易黑屏 

开始安装

虚拟机关机,去掉安装介质,虚拟机重新开机

安装完成

2 系统初始化篇

2.1 开启SSH远程操作

VMWare Tools在安装Manjaro 24.0时已自动安装

打开终端,输入ip addr查看ip地址

​开启ssh

sudo systemctl start sshd;
sudo systemctl enable sshd;

使用远程工具,远程成功

​2.2 换源与更新

配置镜像源

sudo pacman-mirrors -i -c China -m rank

更新系统

sudo pacman -Syyu --noconfirm

安装yay base-devel

sudo pacman -S --noconfirm yay base-devel

yay技巧,碰到下载不下来的包,可以手动下载,放到~/.cache/yay/对应包下

2.3 安装防火墙

sudo pacman -S  --noconfirm ufw

放开22端口,重新加载防火墙

sudo ufw allow 22/tcp;
sudo ufw reload;

启用防火墙

sudo ufw enable;

2.4 安装vim

sudo pacman -S --noconfirm vim

2.5 安装GCC

sudo pacman -S --noconfirm gcc;

2.6 安装make

sudo pacman -S --noconfirm make;

2.7 安装curl

sudo pacman -S --noconfirm curl;

2.8安装输入法

sudo pacman -S --noconfirm fcitx5 fcitx5-chinese-addons fcitx5-configtool fcitx5-gtk fcitx5-qt fcitx5-material-color fcitx5-pinyin-zhwiki fcitx5-config-qt
yay -S --noconfirm fcitx5-pinyin-sougou fcitx5-sogou

然后配置

fcitx5 &
export QT_IM_MODULE=fcitx5
export GTK_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

重启,点击右上角拼音配置

3 虚拟机安装篇

3.1 安装VMWare Workstation Pro 17.6 For Linux

用于在Linux中使用无法兼容的Windows应用

下载地址和1中是一样的,就是要选不同的下载项

Please select your identity provider. - Support Portalhttps://support.broadcom/group/ecx/productdownloads?subfamily=VMware+Workstation+Pro

安装前VMWare Workstation Pro For Linux务必要先安装gcc

安装依赖

yay -S --noconfirm fuse2 gtkmm  pcsclite libcanberra
yay -S --noconfirm --needed ncurses5-compat-libs

查看内核版本

uname -r

查找对应版本headers

sudo pacman -Ss linux-headers

但是没有6.9版本的headers,因此需要降级到6.6(另外VMWare 17.6,貌似最高只支持到6.9)

sudo mhwd-kernel -i linux66

开机的时候按住 Shift 键,会出现启动菜单,选择 Manjaro Linux 的高级选项 回车:

查看内核版本

uname -r

卸载6.9版本内核

sudo pacman -R linux69
sudo pacman -R linux69-headers
sudo pacman -R linux69-extramodules

重启,安装headers

sudo pacman -S linux66-headers
sudo chmod +x VMware-Workstation-Full-17.6.0-24238078.x86_64.bundle;
sudo ./VMware-Workstation-Full-17.6.0-24238078.x86_64.bundle;

进入控制台,找到VMWare,开始安装,安装过程同Windows

如果碰到

Before you canrun VMware, several modules must be compiled andloaded into the running kernel.

需要重启一下虚拟机,再次打开VMWare,安装install

如果在虚拟机中开虚拟机,需要把虚拟机的CPU下几个选项勾上 

4 开发环境安装篇

4.1 安装JDK8

sudo pacman -S --noconfirm jdk8-openjdk

4.2 安装Node.js

node14和npm6,版本已不再更新,这里是为了适配ruoyi-cloud,仍使用旧版本

sudo curl -o- https://raw.githubusercontent/nvm-sh/nvm/v0.39.7/install.sh | bash;

如果不行,试试

sudo curl -o- https://raw.gitmirror/nvm-sh/nvm/v0.39.7/install.sh | bash;

如果还不行,补一个文件

https://pan.baidu/s/1g1xY21ZrMcOLTZX9S2WVXA?pwd=f9kd

创建~/.nvm文件夹

mkdir ~/.nvm

下载后上传里面的nvm.sh文件和bash_completion,到~/.nvm文件夹下,执行

vim ~/.bash_profile

插入

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"

执行

source ~/.bash_profile

安装nodejs14

nvm install 14;

查看安装情况

node -v;
npm -v;

配置npm源,阿里云的镜像站域名已经发生变化

# npm淘宝源
npm config set registry https://registry.npmmirror;
# npm官方源
npm config set registry https://registry.npmjs;
 
# 安装yarn 并设置为淘宝源
npm install -g yarn;
yarn config set registry https://registry.npmmirror -g;
yarn config set sass_binary_site https://cdn.npmmirror/dist/node-sass -g;
 
# 安装cnpm 并设置为淘宝源
npm install -g cnpm -registry=https://registry.npmmirror;
 
# 安装vue脚手架3
cnpm install -g @vue/cli@3;

4.3 安装SVN

sudo pacman -S --noconfirm subversion

4.4 安装Git

sudo pacman -S --noconfirm git

4.5 安装Redis

sudo pacman -S --noconfirm redis

修改配置文件

sudo vim /etc/redis/redis.conf

如果要远程访问

bind改为0.0.0.0,允许所有IP访问,protected-mode改为no,重启Redis

重启Redis,开机自启动Redis

sudo systemctl restart redis;
sudo systemctl enable redis;

防火墙放开6379端口

sudo ufw allow 6379/tcp;
sudo ufw reload;

宿主机测试成功

4.6 安装Nginx

sudo pacman -S --noconfirm nginx

修改配置文件

sudo vim /etc/nginx/nginx.conf;

重启Nginx,开机自启动Nginx

sudo systemctl restart nginx;
sudo systemctl enable nginx;

防火墙放开80端口

sudo ufw allow 80/tcp;
sudo ufw reload;

4.7 安装MongoDB

yay -S --noconfirm mongodb70-bin

启动MongoDB,开机自启动MongoDB

sudo systemctl start mongodb;
sudo systemctl enable mongodb;

创建用户

mongosh

切换数据集

use admin

创建用户

db.createUser({
	user:"user",
    pwd:"user",
    roles:["root"]
})

修改配置文件,允许远程访问,bindIp改成0.0.0.0

sudo vim /etc/mongodb.conf

sudo systemctl restart mongodb;

防火墙放开27017端口

sudo ufw allow 27017/tcp;
sudo ufw reload;

宿主机测试成功 

4.8 安装Python3

安装Python3和pip3

yay -S --noconfirm python3
yay -S --noconfirm python-pip

查看安装是否成功

python3;
pip3 -V;

加快速度可以换源

pip3 config set global.index-url https://mirrors.aliyun/pypi/simple/

5 数据库安装篇

5.1 安装MySQL 5.7

https://dev.mysql/downloads/mysql/https://dev.mysql/downloads/mysql/

下载Linux Generic版Tar包 解压

移动解压好的mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz 到 /usr/local/mysql

sudo mkdir /usr/local/mysql
tar -zvxf mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz
sudo cp -r ./mysql-5.7.44-linux-glibc2.12-x86_64/* /usr/local/mysql/
sudo mkdir /usr/local/mysql/data

安装依赖

sudo pacman -S --noconfirm libxcrypt-compat
yay -S --noconfirm numactl
yay -S --noconfirm ncurses5-compat-libs

创建用户组

cd /usr/local
sudo groupadd mysql
sudo useradd -r -g mysql mysql
sudo chown -R mysql mysql/
sudo chgrp -R mysql mysql/

创建配置文件

sudo vim /etc/myf

插入如下配置

[client]
default-character-set=utf8
port = 3306
socket = /tmp/mysql.sock

[mysql]
default-character-set=utf8
port = 3306
socket = /tmp/mysql.sock

[mysqld]
character_set_server=utf8
init_connect='SET NAMES utf8'
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
log-error=/var/log/mysqld.log


#不区分大小写
lower_case_table_names = 1
sql_mode=STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,  NO_ENGINE_SUBSTITUTION
max_connections=5000
default-time_zone = '+8:00'

#开启查询缓存

explicit_defaults_for_timestamp=true`在这里插入代码片`

skip-grant-tables

其中skip-grant-tables这个选项可以跳过默认密码。初始化的时候不会创建一个临时密码。登录的时候直接回车登录。(但是也不一定,我实践的时候还是有临时密码,最好记录下临时密码)

sudo chmod 777 /etc/myf

创建各种文件

sudo touch /var/log/mysqld.log
sudo chmod 777 /var/log/mysqld.log

创建数据库

cd /usr/local/mysql
sudo bin/mysqld --initialize --user=mysql

最后会生成一个临时密码,记录下来,以防万一,skip-grant-tables在实践中没有生效,比如这次是zCJuRys!_01H

启动

sudo /usr/local/mysql/support-files/mysql.server start

进入root

cd /usr/local/mysql
bin/mysql -u root -p

修改root密码,允许root用户外部访问MySQL

(实际生产中千万不要这么用,非常危险,仅用来测试通信情况)

ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
flush privileges;
exit;

在/etc/systemd/system 下创建 mysqld.service 文件

sudo vim /etc/systemd/system/mysqld.service

写入如下

[Unit]
Description = mysql
After = network.target

[Service]
Type = forking
ExecStart = /usr/local/mysql/support-files/mysql.server start
ExecStop  = /usr/local/mysql/support-files/mysql.server stop

[Install]
WantedBy = multi-user.target

设置开机启动

sudo systemctl enable mysqld
sudo systemctl daemon-reload

重启,查看状态

sudo systemctl status mysqld

防火墙放开3306端口

sudo ufw allow 3306/tcp;
sudo ufw reload;

宿主机测试成功

5.2 安装PostgreSQL-15

wget https://ftp.postgresql/pub/source/v15.8/postgresql-15.8.tar.gz;
tar -xzvf postgresql-15.8.tar.gz;
cd postgresql-15.8/
./configure
make -j18
sudo make install

创建用户和用户组

sudo groupadd postgres
sudo useradd -r -g postgres postgres
sudo passwd postgres

增加sudoer权限

sudo vim /etc/sudoers
 postgres ALL=(ALL:ALL) ALL

创建数据目录

sudo mkdir /usr/local/pgsql/data
sudo chown postgres /usr/local/pgsql/data
sudo mkdir /home/postgres

切换到 postgres 操作系统用户

su - postgres

初始化数据库

/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

启动数据库

/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start

写入配置

sudo vim /etc/profile.d/postgresql.sh
export PATH=$PATH:/usr/local/pgsql/bin

创建service文件

sudo vim /usr/lib/systemd/system/postgresql.service
[Unit]
Description=PostgreSQL database server
After=network.target
[Service]
Type=forking

User=postgres
Group=postgres
OOMScoreAdjust=-1000
Environment=PGDATA=/usr/local/pgsql/data
Environment=PGPORT=5432

ExecStart=/usr/local/pgsql/bin/pg_ctl start -D ${PGDATA} -l ${PGDATA}/logfile -s -o "-p ${PGPORT}" -w -t 300 
ExecStop=/usr/local/pgsql/bin/pg_ctl stop -D ${PGDATA} -l ${PGDATA}/logfile -s -m fast
ExecReload=/usr/local/pgsql/bin/pg_ctl reload -D ${PGDATA} -l ${PGDATA}/logfile -s

TimeoutSec=300

[Install]
WantedBy=multi-user.target
sudo chmod a+x  /usr/lib/systemd/system/postgresql.service
sudo systemctl enable postgresql.service
sudo systemctl start postgresql.service

进入pgsql

/usr/local/pgsql/bin/psql

进入后执行SQL

(实际生产中千万不要用户名密码同名,非常危险,仅用来测试通信情况)

ALTER USER postgres WITH PASSWORD 'postgres';
# 退出
exit;

修改配置文件,允许远程访问

sudo vim /usr/local/pgsql/data/postgresql.conf

在port = 5432 前加上一行 listen_addresses = '*'

sudo vim /usr/local/pgsql/data/pg_hba.conf

 Ipv4认证,地址改为0.0.0.0/0,METHOD改为md5,重启postgresql

sudo systemctl restart postgresql

 防火墙放开5432端口

sudo ufw allow 5432/tcp;
sudo ufw reload;

重启,宿主机测试成功

6 压缩软件安装篇

6.1 安装7zip

sudo pacman -S --noconfirm p7zip;

6.2 安装zip

sudo pacman -S --noconfirm zip unzip;

7 浏览器安装篇

7.1 安装Edge浏览器

yay -S --noconfirm microsoft-edge-stable-bin

7.2 安装Chrome

yay -S --noconfirm google-chrome

8. 开发辅助工具安装篇

8.1 安装Another Redis Desktop Manager

一个开源的Redis可视化工具。GitHub上下载发行版

Releases · qishibo/AnotherRedisDesktopManager · GitHub🚀🚀🚀A faster, better and more stable Redis desktop manager [GUI client], compatible with Linux, Windows, Mac. - Releases · qishibo/AnotherRedisDesktopManagerhttps://github/qishibo/AnotherRedisDesktopManager/releasesLinux的软件包格式为AppImage。获取最新AppImage包,然后传入虚拟机,或者使用wget

wget https://github/qishibo/AnotherRedisDesktopManager/releases/download/v1.6.6/Another-Redis-Desktop-Manager.1.6.6.AppImage;

安装

sudo chmod u+x Another-Redis-Desktop-Manager.1.6.6.AppImage;

执行,一定要加--no-sandbox

./Another-Redis-Desktop-Manager.1.6.6.AppImage --no-sandbox

如果要添加到桌面或者启动栏,按以下步骤

把appimage解压

./Another-Redis-Desktop-Manager.1.6.6.AppImage --appimage-extract

进入目录,找到desktop文件,编辑,把Exec后改成Appimage的地址,图片地址改成解压后的图标地址,最好复制到其他目录,Ctrl+S保存

复制到桌面,允许运行

cp another-redis-desktop-manager.desktop ~/桌面/another-redis-desktop-manager.desktop;

复制到菜单

sudo cp ~/桌面/another-redis-desktop-manager.desktop /usr/share/applications/AnotherRedisDesktop.desktop;

8.2 安装SSH工具electerm

yay -S --noconfirm electerm-bin

8.3 安装FTP/SFTP工具FileZilla

yay -S --noconfirm filezilla

8.4 安装VS Code

yay -S --noconfirm code

9 办公软件安装篇

9.1 安装百度网盘

yay -S --noconfirm baidunetdisk-bin

9.2 安装WPS

yay -S --noconfirm wps-office-cn
yay -S --noconfirm wps-office-mui-zh-cn

wps有可能会报缺字体,缺的字体如下,双击安装

https://pan.baidu/s/1oAPIXFwEWDLsTJtnQOAhbQ?pwd=ysvw

也可以使用命令安装

sudo cp *.ttf /usr/share/fonts/;
sudo fc-cache -fv;

9.3 安装微信

UOS版微信

yay -S --noconfirm wechat-uos-qt

9.4 安装QQ

yay -S --noconfirm linuxqq

9.5 安装钉钉

yay -S --noconfirm dingtalk-bin

9.6 安装迅雷

yay -S --noconfirm xunlei-bin

9.7 安装本地文件搜索软件

9.7.1 Fsearch

yay -S --noconfirm fsearch

9.8 安装PDF阅读器Okular

其实目前主流浏览器都支持查看PDF,包括Chrome,Edge,Firefox

yay -S --noconfirm okular

10 影音软件安装篇

10.1 安装视频/音频播放器

10.1.1 SMPlayer

yay -S --noconfirm smplayer

10.1.2 VLC

yay -S --noconfirm vlc

10.2 安装网络音乐播放器

10.2.1 QQ音乐

官网下载QQ音乐AppImage版本

QQ音乐下载页 - QQ音乐,音乐你的生活!QQ音乐最新版官方下载。最全的高品质正版音乐曲库,任你免费试听下载。最新最热的排行榜、歌单、电台、MV天天推荐,智能音乐搜索、猜你喜欢帮你轻松发现音乐,歌词翻译、免费空间背景音乐,尽在QQ音乐。https://y.qq/download/download.html

安装

sudo chmod u+x qqmusic-1.1.7.AppImage;

执行,一定要加--no-sandbox

./qqmusic-1.1.7.AppImage --no-sandbox

 如果要添加到桌面或者启动栏,按以下步骤

把appimage解压

./qqmusic-1.1.7.AppImage --appimage-extract

进入目录,找到desktop文件,编辑,把Exec后改成Appimage的地址,图片地址改成解压后的图标地址,最好复制到其他目录,Ctrl+S保存

复制到桌面,允许运行

cp qqmusic.desktop ~/桌面/qqmusic.desktop;

复制到菜单

sudo cp ~/桌面/qqmusic.desktop /usr/share/applications/qqmusic.desktop;

10.2.2 网易云音乐

yay -S --noconfirm netease-cloud-music

10.3 安装图片软件

10.3.1 nomacs

yay -S --noconfirm nomacs

10.3.2 Gwenview

yay -S --noconfirm gwenview

11 格式软件安装篇

11.1 安装mkvtoolnix

yay -S --noconfirm mkvtoolnix-gui

11.2 安装格式转换工具

11.2.1 ffmpeg

格式工厂的内核就是ffmpeg,本质格式工厂就是ffmpeg加了一个UI。

yay -S --noconfirm ffmpeg

11.2.2 Curlew

Curlew的内核也是ffmpeg,也相当于ffmpeg加了一个UI,可以认为是Linux下的格式工厂。

yay -S --noconfirm curlew

12 硬件工具安装

12.1 安装烧录工具

12.1.1 balenaEtcher(可烧录Linux,不能烧录Windows)

yay -S --noconfirm balena-etcher

虚拟机控制器调整到USB3.1 ,并显示所有USB输入设备

插入U盘,连接到虚拟机,打开balenaEtcher

上传一个deepin的ISO镜像至虚拟机进行测试

烧录完成,退回到宿主机,新建一个虚拟机进行测试,结果没有问题

烧录Windows镜像会发出警告,经测试确实不能用

12.1.2 WoeUSB(可烧录Windows,不能烧录Linux)

GitHub上下载发行版

Releases · WoeUSB/WoeUSB · GitHubA Microsoft Windows® USB installation media preparer for GNU+Linux - Releases · WoeUSB/WoeUSBhttps://github/WoeUSB/WoeUSB/releases

下载对应版本的bash文件,或者使用wget

wget https://github/WoeUSB/WoeUSB/releases/download/v5.2.4/woeusb-5.2.4.bash;

添加权限

sudo chmod +x woeusb-5.2.4.bash;

使用命令查看U盘挂载点

lsblk;

一般 /dev/+NAME为挂载点,我这里为/dev/sda

获取Windows ISO文件路径,我这里为~/ISO/SW_DVD9_WIN_ENT_LTSC_2021_32BIT_ChnSimp_MLF_X22-84401.ISO

卸载U盘

sudo umount U盘路径;
# 我这里是
sudo umount /dev/sda1;

格式化磁盘

sudo mkfs.vfat -F 32 -I /dev/sda;

烧录前准备

安装依赖

yay -S --noconfirm wimlib 

执行烧录命令

sudo ./woeusb-5.2.4.bash --device ISO文件路径 U盘路径;
# 我这里是
sudo ./woeusb-5.2.4.bash --device ~/ISO/SW_DVD9_WIN_ENT_LTSC_2021_32BIT_ChnSimp_MLF_X22-84401.ISO /dev/sda;

烧录完成,退回到宿主机,新建一个虚拟机进行测试,结果没有问题

测试烧录Linux,发现正常使用有问题,因此建议烧录Linux用balenaEtcher

13 远程工具安装篇

13.1 安装桌面远程工具

13.1.1 ToDesk(有bug)

yay -S --noconfirm todesk

但是好像连不上网络

13.1.2 向日葵命令行

yay -S --noconfirm sunloginclient-cli
sudo sunloginclient

13.2 安装内网穿透工具

13.2.1 nattunnel(收费)

量子互联网站注册,按产品缴费,注册缴费过程官网自行查看

量子互联 – 内网映射 内网穿透 内外网互联工作站 远程异地组网网关量子互联提供各种网络解决方案,提供内网穿透,异地组网,动态域名,智能路由器多种网络产品https://www.uulap/下载nattunnel客户端

NATTUNNEL 内网穿透 – 量子互联https://www.uulap/nattunnel#download

或者使用wget

wget https://www.uulap/download/nattunnel.linux.amd64/nattunnel;

添加权限

sudo chmod +x nattunnel;

启动内网穿透

sudo nohup ./nattunnel -t<网络TOKEN> &

连接成功

13.3 安装异地组网工具

13.3.1 openlink/zerotier(收费)(不能保证一定成功)

量子互联网站注册,按产品缴费,注册缴费过程官网自行查看

量子互联 – 内网映射 内网穿透 内外网互联工作站 远程异地组网网关量子互联提供各种网络解决方案,提供内网穿透,异地组网,动态域名,智能路由器多种网络产品https://www.uulap/安装

yay -S --noconfirm zerotier-one

启动

sudo zerotier-one -d;

加入网络

sudo zerotier-cli join 网络ID;

网络ID

查看状态

sudo zerotier-cli listnetworks;

如果是虚拟机,不能保证一定成功。

13.3.2 蒲公英(收费)

yay -S --noconfirm pgyvisitor

登录

pgyvisitor login;

14 模拟器篇

14.1 安卓模拟器

1. 用Windows虚拟机

2. 用Andriod Studio虚拟出安卓设备,然后用adb安装apk

第1种方法,兼容性较好,不过注意在Linux虚拟机中,再开Windows虚拟机,再开安卓模拟器,主流模拟器大概率会卡VT,因此不建议这么用,宿主机最好就是Linux系统,还有希望能成功。

第2种方法,有些apk会不兼容闪退,也可能是这些apk检测到了开发环境主动退出,但是大部分主流apk,还是没啥问题的,但是运行速度不算快,能用,下面详细介绍第2种。

首先确保要安装了JDK,Android Studio需要JVM启动

yay -S --noconfirm android-studio

设置代理,mirrors.neusoft.edu

点击取消,因为代理还没用生效,下载不下来

选择SDK Manager

我这边创建了一个Pixel 5,Android版本为12的虚拟设备

找到Android SDK的地址,我这里是/home/user/Android/Sdk,然后找到模拟器路径,开启模拟器

cd /home/user/Android/Sdk/emulator;
./emulator @Pixel_5_API_31;

进入platform-tool目录,如果没有修改SDK地址,默认是~/Android/Sdk/platform-tools

cd ~/Android/Sdk/platform-tools;

下载好apk,传入目录,执行

./adb install xxx.apk

我这里下载了淘宝和京东apk,并且改了名字

./adb install taobao.apk;
./adb install jd.apk;

京东正常,淘宝闪退,所以说虚拟设备也要看运气和兼容性,如果非要更好的兼容性,只能使用第1种方式。

本文标签: 常用软件虚拟机Manjaro