logo

统信UOS操作系统(Deepin)前端开发环境配置参考


重庆科技
重庆科技 2023-11-17 14:34:37 21965
分类专栏: 资讯 话题: 统信软件 统信系统

最近因工作开发需要拿到了一台华为擎云 L410,其操作系统为统信 UOS 20(Deepin),本文为对该系统配置开发环境的记录。

1 基本配置

1.1 别名设置

# ll 别名命令
echo "alias ll='ls -alh'" >> ~/.bashrc

source ~/.bashrc

1.2 添加 apt-get 源

apt-get 默认源有许多软件无法安装,我们可以替换为免费的国内源。执行如下命令:

sudo vim /etc/apt/source.list

在末尾添加如下行(可选择将 chinauos 的源注释掉):

# 清华源
deb [by-hash=force] https://mirrors.tuna.tsinghua.edu.cn/deepin panda main contrib non-free
# 163 源
# deb [by-hash=force] http://mirrors.163.com/deepin lion main contrib non-free
# 阿里云
deb [by-hash=force] http://mirrors.aliyun.com/deepin apricot main contrib non-free
# 中科大
# deb [by-hash=force] https://mirrors.ustc.edu.cn/deepin apricot main contrib non-free

然后执行如下命令更新:

sudo apt-get update
sudo apt-get upgrade

2 软件安装

2.1 应用商店直接安装的应用

直接搜索关键字并安装即可:

  • • 微信

  • • 企业微信

  • • QQ

  • • WPS

  • • 腾讯会议

  • • 飞书

  • • Foxmail

  • • 讯飞输入法

  • • Visual studio code

  • • WebStorm

  • • Remmina 远程桌面客户端:主要用于远程连接 windows 电脑

2.2 通过 bash shell 命令安装的软件

  • • git

  • • gcc

  • • g++

  • • gdb

  • • nvm

  • • nodejs

  • • yarn、pnpm、nrm

  • • python2

  • • python3

  • • mysql

  • • docker-ce

# 更新
sudo apt-get update

# 安装 git
sudo apt-get install git

# 安装 gcc、g++、gdb: npm Native 模块使用 node-gyp 编译时会用到
sudo apt -y install gcc g++ gdb

# 安装 nvm
cd ~
git clone --depth 1 https://ghproxy.com/https://github.com/nvm-sh/nvm ~/.nvm
curl -o- https://ghproxy.com/https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash

# 设置 nvm 国内镜像源
echo "export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node" >> ~/.bashrc
echo "export NVM_IOJS_ORG_MIRROR=https://npmmirror.com/mirrors/iojs"  >> ~/.bashrc
source ~/.bashrc

# 使用 nvm 安装 nodejs
nvm install 18
# 安装 yarn、pnpm 包管理工具
npm i -g nrm yarn pnpm

其他可选:

# python 2 pip
sudo apt install python-pip
# python 3
sudo apt install python3-venv python3-pip
# 更新 pip3
sudo python3 -m pip install --upgrade pip --force-reinstall

# 配置 `pip` 为国内源(这里选择了清华源,可选择下面任意一个)
# https://mirrors.aliyun.com/pypi/simple/ # 阿里云
# https://pypi.mirrors.ustc.edu.cn/simple/ # 中科大
# https://pypi.douban.com/simple/ # 豆瓣
mkdir ~/.pip/
echo "[global]" >> ~/.pip/pip.conf
echo "index-url = https://pypi.tuna.tsinghua.edu.cn/simple" >> ~/.pip/pip.conf

# 安装 nginx
sudo apt-get install nginx
nginx -v

# 安装 mysql
sudo apt-get install -y mysql-server mysql-client
sudo mysql_secure_installation
sudo mysql -u root -p

# 设置 mysql 密码为 123456
update mysql.user set plugin="mysql_native_password"
grant all on *.* to root@"localhost"
update mysql.user set authentication_string=password('123456') where user='root'and Host = 'localhost';

# 安装 mysql-workbench:MYSQL官方的可视化管理工具
sudo apt-get install mysql-workbench

# 安装 docker
# 参考:https://mirror.tuna.tsinghua.edu.cn/help/docker-ce/
sudo apt-get install docker-ce

2.3 通过下载安装包手工安装的应用

理论上任意 arm 架构编译的 deb 应用包都可以下载和安装。 deb 包也可以在 bash 命令行中使用 wget 下载并使用 apt 安装。但由于需要确认选择具体的版本,还是逐一下载确认并安装比较适合。

  • • NxShell:一个相对轻量开源免费的 SSH 客户端

    • • https://github.com/nxshell/nxshell

    • • deb 包下载:https://ghproxy.com/github.com/nxshell/nxshell/releases/download/v1.9.0/NxShell-arm64-linux-1.9.0-202211250312.deb

    • • sourceforge 镜像下载:https://sourceforge.net/projects/nxshell/files/v1.9.0/

  • • More...

3 其他配置

3.1 git 配置

# 设置默认账号与邮箱
$ git config --global user.name "renxia"
$ git config --global user.email "邮箱"

# 生成 ssh 公私钥
ssh-keygen -t rsa
# 查看公钥(复制并配置至 gitlab、github 等)
cat ~/.ssh/id_rsa.pub

3.2 vscode 支持 code 命令从当前目录打开

# 设置 code 别名,支持 code 命令从当前目录打开 vscode
# 注意:如果是手动从官网下载并安装的,这里去掉路径中的 uos
ls -lh /opt/apps/com.visualstudio.code.uos/files/code/code
echo "alias code='/opt/apps/com.visualstudio.code.uos/files/code/code'" >> ~/.bashrc
source ~/.bashrc

网站声明:如果转载,请联系本站管理员。否则一切后果自行承担。

本文链接:http://www.xckfsq.com/news/show.html?id=28603
赞同 0
评论 0 条
重庆科技
粉丝 0 发表 9 + 关注 私信
上周热门
10核GPU竟变9核,苹果暗改新iPad Air官网M2芯片规格  3849
统一管理、安全运维、全面审计 | 北信源安全运维审计系统“一站式服务”  3848
行业认可 | 中电安科入选嘶吼《工控安全行业应用专题报告》「荐」行者名单及全景图谱多个细分领域  3644
明天!2024 RT-Thread全球技术大会 国内场最后一天,超多惊喜放送,等你来!  3411
百信与山西建投集团举行工作会谈  3358
永中“文韵”大模型获2024数字中国创新大赛·人工智能赛道三等奖  3241
152万奖金池!昇腾AI创新大赛昇思模型开发挑战赛正式发布!  3233
国务院关于修改《国家科学技术奖励条例》的决定  3230
神州泰岳入选创业板指和创业板50指数  3059
五舟网安新品NF-5220,领航数字化时代网络安全  3055
本周热议
我的信创开放社区兼职赚钱历程 40
今天你签到了吗? 27
如何玩转信创开放社区—从小白进阶到专家 15
信创开放社区邀请他人注册的具体步骤如下 15
方德桌面操作系统 14
用抖音玩法闯信创开放社区——用平台宣传企业产品服务 13
我有15积分有什么用? 13
如何让你先人一步获得悬赏问题信息?(创作者必看) 12
2024中国信创产业发展大会暨中国信息科技创新与应用博览会 9
信创再发力!中央国家机关台式计算机、便携式计算机批量集中采购配置标准的通知 8