八个步骤修改linux时区
For ubuntu: [1]http://webonrails.com/2009/07/15/change-timezone-of-ubuntu-machine-from-command-line/
2
Logged in as root, check which timezone your machine is currently using by executing `date`. You'll see something like Mon 17 Jan 2005 12:15:08 PM PST, PST in this case is the current timezone.
3
Change to the directory /usr/share/zoneinfo here you will find a list of time zone regions.Choose the most appropriate region, if you live in Canada or the US this directory is the "America" directory.
4
If you wish, backup the previous timezone configuration by copying it to a different location. Such as
mv /etc/localtime /etc/localtime-old
5
Create a symbolic link to the appropriate timezone from /etc/localtime. Example:
ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
6
If you have the utility rdate, update the current system time by executing
/usr/bin/rdate -s time-a.nist.gov
7
Set the ZONE entry in the file /etc/sysconfig/clock file (e.g. "America/Los_Angeles")
8
Set the hardware clock by executing:
/sbin/hwclock --systohc
2.修改mysql时区
MySQL 时区默认是服务器的时区。
可以通过以下命令查看SQL代码mysql> show variables like '%time_zone%'; +------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | CST | | time_zone | SYSTEM | +------------------+--------+ 2 rows in set (0.00 sec) 可以通过修改my.cnf
在 [mysqld] 之下加
default-time-zone=timezone
来修改时区。如:
default-time-zone = '+8:00'
改了记得重启msyql喔
注意一定要在 [mysqld] 之下加 ,否则会出现 unknown variable 'default-time-zone=+8:00'
另外也可以通过命令 set t
相关文档:
Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......
shell 编程中使用到得if语句内判断参数
–b 当file存在并且是块文件时返回真
-c 当file存在并且是字符文件时返回真
-d 当pathname存在并且是一个目录时返回真
-e 当pathname指定的文件或目录存在时返回真
-f 当file存在并且是正规文件时返回真
-g 当由pathname指定的文件或目录存在并且设置了SGID位时返回为真
......
“工欲善其事 必先利其器”现在将一些常见的调试工具进行一下总结.
【1】
名称:MEMWATCH
功能:
1、MEMWATCH 支持 ANSI C
2、它提供结果日志纪录
3、能检测双重释放(double-free)
4、错误释放(erroneous f ......
linux中grep命令详解
在linux中grep命令是非常有用的,它和管道(|)配合使用,非常强大,用于搜索文本文件.如果想要在几个文本文件中查找一字符串,可以使用‘grep’命令。‘grep’在文本中搜索指定的字符串。
假设您正在‘/usr/src/linux/Documentation’目录下搜索带字符串‘magic&rs ......
1.SIGHUP信号
UNIX中进程组织结构为 session (会话)包含一个前台进程组及一个或多个后台进程组,一个进程组包含多个进程。一个session可能会有一个session首进程,而一个session首进程可能会有一个控制终端。一个进程组可能会有一个进程组首进程。进程组首进程的进程ID与该进程组ID相等。这 ......