How to install netcore/aspnetcore 2.1.4 on RHEL 6.8

Recently days, we met a scenario that is our client production environment must be RHEL 6.8. But our product is base core 2.1.x version. Rehat and Microsoft has never say the are support RHEL 6.X version.

After a few days research, I found that .net core website is support RHEL 6.X,but no runtime.We can download install SDK to support core. And you know what? It works well finally!

Install netcore 2.1.4 sdk


yum install -y wget epel-release
yum install -y openssl-devel libnghttp2-devel libidn-devel gcc libtool m4 automake
cd /tmp/

curl -O
tar -xf curl-7.45.0.tar.gz
cd curl-7.45.0
./configure \
    --disable-dict \
    --disable-file \
    --disable-ftp \
    --disable-gopher \
    --disable-imap \
    --disable-ldap \
    --disable-ldaps \
    --disable-libcurl-option \
    --disable-manual \
    --disable-pop3 \
    --disable-rtsp \
    --disable-smb \
    --disable-smtp \
    --disable-telnet \
    --disable-tftp \
    --enable-ipv6 \
    --enable-optimize \
    --enable-symbol-hiding \
    --with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt \
    --with-nghttp2 \
    --with-gssapi \
    --with-ssl \
    --without-librtmp \

make install

cd install
tar -czf curl-7_45_0-RHEL6-x64.tgz *
curl -O
tar -xf curl-7_45_0-RHEL6-x64.tgz -C /
tar -xf icu4c-57_1-RHEL6-x64.tgz -C /
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> /etc/profile
export LD_LIBRARY_PATH=/usr/local/lib

cd /tmp/
mkdir dotnetsdk

curl -O

tar -zxvf dotnet-sdk-2.1.402-rhel.6-x64.tar.gz -C dotnetsdk/

mv dotnetsdk /opt/
ln -s /opt/dotnetsdk/dotnet /usr/bin/dotnet

curl -sSL | sudo tar zxfv - -C /usr/local/src

# Insall libuv-1.4.2 
cd /usr/local/src/libuv-1.4.2
make install
rm -rf /usr/local/src/libuv-1.4.2 && cd ~/