标签:ctr order 系统 enter proxy mba object size gradient
SAMBA:
关闭防火墙:
iptables -F
systemctl disable firewalld
systemctl stop firewalld
systemctl status firewalld
安装samba:
yum install samba
/etc/samba/smb/comf //配置文件路径
sysctl samba start //修改配置文件需要重启
创建samba用户:
adduser zhw //创建无密码系统用户
smbpasswd -a zhw //为smb用户创建密码
//新建samba用户 即系统用户,新建用户不设置密码(所以不能登录)
添加用户:
adduser user1 user2 user3
smbpasswd user1
smbpasswd user2
smbpasswd user3
. 配置文件 /etc/samba/smb.conf
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
. 访问方式
\\192.168.16.107\user1 user1 password
\\192.168.16.107\user2 user2 password
\\192.168.16.107\user3 user3 password
遇到的问题:
解决方法
配置文件:
[public]
comment =Public Stuff
path =/home/zhw
public=yes
writable =no
printable =no
write list =user1,user2,user3
现在user1 user2 user3 三个用户可以访问\192.168.16.107\public,切只有读权限
安装方式:
yum install epel-relase
yum install nginx //epel方式安装
./configure --prefix=/usr/local/nginx --without-http_write_module //编译安装
启动方式:
/usr/local/nginx/sbin/nginx -c /usr/lcoal/nginx/conf/nginx.conf
/usr/local/nginx/sbin/nginx -s reload
nginx负载均衡:
基于轮询:
http{
upstream myweb{
server 10.0.0.10;
server 10.0.0.11;
server 10.0.0.12;
}
server{
listen 80;
location /{
proxy_pass http://myweb;
}
}
}
基于权重
http{
upstream myweb{
server 10.0.0.10 weight=2;
server 10.0.0.11 weight=1;
server 10.0.0.12 weight=3;
}
server{
listen 80;
location /{
proxy_pass http://myweb;
}
}
}
基于IP
[root@bogon home]# cat 1.conf
http{
upstream myweb{
ip_hash;
server 10.0.0.10;
server 10.0.0.11;
server 10.0.0.12;
}
server{
listen 80;
location /{
proxy_pass http://myweb;
}
}
}
vim ctrl+v 进入可视块模式 hostnamectl set-hostname cx2c
标签:ctr order 系统 enter proxy mba object size gradient
原文地址:http://www.cnblogs.com/cx2c/p/6925684.html