AIX 上安裝 Samba-3.0.14 全功略

    內容表格
    1. 1. Reference links

    系統環境: AIX 4.3.3 (IBM/RS6000)
    網路環境: Windows 2000 Sserver AD
    用戶端 : Windows 2000 PRO
    軟體版本: Samba-3.0.14a
    作者: A.Lang (alang<dot>hsu<at>gmail<dot>com)

    雖然使用 Samba 也有一段時間, 以前都用 Linux, 在 AIX 上安裝它, 倒是第一次, 全程都以原始碼編譯方式安裝, 此教學適用各種 UNIX 及 Linux, 當然您還是須具備不同作業系統差異特性的知識.

    *******************************
     Samba Installation on AIX
     Author: a-lang 2005/6/4
    *******************************

    Downloadind Samba Latest Distribution - Samba-3.0.14a
    http://us4.samba.org/samba/ftp/

    Read the Documentation
    所有安裝文件請參考 docs/htmldocs/using_samba/toc.html

    Configuring source
    #cd samba-3.0.14a/source
    #./configure
    > --prefix=/usr/local/samba-3.0
    > --exec-prefix=/usr/local/samba-3.0
    > --with-winbind --with-smbwrapper --with-msdfs
    > --with-syslog --with-utmp 2>&1 |
    > tee config.my.log

    !!請注意 --with-smbmount 只支援 Linux 喔

    Compiling and Installing
    #make
    #make install 2>&1 | tee make-install.my.log //還是紀錄一下log,以便除錯用

    如安裝成功,在/usr/local/samba-3.0下的 bin,sbin 應有相關指令檔

    Enabling SWAT
    Check your /etc/services file, and if it does not contain the following line, add it to the end of the file:

    swat 901/tcp

    For inetd, add a line to the /etc/inetd.conf file.Don't forget to change the path to the SWAT binary
    if you installed it in the different location from the default /usr/local/samba

    swat stream tcp nowait.400 root /usr/local/samba-3.0/sbin/swat swat

    To reread inetd configuration

    #refresh -s inetd

    A Basic Samba Configuration File
    The installatin process does not automatically create an smb.conf configuration file.
    You need create a new file in any text editor, it should be named smb.conf,and placed in the
    /usr/local/samba-3.0/lib directory.The sample as the below lines.

    # Global parameters
    [global]
    workgroup = MYDOMAIN
    netbios name = SMBSRV
    server string = AIX4.3 Samba-3.0
    security = DOMAIN
    encrypt passwords = Yes
    password server = MYAD
    log file = /usr/local/samba-3.0/var/log.%m
    max log size = 0
    preferred master = No
    local master = No
    domain master = No
    dns proxy = No
    wins server = 192.168.51.4
    
    # Notes: You need an existing /usr/local/samba/tmp directory
    [test]
    comment = For testing only, please
    path = /usr/local/samba/tmp
    read only = no
    guest ok = yes
    

    !!Caution: If you would like to migrate 2.2.x to 3.0.x for smb.conf configration file,
    you must remove "code page".
    To see more detail information about this,pls click the below link.
    http://www.bibsyst.no/samba/docs/man...ng-to-3.0.html

    如果 security = DOMAIN, 請執行下列指令, Join 所屬的Windows AD(NT4/PDC)
    root# net join -S MYAD -UAdministrator%password //MYAD= your AD host name
    ** 以上適用3.0.x, 對於 2.2.x 用戶請改用
    1)在 windows AD 手動新增computer,並勾選 "相容windows 2000前版系統"
    2)在 samba server 執行
    #smbpasswd -j mydomain -r myAD

    Testing Configuration File By Local Machine
    #/usr/local/samba-3.0/bin/testparm
    #/usr/local/samba-3.0/bin/smbclient -L localhost

    **筆者在 AIX 4.3.3 系統環境下, 總會出現下列語系的錯誤訊息, 找遍 Google 仍不得其解, 有文章說是
    Bug, 在不設定"unix charset" & "dos charset" 後就不會出現了!!

    Error messages:
    init_iconv: Conversion from UTF-16LE to CP932 not supported
    init_iconv: Attempting to replace with conversion from UTF-16LE to ASCII
    init_iconv: Conversion from UTF8 to CP932 not supported
    init_iconv: Attempting to replace with conversion from ASCII to ASCII
    init_iconv: Conversion from ASCII to CP932 not supported
    init_iconv: Attempting to replace with conversion from ASCII to ASCII
    ...

    Automatical Startup
    //Modifying Samba to work with the SRC(System Resource Controller)
    //檢查必要的指令路徑
    #which smbd
    /usr/local/sbin/smbd
    #which nmbd
    /usr/local/sbin/nmbd

    //Defining the Samba subsystem group
    //Create new subsystem
    #mkssys -G samba -s smbd -p /usr/local/sbin/smbd -u 0 -a "-i" -S -n 15 -f 9
    #mkssys -G samba -s nmbd -p /usr/local/sbin/nmbd -u 0 -a "-i" -S -n 15 -f 9

    //modifying an existing subsystem definition
    #chssys -G samba -s smbd -p /usr/local/sbin/smbd -u 0 -a "-i" -S -n 15 -f 9

    //開機時自動啟動
    #mkitab "samba:2:wait:startsrc -g samba > /dev/console 2>&1"

    //檢查已定義的Subsystem的參數值
    #odmget -q subsysname='smbd' SRCsubsys

    [code]
    SRCsubsys:
    subsysname = "smbd"
    synonym = ""
    cmdargs = "-D"
    path = "/usr/local/samba-3.0/sbin/smbd"
    uid = 0
    auditid = 0
    standin = "/dev/console"
    standout = "/dev/console"
    standerr = "/dev/console"
    action = 2
    multi = 0
    contact = 2
    svrkey = 0
    svrmtype = 0
    priority = 20
    signorm = 15
    sigforce = 9
    display = 1
    waittime = 20
    grpname = "samba"
    [/code]


    //To start the new subsystem group,enter:
    #startsrc -g samba
    //or, to start an individual subsystem, enter:
    #startsrc [-h remote_host] -s smbd

    //To check whether the new Samba subsystem group is running, enter:
    #lssrc [-h remote_host] -g samba
    //or, to check an individual subsystem, enter:
    #lssrc [-h remote_host] -s smbd

    //To stop the new Samba subsystem group, enter:
    #stopsrc [-h remote_host] -g samba
    //or, to stop an individual subsystem, enter:
    #stopsrc [-h remote_host] -s smbd

    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core