记录manjaro linux下起angular + spring + nginx 项目环境

栏目: Java · 发布时间: 6年前

内容简介:我用的linux是manjaro,内核是arch,有些东西和ubantu,deepin不太一样,所以在起环境时遇到了一些没见过的问题。这俩我尝试下载安装官网上的包,但均以失败告终,原因不明,还好manjaro自带的软件库有最新版,可以很方便地进行安装。

我用的 linux 是manjaro,内核是arch,有些东西和ubantu,deepin不太一样,所以在起环境时遇到了一些没见过的问题。

安装nodejs与npm

这俩我尝试下载安装官网上的包,但均以失败告终,原因不明,还好manjaro自带的软件库有最新版,可以很方便地进行安装。

记录manjaro linux下起angular + spring + nginx 项目环境

甚至还有检查最新版本依赖的工具,省下了手动更新的麻烦。

记录manjaro linux下起angular + spring + nginx 项目环境

接着通过一下命令完成全局安装 Angular CLI:

npm install -g @angular/cli

安装nginx

这里我犯了一个错,在nginx官网上,我并没有注意自己的linux版本,就直接下载了一个linux包,结果配置半天各种失败,但官网上明确标示了各linux版本安装的方法。

记录manjaro linux下起angular + spring + nginx 项目环境

遗憾的是nginx官网上并没有提供manjaro/arch版的包,但其实可以在manjaro的软件库当中找到(不得不说这个软件库是真的强大,啥都有),或者通过以下命令进行安装:

pacman -S nginx-mainline

安装完后使用命令 nging -t 会报如下错误:

nginx: [warn] could not build optimal types_hash, you should increase either types_hash_max_size: 2048 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size

解决方法:在etc/nginx下找到nginx配置文件nginx.conf,在如下位置添加配置信息,顺便include项目需要的nginx配置文件

types_hash_max_size 2048;
server_names_hash_max_size 2068;
types_hash_bucket_size 1024;

记录manjaro linux下起angular + spring + nginx 项目环境

接着 nginx -t 测试配置文件是否正确。

git配置

设置git用户名/邮箱

git config --global user.name [username]
git config --global user.email [email]

pull/fetch免密操作

git config --global credential.helper store

查看配置信息

git config --list

安装Webstorm和IDEA

有了前面的经验,这次我直接曲软件库里找,果不其然,真的有

记录manjaro linux下起angular + spring + nginx 项目环境

记录manjaro linux下起angular + spring + nginx 项目环境

不过IDEA是社区版,功能不全,想要专业版的只能曲官网下,手动配置图标启动,,这里就不赘述了


以上所述就是小编给大家介绍的《记录manjaro linux下起angular + spring + nginx 项目环境》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Machine Learning in Action

Machine Learning in Action

Peter Harrington / Manning Publications / 2012-4-19 / GBP 29.99

It's been said that data is the new "dirt"—the raw material from which and on which you build the structures of the modern world. And like dirt, data can seem like a limitless, undifferentiated mass. ......一起来看看 《Machine Learning in Action》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具