首页 技术 正文
技术 2022年11月15日
0 收藏 749 点赞 4,091 浏览 1602 个字

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\用户名 ——–》登录到用户的家目录下 
\\服务端的ip\public ——–》登录到共享目录

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

Samba服务与Nginx服务

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

1.防火墙没关

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

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

Samba服务与Nginx服务

Samba服务与Nginx服务

Samba服务与Nginx服务

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

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

Samba服务与Nginx服务

Samba服务与Nginx服务

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

Samba服务与Nginx服务

Samba服务与Nginx服务

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

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

Samba服务与Nginx服务

补充
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

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,489
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,904
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,737
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,490
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,128
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,291