栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

source insight via samba

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

source insight via samba

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.21codes)

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

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/826041.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号