Pages

2017年12月26日 星期二

CentOS 6.9上修改TimeZone方式

在Azure上的CentOS 6.9上修改TimeZone的方式如下:
  1. vim /etc/sysconfig/clock
  2. #下方為m原本的位置是在America,修改成您想要的位置。
  3. Zone=“Asia/Shanghai


接下來,透過以下Shell指令,我們可以將修改好的TimeZone設定生效。
  1. cp /etc/localtime /root/old.timezone
  2. rm -rf /etc/localtime
  3. #要與TimeZone的位置一致
  4. ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  5. #查看目前時間
  6. date

Related Posts:

  • CentOS 6.9上修改TimeZone方式在Azure上的CentOS 6.9上修改TimeZone的方式如下: vim /etc/sysconfig/clock #下方為m原本的位置是在America,修改成您想要的位置。 Zone=“Asia/Shanghai” 接下來,透過以下Shell指令,我們可以將修改好的TimeZone設定生效。 cp /etc/localtime /root/old.timezone rm -rf /etc/localtime #要與TimeZ… Read More
  • MySQL指定使用utf8編碼匯入資料 在mysql匯入SQL檔案時,如果遇到亂碼問題,可透過指定編碼的方式,將資料正確匯入。  mysql -u root -p --default-character-set=utf8 example < example.sql… Read More
  • MySQL匯出Binary檔案資料當使用mysqldump匯出資料庫檔案時,若有些欄位是直接將檔案儲存進去,在匯入資料庫時會導致失敗,因此需要透過以下指令將資料庫匯出後,才能在其他台mysql主機上匯入。 1. 使用--hex-blob匯出資料庫檔案mysqldump -u root -p --hex-blob  example > example.sql  2. 使用一般方式匯入資料庫檔案mysql -u root -p … Read More
  • CentOS 6.9安裝Python 2.7與Azure CLI在Azure上的CentOS 6.9安裝Azure CLI方式如下: # 安裝Python 2.7 wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64//python27-libs-2.7.14-1.ius.centos6.x86_64.rpm rpm -Uvh python27-libs-2.7.14-1.ius.centos6.x86_64.rpm rm -rf p… Read More
  • Linux nohup with out nohup.outThe command is below: nohup some_command > /dev/null 2>&1& for example: nohup /jboss-eap-6.0/bin/standalone.sh -Djboss.server.base.dir=/jboss-eap-6.0/test -Djboss.server.log.dir=d:/webaplog/test > /dev/null … Read More

0 意見: