银河麒麟操作系统安装Mono开发环境操作步骤
银河麒麟操作系统安装Mono开发环境操作步骤
需求:现有一C/S结构的Winform客户端程序需要运行到国产操作麒麟操作系统V10上,经查询资料,普遍采取mono开发工具来实现此转换。
目标:转换现有的Windows下使用VisualStudio 2019开发的项目到国产麒麟操作系统V10上。
问题:工欲善其事,必先利其器,本文先搭建好环境,之后再尝试后面的项目代码转换。
步骤:
一、下载安装国产银河麒麟操作系统:
搜索到官网地址http://www.kylinos.cn/,
个人用户试用体验网址https://www.ubuntukylin.com/,
最后找到我们需要的阿里镜像下载地址https://mirrors.aliyun.com/ubuntukylin/Kylin-4.0.2-desktop-sp2_Community-20171127-x86_64.iso。
本文使用桌面SP2版本搭建成功,其他操作系统版本出一堆问题,浪费了很多很多时间。
二、VMware安装麒麟操作系统:
过程不一一描述,参考Vmware中安装CentOS操作系统步骤即可。唯一需要注意的就是设置网络连接,以保障系统安装成功后能上网下载软件,截图如下:
三、麒麟操作系统中安装mono开发工具:
3.1首先更新root超级用户的密码
在系统桌面空白处,点击鼠标右键,选择“在终端中打开”菜单,打开终端命令窗口:
执行命令:
sudo -i
输入当前用户密码后,执行更改超级管理员默认密码指令
passwd root
3.2使用root用户执行相关命令,更新配置文件
备份配置文件命令:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vi /etc/apt/sources.list
修改后的内容如下:
--------------------------------------------------------------------------------------------------------------------
deb file:///media/xqf222/kylin/Kylin-4.0.2 juniper main
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp2-desktop main restricted universe multiverse
deb http://kr.archive.ubuntu.com/ubuntu xenial main
deb http://th.archive.ubuntu.com/ubuntu xenial main
deb http://cz.archive.ubuntu.com/ubuntu xenial main
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
--------------------------------------------------------------------------------------------------------------------
修改完成后保存,然后执行下面更新命令:
sudo apt-get update
3.3安装mono和monodevelop等工具软件
官网地址http://www.mono-project.com/docs/getting-started/install/linux/,分别执行下面三行命令
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
之后执行安装Mono命令:
sudo apt-get install mono-complete
安装完Mono后执行查看版本信息
mono --version
--------------------------------------------------------------------------------------------------------------------
[email protected]:~# mono --version
Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
--------------------------------------------------------------------------------------------------------------------
最后执行安装Monodevelop IDE软件命令
sudo apt-get install monodevelop
完成安装后执行打开开发工具命令:
monodevelop
最后展示一下安装成功的软件界面: