码迷,mamicode.com
首页 > 其他好文 > 详细

samba共享

时间:2017-09-21 09:45:28      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:共享   samba   

项目实践+博客作业:

(1) 使用samba共享/data/application/web,在目录中提供wordpress; 

(2) 使用samba客户端挂载samba server共享的目录至/var/www/html;

(3) 客户端(lamp),部署wordpress,并让其正常访问;要确保能正常发文章,上传图片;

(4) 客户端2(lamp),挂载samba server共享的目录至/var/www/html;验正其wordpress是否可被访问;要确保能正常发文章,上传图片;

答:

一、# yum install -y samba

    # iptables -F

    # setenforce 0

    # systemctl start smb.service

       

    # vi /etc/samba/smb.conf

    [myshare]

    comment = my share

    /data/application/web

    browseable = yes

    writable = yes

    public = no

    write list = little

    create mask = 0777

    directory mask = 0777

       

    # mkdir -pv /data/application/web

    # systemctl reload smb.service

    # pdbedit -a -u little

    # chown -R little:little /data/application/web

    # cp wordpress/wp-config-sample.php wordpress/wp-config.php

    # vim wordpress/wp-config.php

    # chmod o+w wordpress/wp-content

二、# yum install -y mariadb-server

    # systemctl start mariadb.service

    # mkdir -pv /var/www/html

    # systemctl reload php-fpm.service

    # mount -t cifs -o username=little,password=123123 //172.16.72.1/myshare /var/www/html

三、# yum install -y httpd php-fpm php-mysql

    # vi /etc/httpd/conf.d/vhosts-www.conf

    <VirtualHost 172.16.72.1:80>

       DocumentRoot "/var/www/html"

       ServerName www.little.com

       directoryIndex index.php

       ProxyRequests on

       <Directory "/myweb/vhosts/www"

          Options None

          AllowOverride None

          Require all granted

       </Directory>

    <VirtualHost>


    # groupadd -g 1001 little

    # useradd -u 1001 -g little little

    # systemctl reload php-fpm.service httpd.service

    # mkdir -pv /var/www/html

    # mount -t cifs -o username=little,password=123123 //172.16.72.1/myshare /var/www/html


samba共享

标签:共享   samba   

原文地址:http://12496428.blog.51cto.com/12486428/1967216

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!