【linux】开发环境配置
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
作为一名前端,肯定要装node了
node
# node下载到这里
cd /usr/local
# 下载 先随便下个版本 后面用n切换
wget https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.xz
# 解压
tar -xvf node-v10.15.3-linux-x64.tar.xz
# 重命名
mv node-v10.15.3-linux-x64 node
# 设置node软连接
ln -s /usr/local/node/bin/node /usr/bin/node
ln -s /usr/local/node/bin/npm /usr/bin/npm
# 配置node安装路径
cd node
mkdir node_global
mkdir node_cache
npm config set prefix "/usr/local/node/node_global"
npm config set cache "/usr/local/node/node_cache"
设置一个node全局安装包的环境变量
vim /etc/profile
在文件的最后一行加上
export PATH=$PATH:/usr/local/node/node_global/bin
# 立即生效
source /etc/profile
安装yarn (个人喜欢)
# 安装yarn
npm i -g yarn
# 设置yarn镜像源
yarn config set registry https://registry.npm.taobao.org/
# 配置yarn安装路径
yarn config set global-folder "/usr/local/node/node_global"
yarn config set cache-folder "/usr/local/node/node_cache"
关于yarn,npm的设置可以见我另一篇文章
npm|yarn换源及本地配置命令
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
n
n是一个node的版本管理工具
# 安装n
npm i -g n
# 安装指定版本node
n 9.2.0
# 切换版本
n
nginx
yum install nginx
这样装最简单,但是配置文件和根目录在不同的地方 ,我们可以自己建一个nginx根目录
几个常用命令
# 启动
nginx
# 查看配置文件路径
nginx -t
# 修改配置文件后的重启
nginx -s reload
# 终止
nginx -s stop
如果站点出现中文乱码了nginx.conf设置一下字符集
阅读全文
AI总结




A beautiful web dashboard for Linux
最近提交(Master分支:6 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
相关推荐
查看更多
linux-dash

A beautiful web dashboard for Linux
linux-dash

A beautiful web dashboard for Linux
linux-dash

热门开源项目
活动日历
查看更多
直播时间 2025-03-13 18:32:35

全栈自研企业级AI平台:Java核心技术×私有化部署实战
直播时间 2025-03-11 18:35:18

从0到1:Go IoT 开发平台的架构演进与生态蓝图
直播时间 2025-03-05 14:35:37

国产工作流引擎 终结「996」开发困局!
直播时间 2025-02-25 14:38:13

免费开源宝藏 ShopXO,电商系统搭建秘籍大公开!
直播时间 2025-02-18 14:31:04

从数据孤岛到数据智能 - 企业级数据管理利器深度解析
所有评论(0)