三台主机
rsyslog ,mysql ,loganalyzer
1 rsyslog
yum install rsyslog-mysql
scp /usr/share/doc/rsyslog-8.24.0/mysql-createDB.sql 192.168.30.17:
vim /etc/rsyslog.conf
$ModLoad ommysql
*.info;mail.none;authpriv.none;cron.none :ommysql:192.168.30.17,Syslog,syslog,centos
2 mysql
mysql < mysql-createDB.sql
mysql> grant all on Syslog.* to syslog@'192.168.30.%' identified by 'centos';
mysql> flush privileges;
3 loganalyzer
yum install httpd php php-mysql php-gd
systemctl restart httpd
tar xvf loganalyzer-4.1.6.tar.gz
cp -r loganalyzer-4.1.6/src /var/www/html/log
touch /var/www/html/log/config.php
chmod 666 /var/www/html/log/config.php
http://loganalyzer/log
chmod 644 /var/www/html/log/config.php
挂载规则
相对路径
挂载点:/dir/subdir
/dir dirname
subdir basename
vim /etc/auto.master
/dir autofs子配置文件路径
vim autofs子配置文件路径
subdir mountdev
/dir1/dir2 cdrom
/dir1/dir5 usb
/dir3/dir4 nfs
/dir3/dir6 samba
vim /etc/auto.master
/dir1 autofs子配置文件路径1
/dir3 autofs子配置文件路径2
vim autofs子配置文件路径1
dir2 cdrom
dir5 usb
vim autofs子配置文件路径2
dir4 nfs
dir6 samba
/misc/cd cdrom
vim /etc/autofs.master
/misc/ 子配置文件
vim 子配置文件
cd cdrom
192.168.30.17;/data/nfsdir --> /d1/d2/d3/nfs
vim /etc/auto.master
/d1/d2/d3 /etc/test.autofs
vim /etc/test.autofs
nfs -fstype=nfs,vers=3,rw 192.
168.30.17;/data/nfsdir
家目录NFS自动挂载
nfsserver
/home/user1,user2
nfsuser1
nfsuser2
mount 192.168.30.7:/data/nfs1 /home/nfsuser1
绝对路径
vim /etc/auto.master
/- 子配置文件
vim 子配置文件
/dir/subdir mountdev
实验:利用NFS服务实现家目录的自动挂载
三台主机
一台nfs sever
一台绝对
一台相对
UNC windows
\\ip\sharename
smb
linux unix:nfs
samba:smb 服务
\\sambaip|netbios\sharename
linux linus: kernel git svn
netbios = computername+[00]-->ip
lmhosts
wins
dns
broadcast
c:\windows\system32\drivers\etc\hosts
最长16个字符
hostname
computer
\\ip\share
/data/tools1
/app/tools2
实验:针对不同的用户设置不同的共享目录和权限
vim /etc/samba/smb.conf
[global]
workgroup = WANGGROUP
security = user
netbios name = smbsrv7
passdb backend = tdbsam
log file = /var/log/samba/log.%I
log level = 2
config file = /etc/samba/conf.d/%U
[share]
comment=samba share dir
path=/data/tools
read only = yes
[root@centos7 conf.d]#cat /etc/samba/conf.d/smb2
[share]
path=/data/smb2
writeable=yes
[root@centos7 conf.d]#cat /etc/samba/conf.d/smb3
[share]
path=/data/smb3
实验:多用户挂载
client
useradd smb1
useradd smb2
useradd smb3
vim /etc/fstab
//192.168.30.7/share /mnt cifs username=smbshare,password=centos,multiuser 0 0
mount -a
su - smb1
cifscreds add sambaserverip
proxy
isa
GPL
http://www.magedu.com/news
http://www.magedu.com/study/
tcp 80
QQ IP
udp 8000
tcp 443 https://www.baidu.com/
数据www.tencent.com
msn :www
isa server
http://ip/a.vbs
1M
mtu 1500
ethernet(ip(tcp(app(data))))
http tcp80 10
https tcp443 10
web 10
jump
标签:www,samba,log,配置文件,vim,etc,日志,loganalyzer,图形 From: https://www.cnblogs.com/xuxuxu-2022/p/17554837.html