linux基础四----samba&&nginx

一 samba 

1环境配置:

  a.确保linux下防火墙关闭比或开放共享目录权限 iPtables -F

  b.确保setlinux关闭:setenforce 0

  c.配置iP

2安装软件包:yum install samba -y

3修改配置文件:

  路径: /etc/samba/smb.conf

 

4 启动服务
systemctl restart smb

5 测试
映射网络驱动
\\服务端的ip\用户名 --------》登录到用户的家目录下

\\服务端的ip\public --------》登录到共享目录

step1 mkdir /share

   挂着一块空闲的硬盘到 /share

step2 vim /etc/samba/smb.conf

    [public]
  comment = Public Stuff
  path = /share
  public = yes
  writable = no
  printable = no
  write list = alex,lili

step 3 systemctl restart smb

step 4 修改用户权限

 

chmod 775 /share (只能浏览内容,不能删)

step5 测试:

二 nginx

1 准备环境
=====>part1:
iptables -F
#systemctl disable firewalld #开机默认关闭
#systemctl stop firewalld #立即关闭
#systemctl status firewalld

setenforce 0
#/etc/sysconfig/selinux
#SELINUX=disabled
=====>part2:

配置ip

 

2.安装ngnix

 a.二进制安装:

    yum install epel-release -y
    yum install nginx -y

 b.源码安装:

   

 

 3.修改配置文件:通过 nginx 实现静态文件转发、反向代理和负载均衡的配置

 

4.启动服务

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
#/usr/local/nginx/sbin/nginx -s stop 关闭

#/usr/local/nginx/sbin/nginx -s reload 重新加载配置文件

 

转载于:https://www.cnblogs.com/mona524/p/6925809.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值