时间服务器-NTP
时间服务器 - NTP
一、NTP 简介
网络时间协议(英语:Network Time Protocol,缩写:NTP)是在数据网络潜伏时间可变的计算机系统之间通过分组交换进行时钟同步的一个网络协议,位于 OSI 模型的应用层。自 1985 年以来,NTP 是目前仍在使用的最古老的互联网协议之一。NTP 由特拉华大学的 David L. Mills(英语:David L. Mills)设计。
NTP 意图将所有参与计算机的协调世界时(UTC)时间同步到几毫秒的误差内。
NTP 要点:
- 地球共有 24 个时区,而以格林威治时间 (GMT) 为标准时间;
- 中国本地时间为 GMT +8 小时;
- 最准确的时间为使用原子钟 (Atomic clock) 所计算的,例如 UTC (Coordinated Universal Time) 就是一例;
- Linux 系统本来就有两种时间,一种是 Linux 以
1970/01/01
开始计数的系统时间,一种则是 BIOS 记载的硬件时间; - Linux 可以透过网络校时,最常见的网络校时为使用 NTP 服务器,这个服务启动在
udp port 123
; - 时区档案主要放置于
/usr/share/zoneinfo/
目录下,而本地时区则参考/etc/localtime
; - NTP 服务器为一种阶层式的服务,所以 NTP 服务器本来就会与上层时间服务器作时间的同步化, 因此
nptd
与ntpdate
两个指令不可同时使用; - NTP 服务器的联机状态可以使用
ntpstat
及ntpq -p
来查询; - NTP 提供的客户端软件为
ntpdate
这个指令; - 在 Linux 下想要手动处理时间时,需以
date
设定时间后,以hwclock -w
来写入 BIOS 所记录的时间。 - NTP 服务器之间的时间误差不可超过 1000 秒,否则 NTP 服务会自动关闭。
更多 NTP 详情可以参考:鸟哥的 Linux 私房菜– NTP 时间服务器
二、ntpd 服务
环境:CentOS
yum 安装
Samba
Samba 应用
samba 是在 Linux 和 UNIX 系统上实现 SMB 协议的一个免费软件。
samba 提供了在不同计算机(即使操作系统不同)上共享服务的能力。
关键词:
samba
,selinux
1. 安装配置 samba
本文将以一个完整的示例来展示如何配置 samba 来实现 Linux 和 Windows 的文件共享。
目标:假设希望共享 Linux 服务器上的 /share/fs 目录。
1.1. 查看是否已经安装 samba
- CentOS:
rpm -qa | grep samba
- Ubuntu:
dpkg -l | grep samba
1.2. 安装 samba 工具
- CentOS:
yum install -y samba samba-client samba-common
- Ubuntu:
sudo apt-get install -y samba samba-client
1.3. 配置 samba
Systemd 应用
Vim 应用
oh-my-zsh 应用
oh-my-zsh 应用
1. Zsh 简介
1.1. Zsh 是什么
使用 Linux 的人都知道:*Shell_ 是一个用 C 语言编写的程序,它是用户使用 Linux 的桥梁。Shell 既是一种命令语言,又是一种程序设计语言。
Shell 的类型有很多种,linux 下默认的是 bash,虽然 bash 的功能已经很强大,但对于以懒惰为美德的程序员来说,bash 的提示功能不够强大,界面也不够炫,并非理想工具。
Zsh 也是一种 Shell(据传说 99% 的 Bash 操作 和 Zsh 是相同的),它的功能极其强大,只是配置过于复杂,起初只有极客才在用。后来,出现了一个名叫 oh-my-zsh 的开源项目,使用 zsh 就变得十分简易了。
2. Zsh 安装
2.1. 环境要求
- CentOS 6.7 64 bit
- root 用户
2.2. 安装 zsh
teamspeak教程
teamspeak3 教程+汉化 (偷懒整理的链接)
我的服务器地址
ts3.saint1337.top
官网下载链接
https://www.teamspeak.com/zh-CN/downloads/
整合包链接
http://mtw.so/60CuQh 访问密码:woshishabi
汉化插件链接
csgo-practice-mode 文档
csgo-practice-mode
Status: Supported, actively developed.
Practice Mode is a sourcemod plugin for helping players/teams run practices. See this YouTube video for a demonstration. Check out the features and command list below for a better understanding of all the tools practicemode provides.
Download
Download from the releases section.
You may also download the latest development build if you wish. If you report any bugs from these, make sure to include the build number (when typing sm plugins list
into the server console, the build number will be displayed with the plugin version).
Installation
Confirm you have SourceMod and MetaMod:Source. You must have a 1.9+ build of sourcemod.
Extract all files in the release zip from above to the
csgo
server directory. You should see apracticemode.smx
file inaddons/sourcemod/plugins
.To start practicemode via the
.setup
command, either add yourself as a sourcemod admin or remove the admin requirement.
Note: access to the .setup requires having the sourcemod admin changemap flag (“g”) by default. See the wiki for more information on changing how admin access works.
simple-practicemode 文档
simple-practicemode
Intro
基于csgo-practice-mode,删减了部分内容,更好地适配csgowiki-pack
Feature
- 不再与csgo-pug-setup和get5兼容。
simple-practicemode
是一个单独且纯粹的跑图插件。 - 删除原跑图插件的本地道具仓库功能,
.nades
、.cats
相关功能取消。因为csgowiki-pack
已经具有部分道具合集的功能。 - 重构
botmimic
插件,使其适配sourcemod v1.11
语法,重构后的插件名/Libary名称为botmimic_fix
。 - 新增计时器面板功能,
.timers
或。timers
开启,整合了三种计时器类型。 - 新增
。command
指令触发方式,方便中文输入法用户避免频繁切换输入法。 - 更全面友好的汉化内容。
Compiling
necessary .inc
needed
compiled files:
botmimic_fix.smx
csutils.smx
practicemode.smx