zoukankan      html  css  js  c++  java
  • Samba服务与Nginx服务

    Samba服务:

    1 准备环境
    =====>part1:
    iptables -F 清楚防火墙配置
    #systemctl disable firewalld #开机默认关闭
    #systemctl stop firewalld #立即关闭防火墙
    #systemctl status firewalld 查看防火墙状态

    setenforce 0
    #/etc/sysconfig/selinux
    #SELINUX=disabled


    =====>part2:
    配置IP

    2 安装软件包
    yum -y install samba  


    3 修改配置文件
    /etc/samba/smb.conf

    [public]
    comment = Public Stuff
    path = /share
    public = yes
    writable = no
    printable = no
    write list = alex,lili
    
    添加共享文件夹public

    4 启动服务

    systemctl restart smb

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

    补充:用户名必须为系统用户,  #useradd jason《用户名》----不能设置密码 ,否则变成可登陆操作系统的用户;另外设置smb密码。  -a ---》添加用户

      

    Tips 如果连接速度过慢,可能原因是:

    1.防火墙没关

    2.网络问题、能否ping通、IP地址是否有冲突

    3.可以更改/etc/hosts 文件更改DNS解析

    ///// 怎么让ssh连接速度变快?

    更改配置文件 /etc/ssh/sshd_config

     ///////服务端共享文件夹/share 

     备注:1;按ctrl+v进入可视块,再按d删除。;在samba下表示注释。

             2;将path的路径改为/share路径。

    补充
    net use #查看
    net use * /del #清除

     -------------------------------------------------------

     Nginx服务:

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

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

    2 安装软件包
    二进制方式安装
    yum install epel-release -y
    yum install nginx -y
    源码安装
    yum gcc-* glibc-* make libtool ncurse-devel pcre -y

    tar xvf nginx.....tar.gz
    cd nginx/
    #./configure --prefix=/usr/local/nginx --with-pcre=/usr/lib64/
    #./configure --prefix=/usr/local/nginx --without-http_rewrite_module
    #make
    #make install

    3 修改配置文件

    如果安装在/usr/local/Nginx下 ; 则为:/usr/local/nginx/conf/nginx_conf
    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 重新加载配置文件

    5.测试

    补充:
    状态码:
    200 访问成功
    3开头,重定向
    4开头,客户端的问题
    5开头,服务端的问题

      

    5 测试

    Nginx负载均衡可看blog;http://www.cnblogs.com/ArmoredTitan/p/6925496.html

  • 相关阅读:
    k3 cloud点击按钮单开单据
    k3 cloud _LK表字段代表的意思
    sql server根据触发器名称查看代码
    sql server中查询所有触发器已经对应的表名称
    面向架构编程
    领域设计:领域事件
    QApplication: No such file or directory 完美解决方案
    C++ GUI Qt4编程(第二版) 源代码 下载
    ArcMap进行天空开阔度(SVF)分析
    wpf 高性能自定义chart
  • 原文地址:https://www.cnblogs.com/junxiansheng/p/6926164.html
Copyright © 2011-2022 走看看