日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 人工智能 > ChatGpt >内容正文

ChatGpt

在AIX上编译Samba

發(fā)布時(shí)間:2023/11/29 ChatGpt 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 在AIX上编译Samba 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

我在AIX上編譯Samba的實(shí)況貼,貼上來備忘。

廢話不說,進(jìn)入正題。

?

我用的gcc版本:

bash-3.00# gcc -v

Using built-in specs.

Target: powerpc-ibm-aix6.1.0.0

Configured with: ../gcc-4.2.4/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --host=powerpc-ibm-aix6.1.0.0

Thread model: aix

gcc version 4.2.4?

為了執(zhí)行configure你可能需要在你的AIX上安裝一些prerequirese ,這個(gè)就不說了,你執(zhí)行configure由于缺少prerequirese 失敗的話,會提示的,跟著安就好了。?

注意PATH里面不要包括/usr/ucb,如果包含的話,會提示說后繼操作可能會報(bào)錯(cuò)。

如果你的PATH里面有/usr/local/bin/opt/freeware/bin等自己的路徑,注意把他們放到系統(tǒng)原有path的后面而不是前面,避免和系統(tǒng)的沖突,即這樣:

export PATH=$PATH:/usr/local/bin

而不是:export PATH=/usr/local/bin:$PATH

我用的是:/usr/bin:/etc:/usr/sbin:/usr/bin/X11:/sbin:/usr/java5/jre/bin:/usr/java5/bin:/usr/local/bin:/opt/freeware/bin

?

進(jìn)入source3 (3.x的代碼)

./configure --prefix=/usr/local/samba3 --with-static-modules=MODULES

然后你make,咦!報(bào)錯(cuò)!

嘿嘿,原來是你需要這樣:

make -d -f Makefile-noincludes

然后繼續(xù)make,結(jié)果報(bào):

Linking non-shared library bin/libsmbclient.a

make: Cannot find a rule to create target EXTRA_FLAGS from dependencies.

我暈~~~

然后NN久的googlebaidu…..糾結(jié)痛苦……

?

終于找到一老外牛人在solaris下編譯samba的帖子(原帖地址:http://panoramicsolution.com/blog/?p=134),參照他的帖子,

根據(jù)他的參數(shù),我修改了下下,就是×××的部分,如下:

./configure --with-automount --without-ldap --enable-socket-wrapper \

--with-quotas --with-sys-quotas --with-acl-support --with-aio-support \

--with-pam --enable-static –prefix=/usr/local/samba3

。。。。。。。。

終于……哇!成功啦!!!!!O(_)O哈哈~

?

然后根據(jù)帖子,又修改了Makefile-noincludes修改同時(shí),我一不做二不休,把Makefile-noincludes里面的EXTRA_FLAGS一行也大刀砍去,哼!叫你找不到規(guī)則!

就是把這行:

$(LIBSMBCLIENT_THREAD_OBJ) ../nsswitch/wins.o ../nsswitch/winbind_nss_linux.o: EXTRA_FLAGS := $(PTHREAD_CFLAGS)

注釋掉即可。

?

現(xiàn)在Make,哈哈,成功!!!

接著乘勝追擊,make install下下~~

成功~~~

?

可是,你注定會發(fā)現(xiàn)居然install后的安裝目錄里面竟然沒有smbdnmbd

然后你就又不得不看下Makefile里面的install一節(jié),發(fā)現(xiàn)個(gè)一勞永逸的辦法,那就是要重新install,用:make install-everything

O(_)O哈哈~

install完成后,結(jié)果直接執(zhí)行smbd,驚奇地發(fā)現(xiàn):怎么還是沒有smbdnmbd

我暈~~哈哈,你再執(zhí)行make installbin想單獨(dú)安裝bin文件,

結(jié)果發(fā)現(xiàn)安裝日志里面寫了安裝所有bin目錄下的程序,可就是沒有安裝smbdnmbd,暈死!

唉,算了,目前我就是手動(dòng)copy ~~J哈哈

?

好了,現(xiàn)在執(zhí)行testparm測試下下。

報(bào)錯(cuò):

Load smb config files from /usr/local/samba3/lib/smb.conf

rlimit_max: rlimit_max (2000) below minimum Windows limit (16384)

params.c:OpenConfFile() - Unable to open configuration file "/usr/local/samba3/lib/smb.conf":

??????? No such file or directory

Error loading services.

此時(shí),需要將源碼包里的./examples/smb.conf.default復(fù)制到/usr/local/samba3/lib/smb.conf

再執(zhí)行testparm

報(bào)錯(cuò):

Could not load program /usr/local/samba3/bin/testparm:

??????? Dependent module libwbclient.so could not be loaded.

Could not load module libwbclient.so.

System error: No such file or directory

?

明顯沒有找到庫嘛,把/usr/local/samba3/lib/:/opt/freeware/lib加到了LD_LIBRARY_PATH里面,分別放入/.dtprofile/etc/profile,隨便對這兩個(gè)文件中的某個(gè)執(zhí)行下source

重新testparm,成功O(_)O~

Load smb config files from /usr/local/samba3/lib/smb.conf

rlimit_max: rlimit_max (2000) below minimum Windows limit (16384)

Processing section "[homes]"

Processing section "[printers]"

Loaded services file OK.

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

只是發(fā)現(xiàn)有個(gè)小小的瑕疵:

rlimit_max: rlimit_max (2000) below minimum Windows limit (16384)

原來是系統(tǒng)限制了open file的數(shù)量,小小地修改之:

ulimit –n 20000 (最好寫入/etc/security/limits文件)

搞定!?

?

注意:

1. 貌似,兩個(gè)AIX在同一網(wǎng)段,用的后面的“要求輸入用戶名和密碼的samba配置文件”的配置文件,那么,需要確保他們的workgroup是不一樣,否則sambawindows上映射網(wǎng)絡(luò)驅(qū)動(dòng)器會有問題,提示:同一個(gè)用戶不能用一個(gè)以上的用戶名連接服務(wù)器。?

?

要求輸入用戶名和密碼的samba配置文件:

?[global]?

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH

?? workgroup = NEWGROUP?

# server string is the equivalent of the NT Description field

?? server string = AIX 108.71 Samba Server?

# Security mode. Defines in which mode Samba will operate. Possible

# values are share, user, server, domain and ads. Most people will want

# user level security. See the Samba-HOWTO-Collection for details.

?? security = user

?? netbios name = aix71?

# If you want to automatically load your printer list rather

# than setting them up individually then you'll need this

?? load printers = yes?

# this tells Samba to use a separate log file for each machine

# that connects

?? log file = /usr/local/samba/var/log.%m?

# Put a capping on the size of the log files (in Kb).

?? max log size = 50?

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names

# via DNS nslookups. The default is NO.

?? dns proxy = no

?#============================ Share Definitions ==============================

[homes]

?? comment = Home Directories

?? browseable = no

?? writable = yes?

# NOTE: If you have a BSD-style print system there is no need to

# specifically define each individual printer

[printers]

?? comment = All Printers

?? path = /usr/spool/samba

?? browseable = no

# Set public = yes to allow user 'guest account' to print

?? guest ok = no

?? writable = no

?? printable = yes?

[brant]

;?? comment = Mary's and Fred's stuff

?? path = /

?? valid users =? root

?? public = yes

?? writable = yes

?? browseable = yes

;?? printable = no

;?? create mask = 0765

?

如果不要輸入密碼,把security改為share可。

轉(zhuǎn)載于:https://blog.51cto.com/brantc/436144

總結(jié)

以上是生活随笔為你收集整理的在AIX上编译Samba的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。