Samba installation

zhaozj2021-02-16  57

1. Install Samba First Verify that Samba RPM -QA | GREP Samba has been installed in your machine, if Samba-Common-2.2.7A-7.9.9.0 Samba-2.2.7a appears -7.9.0 Congratulations, you have already installed Samba, if there is no more than those stuff, please install, install the installation method is very simple, redhat Linux 9.0, there is // CDROM / redHat / RPMS / below My detailed installation process puts the first CD into the optical drive, he will automatically hook, save your own MOUNT #CD / mnt / cdrom / redhat / rpms (idea case letter, otherwise it will be wrong) # rpm -IVH Samba-Common-2.2.7a-7.9.0 (this is installed first, if you do not have to write the following Samba-Common-2.2.7a-7.9.0, such as writing Samba-C Time, more Tab keys, very resurgent) #rpm -ivh samba-2.2.7a-7.9.0 # rpm -ivh samba-client-2.2.7a-7.9.0 (client) is installed above After things, it is basically, but for the convenience of configuration and the use of Redhat Linux9.0, I recommend installing the following two Dongdong RedHat-Config-Samba-1.0.4-1, Samba-Swat-2.2. 7A-7.9.0 CDs, where redhat-config-samba-1.0.4-1 is in the first CD, Samba-Swat-2.2.7a-7.9 in the second CD, installation method and The same is the same. Through the brief introduction above, I think you have already installed it. Test # rpm -qa | grep samba (this is what meanings should know, if you don't know, it is recommended to learn Linux basic order) RedHat-Config-Samba-1.0.4-1 Samba-Common-2.2.7A-7.9.0 Samba-Client-2.2.7A-7.9.0 Samba-Swat-2.2.7A-7.9.0 Samba-2.2.7A- 7.9.0 ok, installation success! (Recommendation, the above thing is best installed once, if you have it, if you have it, you can uninstall it first, so you can deepen the impression. If you uninstal it, you may have no complete uninstallation. , Workaround Do not continue to find uninstall, do not force installation) 2. Configuration (1) method 1 utilization Our installed redHat-config-samba-1.0.4-1 is configured, the methods are as follows: Start ---> System Settings ---> Server Configuration ---> Samba Server (I wrote this article in Linux, so graphics I won't cut, I have to use a simple say) Preferences -> Server settings, here you can make some basic settings to the Samba server, it should be said that it is relatively simple, I don't have to introduce, After configuring, remember to restart the service. There are two ways to restart: #service smb start or restart # / etc / rc.d / init.d / smb start (2) Method 2 Using Samba-Swat-2.2. 7A-7.9.0 First, you want to modify the SWAT configuration file, the default case is closed service swat {port = 901 (SWAT is 901) socket_type = stream (something like TCP protocols, huh, this is My own understanding) WAIT = no online_from = 127.0.0.1 (only from this Swat, the key!) User = root (started Swat) server = / usr / sbin / swat log_on_failure = userid disable =

YES (must change Yes to no)} After the modification, starting xinetd, you can start the way, just as I said, then in the browser: http://127.0.0.1: 901 / heavy press Car, you found that you succeed! (Note that this IP address should be as talented by your IP address in the swat configuration file!) As for how to use SWAT, you should not be a problem, after the configuration is completed, remember The restart service is ok. Yes, in order to start Samba and Swat when starting, you can: #setup, then find the system service, you can do it in SMB and SWAT, you can also #ntsysv, the same Effect. (3) Method 3 Util Samba-2.2.7a-7.9.0, this is the most fundamental thing, no matter what tool, master the principle is the most important, like web production, although there are many tools, but Be sure to be familiar with the html language, you can make a good web page (蛋!) After installing Samba-2.2.7a-7.9.0, you will form your own file SMB.CONF SMBPASSWD SMBUSERS LMHOSTS in / etc / samba / If there is no one, you can create a modified smb.conf file in touch: Guest OK and public are the same, read only and Writable are the opposite, there is no difference in Workgroup = (Workgroup, Fill in Your current LAN Working Group) NetBIOS = (Best is your machine name, if you cancel the change, the default is your Linux machine name, but it is best to fill in it) Client Code Page = 936 (default It is 850, 936, the meaning of Simplified Chinese, this should be remembering, don't you remember that your mount your WINDOWS system is ???, because you didn't add -O IoCharset = CP936.) Guest Accent = Nobody (Guest account, this is related to the shared file you defined, where Nobody is in SMBUsers) SECURITY = Share (there are four levels, not much to say) Encrypt passwords = YES (encrypted password, Win98 / 2000 transmission password It is encrypted, so you want yes, you have the content of [global], in fact, there are many, the level is limited. Below is what you want to open, to explain, the property shared by the folder Depending on the permissions of this cheek in Linux [myxfc] comment = m YXINFC path = / home / xinfc read online = no guest ok = yes [tmp] path = / home valid users = hehl write list = @staff read only = no guest ok =

YES sharing is actually very simple, mainly the problem of path and permissions, these two are clear, there should be no problem, I will introduce it, restart the service! Maybe you will find the client unable to connect, Grandma It's really angry, busy for so long, or can not access, why? 1) The client should install TCP / IP NetBIOS IPX (this stuff is not very understandable) 2LmHosts, IP address and NetBIOS name correspondence. 3) iptables (The worst, because he, I wasted two days! I got a small conclusion, do iptables before doing various configurations!) Because I don't understand Iptables, my solution is Two: 1: #setup then select the firewall, then close 2. Modify / etc / sysconfig / iptables -a input -j rh-lokit-0-50-infut -a forward -j rh-tokiit-0-50-input -A RH-LOKKIT-0-50-INPUT -I LO -J ACCEPT -A RH-LOKKIT-0-50-Input -P TCP -M TCP - Dport 0: 1023 --Syn -j Accept -a RH- Lokkit-0-50-infut -p tcp -m tcp --dport 2049 --syn -j repject -a rh-tokit-0-50-infut -p udp -m udp --dport 0: 1023 -j resport- A RH-LOKKIT-0-50-INPUT -P UDP -M UDP - DPORT 2049 -J REJECT -A RH-LOKYT-0-50-Input -P TCP -M TCP - Dport 6000: 6009 - Syn - J REJECT -A RH-LOKKIT-0-50-INPUT -P TCP -M TCP - Dport 7100 --Syn -j Reject Commit Add -A RH-LOKKIT-0-50-Input -p UDP -M UDP - DPORT 137: 139 -J Accept restarts the firewall can be. #service iptables Start should be, it is recommended to practice more, because you are a novice, there may be many places to laugh, but I want to tell you that I learn Linux. It is serious, I have hit so many things in a breath, and I still have to eat, Hey

转载请注明原文地址:https://www.9cbs.com/read-14871.html

New Post(0)