Home Backend Development PHP Tutorial centos+mono+nginx+jexus builds c# running environment test under linux

centos+mono+nginx+jexus builds c# running environment test under linux

Aug 08, 2016 am 09:21 AM
devel mono nbsp nginx

centos+mono+nginx+jexus builds c# running environment test under Linux

----Centos 7.0 installs Mono 3.4 and Jexus 5.6----

Quoted from http://www.cnblogs.com/shanyou/p/ 3887223.html
1. Update the system, install the compilation environment, and prepare for compiling Mono source code.

1. Update the system

yum –y update

2. Install the libraries required for Mono source code installation

yum -y install wget glib2-devel libtiff libtiff-devel libjpeg libjpeg-devel giflib giflib-devel libpng libpng-devel libX11 libX11- devel freetype freetype-devel fontconfig fontconfig-devel libexif libexif-devel gcc-c++ gettext unzip zip bzip2 bzip2-devel curl-devel gtk2-devel boost-devel

3. Install the GDI+ compatible API library Libgdiplus required by Mono

git clone git://github.com/mono/libgdiplus.git
cd libgdiplus
./autogen.sh --prefix=/ usr
make && make install

2. Source code installation Mono 3.4

3.4 This version of the official source code package is missing some files, so that installation problems may occur. For details, please refer to the problems that occur during mono-3.4.0 source code installation ( http://www.cnblogs.com/shanyou/p/3655447.html) solution. Or download directly from http://pan.baidu.com/s/1eQ452Ie
Download and upload to /usr/local/src
tar -zxvf mono-3.4.0.tar.gz
./configure --prefix=/ usr --libdir=/usr/lib64
Add --libdir=/usr/lib64 here, mainly P/Invoke, please refer to MONO x64 amd_x64
make && make install
Enter mono -V If there is mono version information, then The installation is successful.
If it is a 64-bit version of CentOS, it is recommended that you run the command ldconfig. It is recommended that everyone ldconfig after installing mono. (The purpose of the ldconfig command is mainly to search for shareable dynamic link libraries ( The format is as introduced before, lib*.so*), and then the connection and cache files required by the dynamic loader (ld.so) are created. The cache file defaults to /etc/ld.so.cache, and this file has been saved. A well-ordered list of dynamic link library names. )
Another point is also very important. When compiling Mono, you must specify the installation to /usr (./configure --prefix=/usr). If you install it into a system, you will not understand it at all. " folder, only ldconfig will not work. You must add the path to the /etc/ld.so.conf file or /etc/ld.so.conf.d
and then ldconfig.

3. Install Jexus 5.5


Starting from version 5.3.1, the installation process of Jexus has been simplified. Two new scripts are built-in. They are "install" and "upgrade", corresponding to the original "install" and " Upgrade", which automates the Jexus installation process. The installation and upgrade methods of jexus itself have not changed further, so for users who are accustomed to using versions before 5.3.1, you can still use the previous installation method.
wget linuxdot.net/down/jexus-5.6.1.tar.gz
tar -zxvf jexus-5.6.1.tar.gz
cd jexus-5.6.1
./install
Installation completed~! ! ! When executing the install script, jexus is installed to /usr/jexus/ by default. If you want to install it to another directory, you can add a directory parameter when executing the script (such as sudu install /usr/local/jexus/). For upgrade, execute the upgrade script.
Start jexus and check if it is normal
Start /usr/jexus/jws start
Stop /usr/jexus/jws stop
Restart /usr/jexus/jws restart
From now on, use http://your IP/info Verify whether Jexus is started
5. Add it as a system service and start it with the system
Centos and Ubuntu written by Zendic install Mono and Jexus, which includes the code to add Jexus as a system service:
cd /etc/init.d/
vi jws
Press i in edit mode and paste the following content
#!/bin/bash
#chkconfig: 2345 80 05
#description:jws
#
. /etc/rc.d/init.d/functions
case "$1" in
start)
echo "Jexus Start.."
/usr/jexus/jws start
;;
stop)
echo "Jexus Stop.."
/usr/jexus/jws stop
;;
restart)
echo " Jexus Restart"
/usr/jexus/jws restart
;;
status)
/usr/jexus/jws status
;;
*)
exit 1
;;
esac

exit $RETVAL

After pressing ESC, enter :wqSave the file
Add this script as a "service"
chmod 766 jws
chkconfig --add jws
At this point, JEXUS has started with the system, you can reboot and try it
You can also modify /usr/jexus/siteconf file to modify the site configuration.
To test the asp.net website, you can cp /usr/jexus/sitconf/default /usr/jexus/sitconf/mysite1 to copy your own site configuration and change the port and file directory inside
port=80
root= / /var/www/html/mysite1
Create a new mysite1 under /var/www/html/ and put the website files in
http://ip/page address access, pay attention to capitalization
This solution has been tested, simple I made an asp.net website and it runs normally, but when I put a website that was running normally on IIS, it ran into an error. The cause of the error is not yet known.

----CentOS builds Nginx+Mono to run ASP.NET environment---

Quoted from http://www.centoscn.com/CentosServer/www/2014/0807/3449.html

1. Obtain open source related programs

1. Use the yum command that comes with the CentOS Linux system to install and upgrade the required programs Library:

sudo -s
LANG=C
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel bison pkgconfig glib2-devel gettext make

2. Download the program source code package

Nginx installation package: Download address: http://nginx.org/en/download.html

mkdir -p /down
cd /down
wget http://nginx.org/download/nginx-1.1.11.tar.gz
Mono download: official website: http://download.mono-project.com/sources/mono/(please download the latest version)

wget http://download.mono-project.com/sources/mono/mono-2.10.7.tar.bz2
libgdiplus download: http://download.mono-project.com/sources/libgdiplus/(Please download Latest version)

wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
xspDownload: http://download.mono-project.com/sources/xsp/( Please download the latest version)

wget http://download.mono-project.com/sources/xsp/xsp-2.10.2.tar.bz2
pcre download (pcre library required by Nginx): FTP://ftp .csx.cam.ac.uk/pub/software/programming/pcre/ (please download the latest version)

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre- 8.21.tar.gz

2. Install and compile Nginx

1. Install the pcre library required to install Nginx

cd /down
tar zxvf pcre-8.21.tar.gz
cd pcre-8.21/
./configure
make && make install
cd ../
2. Create www user and group

/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
mkdir -p /data0/web
chmod +w /data0 /web
chown -R www:www /data0/web
3. Install Nginx

tar zxvf nginx-1.1.11.tar.gz
cd nginx-1.1.11/
./configure --user=www -- group=www --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ../
4. Open port 80
iptables -I INPUT -p tcp --dport 80 - j ACCEPT
Start nginx
1
/opt/nginx/sbin/nginx
Enter the access address http://192.168.1.1 (according to the personal local address page) on the browser, you will normally see the default nginx page

3. Install and compile Mono

1. Install libgdiplus

cd /down
tar -jxvf libgdiplus-2.10.tar.bz2
cd libgdiplus-2.10
./configure --prefix=/usr
make && make install
ldconfig
2 , install Mono
tar –jxvf mono-2.10.7.tar.bz2
cd mono-2.10.7
./configure --prefix=/usr
make && make install //It takes a long time here
ldconfig

echo export PKG_C/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile
echo export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH>>~/.bash_profile
echo export PATH=/usr/bin:$PATH>> ~/.bash_profile source ~/.bash_profile
Enter mono -V. If there is mono version information, the installation is successful.
3. Install XSP
cd /down
tar –jxvf xsp-2.10.2.tar.bz2
./configure --prefix=/usr
configure: error: You need to install 'gmcs', error
XSP failed to install
make && make install
4. Configure Nginx

vi /opt/nginx/conf/nginx.conf
server {
listen 80;
server_name localhost;
location / {
root /data0/web;
index index.html index.htm;
fastcgi_index Default.aspx;
fastcgi_pass 12 7.0.0.1:9000;
          include fastcgi_params;
     }
}
5. Configure fastcgi_params and add the following two lines

vi /opt/nginx/conf/fastcgi_params
fastcgi_param PATH_INFO "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
6. Start
1. Restart nginx

/opt/ nginx/sbin/nginx -s reload
2. Start the fastcgi_mono server


fastcgi-mono-server2 /applicati/data0/web /socket=tcp:127.0.0.1:9000 &
Failed to test, fastcgi-mono-server2 found If you don’t get this command
7. Test
Create a new asp.net Web project and upload it to the /data0/web directory and test it.
Another article about jexus http://wenku.baidu.com/link?url=CzIkvNlbyKg6jP0LJThY_PQmbAKI-5Ito-T9E7OMOSugNpJt_c59Wgb8K5XnOpcDgn6FgrAQ9-6HimQEt1t-zerHrM26nzsBaqvuB-0xmdO

The above introduces centos+mono+nginx+jexus to build c# running environment test under Linux, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to configure nginx in Windows How to configure nginx in Windows Apr 14, 2025 pm 12:57 PM

How to configure Nginx in Windows? Install Nginx and create a virtual host configuration. Modify the main configuration file and include the virtual host configuration. Start or reload Nginx. Test the configuration and view the website. Selectively enable SSL and configure SSL certificates. Selectively set the firewall to allow port 80 and 443 traffic.

How to check the name of the docker container How to check the name of the docker container Apr 15, 2025 pm 12:21 PM

You can query the Docker container name by following the steps: List all containers (docker ps). Filter the container list (using the grep command). Gets the container name (located in the "NAMES" column).

How to start containers by docker How to start containers by docker Apr 15, 2025 pm 12:27 PM

Docker container startup steps: Pull the container image: Run "docker pull [mirror name]". Create a container: Use "docker create [options] [mirror name] [commands and parameters]". Start the container: Execute "docker start [Container name or ID]". Check container status: Verify that the container is running with "docker ps".

How to check whether nginx is started How to check whether nginx is started Apr 14, 2025 pm 01:03 PM

How to confirm whether Nginx is started: 1. Use the command line: systemctl status nginx (Linux/Unix), netstat -ano | findstr 80 (Windows); 2. Check whether port 80 is open; 3. Check the Nginx startup message in the system log; 4. Use third-party tools, such as Nagios, Zabbix, and Icinga.

How to create containers for docker How to create containers for docker Apr 15, 2025 pm 12:18 PM

Create a container in Docker: 1. Pull the image: docker pull [mirror name] 2. Create a container: docker run [Options] [mirror name] [Command] 3. Start the container: docker start [Container name]

How to check nginx version How to check nginx version Apr 14, 2025 am 11:57 AM

The methods that can query the Nginx version are: use the nginx -v command; view the version directive in the nginx.conf file; open the Nginx error page and view the page title.

How to configure cloud server domain name in nginx How to configure cloud server domain name in nginx Apr 14, 2025 pm 12:18 PM

How to configure an Nginx domain name on a cloud server: Create an A record pointing to the public IP address of the cloud server. Add virtual host blocks in the Nginx configuration file, specifying the listening port, domain name, and website root directory. Restart Nginx to apply the changes. Access the domain name test configuration. Other notes: Install the SSL certificate to enable HTTPS, ensure that the firewall allows port 80 traffic, and wait for DNS resolution to take effect.

How to start nginx server How to start nginx server Apr 14, 2025 pm 12:27 PM

Starting an Nginx server requires different steps according to different operating systems: Linux/Unix system: Install the Nginx package (for example, using apt-get or yum). Use systemctl to start an Nginx service (for example, sudo systemctl start nginx). Windows system: Download and install Windows binary files. Start Nginx using the nginx.exe executable (for example, nginx.exe -c conf\nginx.conf). No matter which operating system you use, you can access the server IP

See all articles