. Net Core (i) Environment construction and basic use
First, the system configuration
A) If you want to open a similar task Manager under Linux, you can use the top command to dynamically refresh CPU and memory consumption, process information, and so on in the console. The Vmstat and free commands can only display CPU and memory usage separately. Disk usage under Ubuntu can be viewed through the disk profiler.
also if you want Firefox to support HTML5 video playback, select DRM in the content item in the settings.
in the VI interface Press CTRL + Z will suspend VI back to the command line, you can enter FG return.
Enter ls-a to view the files that are hidden.
in VI, press YY in command mode to copy the entire row, then press p in the original position to copy to the next line.
b) Configure SSH
The name of the SSH package installed is openssh-server, and after you perform the sudo apt-get install openssh-server, you can use NETSTAT-TLP to confirm that SSH is started. Sudo/etc/init.d/ssh start can be executed individually to start or perform sudo/etc/init.d/ssh restart to restart. The SSH default port is 22, and the port can be modified in etc/ssh/sshd_config. You can then use tools such as putty to connect to Linux under Windows.
c) install MySQL
The name of the MySQL package is mysql-server,mysql-client not installed yet the problem is not found. Login by Mysql-u user name-p password, and then into the MySQL interface, where you can enter the SQL statement, use quit to exit. Remote administration can use the free navicat-lite, although the current lite version is not being maintained. To use a remote connection, you also need a series of configurations, default only local, execute sudo vi/etc/mysql/mysql.conf.d/mysql.cnf with administrator privileges to open the MySQL configuration file, note bind-address #, After executing restart restart MySQL, log in to the MySQL execution statement:
Grant all privileges on * * to [e-mail protected] "<IP>" identified by "< password >" with GRANT option, then perform the flush Privil eges; Configure with refresh permissions.
d) Install FTP
The package can be uploaded to a Linux server via ftp. You can choose to install the VSFTPD package, and the client can use FileZilla. However, the default is to allow only downloads to be uploaded. Execute sudo vi/etc/vsftpd.conf Open the configuration file with administrator privileges, uncomment the "Allow write" configuration, and reboot to upload. Generally to upload files to pack the compression first, tar is simple packaging, can be compressed into a zip format, and then use unzip decompression on Linux.
Ii.. Net Core
a). NET design is to consider a cross-platform like Java, most of the classes can be ported to Linux, but later the development is not satisfactory. Xamarin, Unity3d, is a cross-platform technology developed using. NET. The. NET core is based on. NET Standard, which guarantees that the. NET Framework can be used on a wide variety of platforms. There are many classes under Windows.
b) Most of the classes in. NET core in the. NET Framework are also, but slightly different, such as:
Core canceled datetable and Dateset, only use DataReader;
canceled the AppDomain, WinForm, WPF;
The binary serialization was canceled;
canceled the System.Net.Mail, third party packages such as Mailkit can be used;
Cancellation of serial communication;
SqlConnection downgraded to a common NuGet package;
The use of reflection has changed, and most of the methods have moved System.reflections namespace, as the type extension method;
not supported HttpWebRequest, WebClient, must use the asynchronous httpclient;
Ilspy, Reflector currently cannot decompile the core program, you can use the Justcompiler
With regard to the dotnet command, you can create the corresponding content using dotnet new Console\classlib\sln, and you can view the official documentation in a variety of ways. Compiled DLLs can be run directly with the dotnet +dll name.
c) create a project with a script
The script for creating a three-tier project is as follows:
mkdir $
CD $
dotnet New Mvc-o $1.web
dotnet New Classlib-o $1.model
dotnet New Classlib-o $1.dal
dotnet New Classlib-o $1.BLL
dotnet New SLN
dotnet sln $1.sln Add $1.web/$1.web.csproj
dotnet sln $1.sln Add $1.model/$1.model.csproj
dotnet sln $1.sln Add $1.dal/$1.dal.csproj
dotnet sln $1.sln Add $1.bal/$1.bll.csproj
dotnet Add $1.dal/$1.dal.csproj Reference $1.model/$1.model.csproj
dotnet Add $1.bll/$1.bll.csproj Reference $1.model/$1.model.csproj
dotnet Add $1.bll/$1.bll.csproj Reference $1.dal/$1.dal.csproj
dotnet Add $1.web/$1.web.csproj Reference $1.bll/$1.bll.csproj
dotnet Add $1.web/$1.web.csproj Reference $1.model/$1.model.csproj
dotnet Restore
the suffix of the script file is . sh, enter bash < path/filename >.sh the project name can be executed in bulk.
learning materials: such as Peng Net . NET Accelerated http://www.rupeng.com/News/10/4603.shtml
. Net Core (i) Environment construction and basic use