Ubuntu上安装mono

How do I use badgerports?

badgerports is an Ubuntu repository. In order to use it, you must add it to your Software Sources.

  1. Click on "System", "Administration", "Software Sources".

  2. Click on the "Other Software" tab.

  3. Click on "Add...", and enter the line:

    deb http://badgerports.org lucid main
    

    Screenshot from Software Sources

  4. Click on "Add Source"

  5. Click on "Authentication", then on "Import Key File"

  6. Download this GPG key file, ID 0E1FAD0C, and select it in the "Import Key File" window

  7. Click on "Close", then "Reload" when the pop-up appears. You're all set!


From now on, whenever you try to install or update Mono-related packages on your system, you will be given the badgerports version for preference. You don't need to do anything more than update your system as usual to get started!


先按照如上的步骤配置文件


ubuntu10.4 配置mono+apache环境

1.使用光盘或镜像安装ubuntu10.4系统

2.更新ubuntu 系统

命令:
sudo apt-get update
sudo apt-get upgrade

3.安装apache 服务器

命令:
sudo apt-get install apahce2

4.暂停apache 服务

命令:
sudo /etc/init.d/apache2 stop

5.安装mono 相关组件

命令:
sudo apt-get install mono-apache-server4 libapache2-mod-mono libmono-i18n2.0-cil
sudo apt-get install mono-2.0-service

6.打开并编辑/etc/apache2/mods-available/mod_mono.conf配置文件

命令:
sudo vi /etc/apache2/mods-available/mod_mono.conf
sudo gedit /etc/apache2/mods-available/mod_mono.conf

7.使用vi 编辑器编辑配置文件/

mod_mono.conf 文件内容如下:
AddType application/x-asp-net .aspx .ashx .asmx .ascx .config .ascx .axd
DirectoryIndex Default.aspx
MonoAutoApplication enabled
MonoServerPath “/usr/bin/mod-mono-server4”
Include /etc/mono-server4/mono-server4-hosts.conf

8.启动apache 服务器

命令:
sudo /etc/init.d/apache2 start
 
至此 apache+mono的环境已经配置完成
可以在 apache默认目录/var/www/ 下放入aspx页面来测试配置是否成功。
 

使用putty和winscp连接Ubuntu,需要安装ssh
sudo apt-get install ssh

posted @ 2016-03-18 15:18  copperface  阅读(376)  评论(0编辑  收藏  举报