[Asp.net] set up an asp.net server in Ubuntu
The installation process is as follows:
1. Install nginx
Ubuntu :~ $ "> Linuxidc @ Ubuntu :~ $ Sudo apt-get update
Linuxidc @ Ubuntu :~ $ Sudo apt-get install nginx ) F $ G4] # v: C1 p; y/{'n
2. Compile and install mono 2.0
// Install required packages to avoid compilation errors. 8 q'g3 Y M1 B; o
Linuxidc @ Ubuntu :~ $ Sudo apt-get build-dep mono5 h2 f # l-u)] $ Z (|
Linuxidc @ Ubuntu :~ $ Wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.0.tar.bz2
Linuxidc @ Ubuntu :~ $ Tar jvxf mono-2.0.tar.bz2
Linuxidc @ Ubuntu :~ $ Cd mono-2.0
Linuxidc @ Ubuntu :~ $./Configure -- prefix =/usr/local
Linuxidc @ Ubuntu :~ $ Make
Linuxidc @ Ubuntu :~ $ Sudo make install
It takes some time to compile. After the installation is complete, you can view the mono version through "mono-V ".
3. Install fastcgi-mono-server
Linuxidc @ Ubuntu :~ $ Sudo apt-get install subversion
Linuxidc @ Ubuntu :~ $ Svn co http://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/ fastcgi-mono-server h &? 4 s (e )~! P2 J/o
Linuxidc @ Ubuntu :~ $ Cd fastcgi-mono-server/
Linuxidc @ Ubuntu :~ $./Autogen. sh & F7 I/K "V K
Linuxidc @ Ubuntu :~ $ Make % [& d6 A. h5 d. t5 s /[
Linuxidc @ Ubuntu :~ $ Sudo make install-p/I0 q $ b0 S + H
Because the source code of fastcgi-mono-server must be obtained using SVN, we first installed the subversion.
4. Configure nginx0 n6 {. M +} % h
Linuxidc @ Ubuntu:/$ sudo mv/etc/nginx/sites-enabled/default.../+ j .\! M/f6 @) r
Linuxidc @ Ubuntu:/$ sudo nano/etc/nginx/sites-enabled/default (]! L; S: T8 |. {) j
Copy the content in nginx-config.txt to the/etc/nginx/sites-enabled/default file. The default directory is in/var/www. If you are not familiar with nano, refer to Nano shortcut keys. Then run the following script to start nginx and fastcgi-mono-server2. "]-O6 h) B .v: d; N
Linuxidc @ Ubuntu:/$ sudo/etc/init. d/nginx start, b9 d * r1 C/| /[
Linuxidc @ Ubuntu :~ $ Sudo fastcgi-mono-server2/socket = tcp: 9000 &/n, t6 Z, L5 ^/v; Q (U
Linuxidc @ Ubuntu:/$ echo "hello">/var/www/index. aspx % \. '0] 1 x + D )_
When you access the corresponding address, you can see the cute hello. 8 m (n + Q1 n0 U6 B
5. Install aspx probe 0} + O/p8 J: X8 h! G * z
Linuxidc @ Ubuntu:/$ cd/var/www
Linuxidc @ Ubuntu:/var/www $ wget linuxidc.com/system/systembak/ "> |