国产成人精品18p,天天干成人网,无码专区狠狠躁天天躁,美女脱精光隐私扒开免费观看

centos php時(shí)間設置的方法

發(fā)布時(shí)間:2022-05-22 11:04 來(lái)源:好主機 閱讀:95 作者:主機測評 欄目: 主機資訊 歡迎投稿:712375056

修改 linux 時(shí)區時(shí)間和 php 時(shí)區

問(wèn)題:

客戶(hù)美國服務(wù)器時(shí)間不對

解決步驟:

第一步,先修改硬件時(shí)區。

vim /etc/sysconfig/clock  將 ZONE="America/New_York" 注釋?zhuān)佣嘁恍?nbsp;ZONE="Asia/Shanghai"

第二步,修改系統時(shí)區

cp /etc/localtime /etc/localtime.bak  rm -rf /etc/localtime  ln -svf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  yum install ntpdate -y  ntpdate 0.centos.pool.ntp.org  date  clock -w         #將目前 Linux 的時(shí)間寫(xiě)到 BIOS 里面去!  clock -r         #檢查 BIOS 里面的時(shí)間

第三步,修改 php.ini 的時(shí)區設置

date.timezone = PRC

第四步,寫(xiě)個(gè) crontab 將時(shí)間同步(特殊情況下,加上這個(gè))

#Ansible: Time synchronization  00 01 * * * /usr/sbin/ntpdate 0.centos.pool.ntp.org >/dev/null

怎樣設置每次開(kāi)機同步一次時(shí)間

vim /etc/rc.local  usr/sbin/ntpdate 0.centos.pool.ntp.org >/dev/null

上面是設置 centos6.5 的時(shí)區和時(shí)間的,下面說(shuō)的是 centos7的

yum -y install ntp  systemctl enable ntpd  ntpdate -u cn.pool.ntp.org  systemctl start ntpd  #設置時(shí)區  timedatectl set-timezone Asia/Shanghai

以上就是centos php時(shí)間設置的方法的詳細內容,更多請關(guān)注1818.com其它相關(guān)文章!

發(fā)布者:5522

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。

国产成人艳妇AA视频在线| 国产欧美在线一区二区三区| 一区二区三国产精华液| 男人激烈吮乳吃奶动图| AAA少妇高潮大片免费看| 国产精品久久久久久AV福利|