1. 安装 rpmbuild 环境
| 1 2 3 4 5 | #安装 rpm 包工具和依赖项 yum install rpmdevtools pcre-devel gcc make #生成 rpm build 目录树 rpmdev-setuptree | 
2.… 阅读全文
 
			
			
									
			
			
	1. 安装 rpmbuild 环境
| 1 2 3 4 5 | #安装 rpm 包工具和依赖项 yum install rpmdevtools pcre-devel gcc make #生成 rpm build 目录树 rpmdev-setuptree | 
2.… 阅读全文
SNMP : 简单网络管理协议, 典型的应用就是监控服务器的状态. 例如, 监控宝使用 SNMP 协议监控服务器的状态.
下面介绍 SNMP 服务的安装配置. 官网: http://www.net-snmp.org/
| 1 2 3 4 5 6 7 8 | yum install net-snmp #设置开机启动 systemctl enable snmpd systemctl start snmpd #查看当前版本, 这里是5.7.2 snmpd -v | 
SNMP支持不同的验证机制,这取决于不同的SNMP协议版本,监控宝目前支持v2c和v3两个版本, 我们使用 v3.… 阅读全文
在CentOS 6版本,时间设置有date、hwclock命令,从CentOS 7开始,使用了一个新的命令timedatectl。
整个地球分为二十四时区,每个时区都有自己的本地时间。在国际无线电通信场合,为了统一起见,使用一个统一的时间,称为通用协调时(UTC, Universal Time Coordinated)。
格林威治标准时间 (Greenwich Mean Time)指位于英国伦敦郊区的皇家格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的经线。(UTC与GMT时间基本相同,本文中不做区分)
中国标准时间 (China Standard Time)
| 1 | GMT + 8 = UTC + 8 = CST | 
夏令时(Daylight Saving Time) 指在夏天太阳升起的比较早时,将时钟拨快一小时,以提早日光的使用。(中国不使用)
RTC(Real-Time Clock)或CMOS时钟,一般在主板上靠电池供电,服务器断电后也会继续运行。仅保存日期时间数值,无法保存时区和夏令时设置。
一般在服务器启动时复制RTC时间,之后独立运行,保存了时间、时区和夏令时设置。
| 1 | timedatectl //等同于 timedatectl status | 
| 1 | timedatectl set-time "YYYY-MM-DD HH:MM:SS" | 
| 1 | timedatectl list-timezones | 
| 1 | timedatectl set-timezone Asia/Shanghai | 
| 1 | timedatectl set-ntp yes //yes或者no | 
| 1 2 | timedatectl set-local-rtc 1 hwclock --systohc --localtime //与上面命令效果一致 | 
注意 硬件时钟默认使用UTC时间,因为硬件时钟不能保存时区和夏令时调整,修改后就无法从硬件时钟中读取出准确标准时间,因此不建议修改。修改后系统会出现警告。
| 1 2 | timedatectl set-local-rtc 1 hwclock --systohc --utc //与上面命令效果一致 | 
| 1 2 3 4 5 6 | yum install ntp //安装ntp服务 systemctl enable ntpd //开机启动服务 systemctl start ntpd //启动服务 timedatectl set-timezone Asia/Shanghai //更改时区 timedatectl set-ntp yes //启用ntp同步 ntpq -p //同步时间 | 
如需更改时间服务器, 修改 /etc/ntp.conf… 阅读全文
如果已经将PHP更新到5.2.x,可以自行安装phpMyAdmin最新版3.x。
phpMyAdmin是一款MySQL数据库web化的管理工具。
| 1 | yum install phpMyAdmin | 
现在我们配置下phpMyAdmin。我们改下Apache的配置文件,使的phpMyAdmin不单单是本机访问。 如下所示:
| 1 | vi /etc/httpd/conf.d/phpMyAdmin.conf | 
注释或删除本地ip限制. 如下
| 1 | yum install vsftpd | 
编辑配置文件
| 1 | vi /etc/vsftpd/vsftpd.conf | 
我们这里使用虚拟用户的形式, 配置如下.
在 Zend 官网上找到 Zend Guard Loader 的下载页, 找到 Linux 版本的 Zend Guard Loader, 点击下载, 需要登录, 登录后会弹出下载提示, 开始下载, 复制实际下载地址, 用 wget 下载.
| 1 2 | yum install wget wget http://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar |