Tuesday, November 17, 2015

install linux


  1. 分区:主(一般最多四个)、延伸、逻辑
  2. /boot 必须在最前面
  3. 不同分区的大小,以及如何分区,依据系统的功能制定
  4. 一般需要etx4, swap类型的分区,当然也可以添加

file system


  1. find file system type : df -T
  2. linux & windows both support : vfat file system 

Saturday, November 14, 2015

Python Plan


  1. develop some small projects
  2. develop games 2D
  3. develop games 3D
  4. develop games interesting (how to create a game structure)

Friday, November 13, 2015

Linux study plan

basic stage (精通使用、内核基本了解):

  1. 鸟哥的书,共两册。 使用、了解linux,打好基础!
  2. UCore. 初步了解linux系统的程序开发过程以及开发工具的使用,以及较好的了解UCore系统
  3. 其他的比较好的介绍linux的书

master stage (内核深入了解、精通开发):

  1. 更多的通过实践来了解

Wednesday, November 11, 2015

Windows visual studio 2013 install MS_MPI and run mpi program


  1. install MSMPI : msmpi.  We need install both msmpisdk.msi (to get include\ & lib\) and MSMpiSetup.exe (to get bin\mpiexec.exe) 
  2. set environment variables : 
    • MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\
    • MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
    • MSMPI_LIB32=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
    • MSMPI_LIB64=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\
  3. create a new C++ empty project :
  4. change linker's system configuration to CONSOLE(SUBSYSTEM:CONSOLE)
  5. add linker additional lib directories (x86 or x64) this machine is x86:
  6. add linker input additional dependencies , Type msmpi.lib to the list 
  7. add location of mpi header file 
  8.  Add a C++ file to write your first MPI program and write the following codes as a test: 
    #include<iostream>
    #include<mpi.h>
    using namespace std;
    
    int main(int argc, char** argv){
    
        int mynode, totalnodes;
    
        MPI_Init(&argc, &argv); 
        MPI_Comm_size(MPI_COMM_WORLD, &totalnodes);
        MPI_Comm_rank(MPI_COMM_WORLD, &mynode);
        
        cout << "Hello world from process " << mynode;
        cout << " of " << totalnodes << endl;
    
        MPI_Finalize();
        return 0;
    }
  9. build the program and if there is no error , then test it by running mpiexec:                        "mpiexec -n 4 mpi_hello.exe"
  10. use msmpi ; use msmpi 2 : 主要参考

local linux log in remote linux server (key pairs)

There are several ways we can do that.


Local machine:generate keys

  1. username and password : ssh username@host_ip port ; then input password 
  2. key pairs (more secure then password logging in): it's a two way method, you need to create both private key(for local ubuntu to authenticate) and public key (to transfer to the remote server)
    • create a new folder : mkdir ~/.ssh
    • ssh-keygen -t rsa ; then we will find two files : id_rsa and id_rsa.pub in .ssh/
    • then transfer the public key to remote server : here is a simple command  (ssh-copy-id <username@host>) 

Remote server:upload public key

  1. make sure .ssh is existed. use "ls -al "to examine. 
  2. if .ssh not exist, then "mkdir ~/.ssh"
  3. then copy id_rsa.pub to .ssh/

Monday, November 9, 2015

Security

System Administration

Find && '/'

1,examples:


  1. find file in a specific path :  find path -name filename (find /etc/ -name java.sh)
  2. -iname : 大小写不敏感
  3. -type : 文件类型
  4. -P : 路径


2, shortcut key : /
快捷键: n (next) ; u (previous one)

Network

Make

GDB

鸟哥私房菜 服务器架设篇

鸟哥私房菜 基础篇



  1. find file system type: df -T
  2. 关于man查询有关命令式,该命令后的数字是有实际意义的

  3. man page 的主要结构

    man page 的常用快捷键

    man 查找关键词,而非相应的命令名: man -k keyword

  4. 内存的数据不会立刻存储到硬盘,而是暂时留在内存以防数据的频繁读取。所以为防止断电等意外事故造成数据的损失,应该随时执行 sync命令,讲内存中数据同步到硬盘中。
  5. fsck 文件系统修复。 如果硬盘有分区坏掉时,可以用这个命令修复该分区。
  6. 破解linux密码:单人维护模式
  7. root account is disabled by default. so, need to create a new root account to use 'su' command.
    • sudo -i
    • passwd









Git