source insight via samba

4 篇文章 0 订阅
4 篇文章 0 订阅

1. pull image, create container and enter the container

    docker pull centos
    
    # without --privileged=true, executing "systemctl start sshd.service" will occur the error "system has not been booted with systemd as init system"    
    docker run -p 8022:22 -p 139:139 -p 445:445 -itd --name fireware --privileged=true centos /sbin/init

    docker exec -it fireware bash

2. execute command in the container

2.1 install language pack

    locale -a
    yum install -y glibc-langpack-en
    locale -a

2.2 install libraries

    yum install -y passwd net-tools git bzip2 make samba automake

2.3 install sshd

    yum install -y openssl openssh-server
    
    # don't need modify to "PermitRootLogin yes", because it's always that
    # vim /etc/ssh/sshd_config 
    
    systemctl start sshd.service
    systemctl enable sshd.service
    
    # set the password for user root
    passwd root 

2.4 create user and group
    
    useradd -d /home/ljh -s /sbin/nologin ljh    
    
2.5 config samba
    
    # add user for samba
    pdbedit -a -u ljh
    
    # add share folder in config file    
    # [codes]
    #        comment = codes for SC08S
    #        path = /home/ljh
    #        writable = yes
    #        public = no
    vi /etc/samba/smb.conf
    
    # start smb
    systemctl start smb
    systemctl enable smb        

    # modify selinux, change enforcing to disabled
    vi /etc/sysconfig/selinux

    # setlinux
    setenforce 0;

2.6 get codes from git

    # get codes from git server
    cd /home/ljh    
    git clone http://xxx:81/xxx/parker_EX

    # change folder parker_EX's owner
    chown -Rf ljh:ljh /home/ljh
    
2.7 mdofiy ev200 compilation environment

    # install arm-himix100-linux 
    tar xzvf arm-himix100-linux.tgz
    cd xzvf arm-himix100-linux
    ./arm-himix100-linux.install
    
    # add path
    export PATH=/opt/hisi-linux/x86-arm/arm-himix100-linux/bin:$PATH 
    
    # test
    arm-himix100-linux-gcc -v
    
    # make clean & make
    cd /home/ljh/parker_EX/app/mainApp
    make clean
    make
    
2.8 visit the share folder through samba in windows    

    my computer (right click) -> map network driver -> folder (\\192.168.0.21\codes)

if you didn't add config section information [codes] in file /etc/samba/smb.conf then you can only access \\192.168.0.21\ljh, otherwise you can also access \\192.168.0.21\codes
    

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值