易截截图软件、单文件、免安装、纯绿色、仅160KB

八个步骤修改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


相关文档:

linux多线程设计


linux多线程设计
  1 引言
  线程(thread)技术早在60年代就被提出,但真正应用多线程到操作系统中去,是在80年
代中期,solaris是这方面的佼佼者。传统的Unix也支持线程的概念,但是在一个进程(process)中只允许有一个线程,这样多线程就意味着多
进程。现在,多线程技术已经被许多操作系统所支持,包括Windo ......

linux中vi显示中文乱码的问题


由于在windows下默认是gb编码,而我的vim默认是utf-8(gedit默认也是utf-8),所以打开会成乱码。修改了一下配置文件,使vi支持gb编码就好了。
$vi ~/.vimrc
let &termencoding=&encoding
set fileencodings=utf-8,gbk
$:wq
再次打开vi,显示就正常了。
vim中编辑不同编码的文件时需要注意的一些地方 ......

linux shell编程if语句内判断参数

shell 编程中使用到得if语句内判断参数
–b 当file存在并且是块文件时返回真
-c 当file存在并且是字符文件时返回真
-d 当pathname存在并且是一个目录时返回真
-e 当pathname指定的文件或目录存在时返回真
-f 当file存在并且是正规文件时返回真
-g 当由pathname指定的文件或目录存在并且设置了SGID位时返回为真
......

linux 调试工具

 “工欲善其事 必先利其器”现在将一些常见的调试工具进行一下总结.
 【1】
名称:MEMWATCH
功能:
    1、MEMWATCH 支持 ANSI C
    2、它提供结果日志纪录
    3、能检测双重释放(double-free)
    4、错误释放(erroneous f ......

linux内存管理

    页申请的核心调用是: __alloc_pages(). 页申请顺序如下:
    首先找最大能符合的块, 如果一个空闲块不能满足, 更高一级的块将分割成2个buddy, 一个被占用, 一个放入低一级的freelist.
    当块被释放时, 检查每对buddy, 如果两者都空闲, 把他们合并到更高一级的块数组 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号