Sunday, 3 February 2019

install/run dotnet core on linux - Centos 7

1 . Install dotnet core, sdk https://dotnet.microsoft.com/download

2. 
rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
yum update
yum install aspnetcore-runtime-2.2
yum install dotnet-sdk-2.2


Run app:

dotnet coretest.dll --urls "http://*:80;"


Hosting on Nginx : https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.2

Hosting on Apache : https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-2.2

Thursday, 8 November 2018

Why should i use docker? container?

Docker is operating-system-level virtualization also know as containers.

Why should i use docker?

Ans: It's gives you want you want ( literally ). It run all application as an instance.


How to use Docker? ( eg if you want to run httpd on docker)

1. Install Docker on linux or windows box ( Linux preferred )

2. docker pull httpd

3. docker run -p 80:80 -d -v /var/www/html:/usr/local/apache2/htdocs:Z httpd
    (This will mount your local /var/www/html to /usr/local/apache2/htdocs of docker instance)



Other useful commands :

 ls -l /var/lib/docker/
 ls -l /var/lib/docker/containerd/

docker pull centos
docker run -it -d centos
docker container ls
docker commit 4f0b435cdbd7 man-centos
docker kill container_id
docker rm  container_id
docker exec -it [container-id] bash
docker run -p 80:80 -d -v /var/www/html:/usr/local/apache2/htdocs:Z httpd   - :Z

docker run ubuntu:14.04 echo "hola"


Thursday, 20 September 2018

Simple Control Panel for webhosting - opensoruce

Simplest way to manage your webhosting/email/SSL

# Create new vm

# Connect to your server as root via SSH
ssh root@your.server

# Download installation script
curl -O http://vestacp.com/pub/vst-install.sh

# Run it
bash vst-install.sh

You will get he admin username and password at the end of installation.