在 ubuntu server 上搭建 C++ 远程开发环境

  • 安装开发软件

    apt install build-essential
    apt install clang
    apt install cmake
    apt install git
    apt install subversion
    apt install ninja ninja-build
    apt install gcc-multilib g++-multilib lib32z1-dev
    
  • 安装并配置 samba

    apt install samba
    apt install smbclient
    cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
    
    emacs /etc/samba/smb.conf
    
    [share]
      comment = Share Folder require password
      browseable = yes
      path = /home/share
      create mask = 0777
      directory mask = 0777
      valid users = share
      force user = nobody
      force group = nogroup
      public = yes
      writable = yes
      available = yes
    
    groupadd share -g 6000
    useradd share -u 6000 -g 6000 -s /sbin/nologin -d /dev/null
    smbpasswd -a share
    
    mkdir /home/share
    chmod 777 /home/share
    /etc/init.d/smbd restart