1, Check the ip address ifconifg;
2, Check whether the samba server is installed , rpm -qa | grep samba;
3 , if there is such a server, start service smb start, otherwise install yum install samba;
samba-3.0.21b-2 // If there is this line of output, it means that smb is installed, otherwise it is necessary Installation
4.Configure after the installation is complete vim /etc/samba/smb.conf //Open the smb configuration FileSimple configuration I made
[html] comment=web path=/var/www/html writable=yes valid users=gys create mode=0644 directory mode=0755 force group=apache force user=apache
5. After the configuration is completed, restart service smb restart!
6. Access the linuxIP address locally and you will see it as shown below:
7. Because IP is affected by dhcp, it will change every time Linux is restarted. You can configure vim /etc/sysconfig/network-scripts/ifcfg-eth0 to set it to a fixed IP address
DEVICE="eth0" HWADDR="00:0C:29:66:32:21" IPV6INIT="yes" NM_CONTROLLED="yes" ONBOOT="yes" TYPE="Ethernet" UUID="2bb01f9d-af60-49a6-a3bf-02d45fc48855" BOOTPROTO=static IPADDR=192.168.1.57 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=118.118.118.1 DNS2=114.114.114.114
The above is the detailed content of Detailed explanation of how to create a shared folder under Linux. For more information, please follow other related articles on the PHP Chinese website!