Linux里面时间CST是什么意思?

Linux里面时间CST是什么意思?,第1张

就是系统时区 系统时区设置为EDT或者CST 它们相差12小时一般刚安装有个默认时间叫:世界协调时间(Universal Time Coordinated,UTC)你问的是CST China Standard Time UTC+8:00 中国沿海时间(北京时间)date命令 – 显示日期与时间举个例子:显示当前时间:# date三 4月 12 14:08:12 CST 2019 这就是中国北京时间的意思,明白了么《Linux就该这么学》tzselect命令 – 查看设置时区tzselect命令在调用时不需要任何参数,它显示了一个由十几个地理区域组成的列表,人们可以粗略地将其视为大陆。按编号选择一个地理区域后,会显示这个区域的国家和城市列表。

对于许多与系统相关的任务和进程,使用正确的时区是必不可少的。例如,cron守护进程使用系统的时区执行cron作业,日志文件中的时间戳基于同一系统的时区。 环境 Centos 8检查现在的时区timedatectl是一个 命令 行实用程序,允许您查看和更改系统的时间和日期。 [root@localhost ~]# timedatectl               Local time: Tue 2020-03-31 16:35:23 CST           Universal time: Tue 2020-03-31 08:35:23 UTC                 RTC time: Tue 2020-03-31 08:35:23                 Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: yes               NTP service: active           RTC in local TZ: no更改时区在更改时区之前,您需要找出要使用的时区名称。要列出所有可用时区,请使用下面的 命令 : [root@localhost ~]# timedatectl list-timezones … Asia/Samarkand Asia/Seoul Asia/Shanghai Asia/Singapore Asia/Srednekolymsk … 然后使用set-timezone选项更改时区,比如更改为Europe/Berlin: [root@localhost ~]# timedatectl set-timezone Europe/Berlin使用创建链接的方式更改时区如果运行的是旧版本的Centos,比如Centos6之前的版本,并且系统上不存在timedatectl命令,则可以通过将/etc/localtime符号链接到/usr/share/zoneinfo目录中的时区文件来更改时区。 查看一下/usr/share/zoninfo下面的时区文件, [root@localhost ~]# ls /usr/share/zoneinfo/ [root@localhost ~]# ls /usr/share/zoneinfo/Asia/ 现在替换时区文件。 [root@localhost ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime [root@localhost ~]# date Tue Mar 31 16:53:59 CST 2020 可以看到已经切换到了CST中国标准时间总结在本文中,使用了两种方式修改时区。一种是使用timedatectl,另一种方式使用创建链接的方式。

1、首先第一步就是进行which nginx,查看nginx是否存在。

2、接着就是进行yum list nginx#列出nginxyum install nginx        #安装nginx, 期间 出现 is this ok【Y/N】: 输入y#看见{Complete! }  安装成功。

3、然后就是进行which nginx #查看nginx是否存在service nginx start接着就是进行启动nginx进程方法即可。

4、最后就进行浏览器中输入IP,能显示nginx的欢迎页面表示nginx已经安装成功,然后也可以关闭防火墙:service iptables stop即可,如下图所示。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/8306935.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-15
下一篇2023-04-15

发表评论

登录后才能评论

评论列表(0条)

    保存