欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 新车 > ubuntu20.04.5--arm64版上使用node集成java

ubuntu20.04.5--arm64版上使用node集成java

2025/6/6 16:53:09 来源:https://blog.csdn.net/daqinzl/article/details/148351930  浏览:    关键词:ubuntu20.04.5--arm64版上使用node集成java

ubuntu20.04.5arm上使用node集成java

#ssh,可选
sudo apt update
sudo apt install openssh-server

sudo systemctl status ssh
sudo systemctl enable ssh
sudo systemctl enable  --now ssh

#防火墙相关,可选
sudo ufw allow ssh
sudo ufw allow 2222/tcp


#默认安装了python3  3.8.10,查看python版本,可选
python2
python3
python
python -V


#网络工具,可选
sudo apt install net-tools

#1
sudo apt install curl

#2
curl -fsSL  https://deb.nodesource.com/setup_16.x | sudo  -E bash -
sudo apt install -y  nodejs


#3 安装python2,设置python2为默认版本
sudo apt install python2

sudo update-alternatives --list  python

sudo update-alternatives  --install  /usr/bin/python python  /usr/bin/python2 1
sudo update-alternatives  --install  /usr/bin/python python  /usr/bin/python3 2

#设置python版本,选1
sudo update-alternatives --config  python
#验证 python 或 python -V  输出python版本 2.7.18


#4
sudo npm install node-gyp  -g

node-gyp --version

#5
sudo apt install openjdk-8-jdk
java -version

#6
sudo apt install make

#7
sudo apt install g++

#8
sudo npm install java --unsafe-perm

#9
tar -zcvf  node_modules-java.tar.gz  node_modules

#可选
npm install ws

#其他命令参考
npm cache clean --force
rm -rf node_modules

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install  python3.12.0

sudo npm install node-gyp@10.3.1  -g

sudo update-alternatives  --remove   /usr/bin/python3 


sudo apt-get remove  --purge python3
sudo apt-get autoremove

ip link show

sudo ip link set enp0s1 down
sudo ip link set enp0s1 up

设置ip
ifconfig enp0s1  192.168.137.2 netmask 255.255.255.0  up

sudo ip addr add  192.168.137.2/24 dev  enp0s1


 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词