Linux配置网络
首先需要让虚拟机联网。桥接后默认网关会变。
默认网关:
配置网关:
route add default gw 192.168.1.1
route -n 查看网关
重置网络:
service network restart
虚拟机配置好后可拍快照储存初始环境。
安装git且忽略权限:
yum install git
git config --global http.sslverify false
防火墙
systemctl status firewalld.service
systemctl stop firewalld.service 关闭
安装pip
https://blog.csdn.net/fuck487/article/details/80882561?ops_request_misc=&request_id=&biz_id=102&utm_term=contos%20python%20pip&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-3-80882561.pc_search_result_before_js
安装npm
sudo curl -sL -o /etc/yum.repos.d/khara-nodejs.repo \ https://copr.fedoraproject.org/coprs/khara/nodejs/repo/epel-7/khara-nodejs-epel-7.repo
sudo yum install -y nodejs nodejs-npm
下载vue
npm install --global vue-cli
更新
npm install
更新node
更新node:
npm install -g n
n latest
怀疑内核不够大导致的问题:
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa02dd0 node::Abort() [node]
2: 0x94e471 node::FatalError(char const*, char const*) [node]
3: 0xb7686e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb76be7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xd31485 [node]
6: 0xd3200f [node]
7: 0xd4009b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
8: 0xd43c5c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
9: 0xd1233b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
10: 0x10582bf v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
11: 0x13fe259 [node]
已放弃(吐核)
注意:Node.js v8.0 以上可以按照下面方式设定,不需要使用插件了
export NODE_OPTIONS=--max_old_space_size=4096
编译
npm run build
进入热开发
npm run dev
在index.html 设置后台ip
方便开发
自动上传