記錄manjaro linux下起angular + spring + nginx 項目環境

我用的linux是manjaro,內核是arch,有些東西和ubantu,deepin不太同樣,因此在起環境時遇到了一些沒見過的問題。node

安裝nodejs與npm

這倆我嘗試下載安裝官網上的包,但均以失敗了結,緣由不明,還好manjaro自帶的軟件庫有最新版,能夠很方便地進行安裝。linux

clipboard.png
甚至還有檢查最新版本依賴的工具,省下了手動更新的麻煩。nginx

clipboard.png

接着經過一下命令完成全局安裝 Angular CLI:git

npm install -g @angular/cli

安裝nginx

這裏我犯了一個錯,在nginx官網上,我並無注意本身的linux版本,就直接下載了一個linux包,結果配置半天各類失敗,但官網上明確標示了各linux版本安裝的方法。npm

clipboard.png

遺憾的是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配置文件fetch

types_hash_max_size 2048;
server_names_hash_max_size 2068;
types_hash_bucket_size 1024;

clipboard.png
接着nginx -t 測試配置文件是否正確。ui

git配置

設置git用戶名/郵箱spa

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

有了前面的經驗,此次我直接曲軟件庫裏找,果不其然,真的有

clipboard.png

clipboard.png

不過IDEA是社區版,功能不全,想要專業版的只能曲官網下,手動配置圖標啓動,,這裏就不贅述了

相關文章
相關標籤/搜索