2017年3月28日 星期二

2017年3月24日 星期五

自然人憑證展期

公文整合系統提示,自然人憑證快到期了:

可辦理線上展期,建議先用 IE 登入公文整合系統 (Chrome 匯入憑證沒有反應),不然就要準備好一般登入的帳號密碼。


辦理線上展期:
  1. 搜尋 "自然人憑證"
    點選 "憑證展期"

2017年3月19日 星期日

Apachce 設定 (School)

# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

# rpm -qa httpd
httpd-2.4.6-45.el7.centos.x86_64

編輯設定檔
# vi /etc/httpd/conf/httpd.conf

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

增加預設首頁
index.htm index.php

設定ServerName
ServerName www.XXX.XXX.edu.tw:80

語言設定加註解,讓網頁決定編碼
# AddDefaultCharset UTF-8
把 # AddDefaultCharset UTF-8 這行 MARK 起來,
也就是不要做任何設定,由網頁和瀏覽器來設定

2017年3月12日 星期日

CentOS 7.3 掛載新硬碟 (WEB)

詳:http://pejslin.blogspot.com/2017/03/centos-73_8.html

PVE 新增硬碟

  1. Hardware → Add → Hard Disk
  2. 設為 IDE 128G → Add

CentOS 7.3 安裝 SAMBA (SCHOOL)

# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

SELinux 已關閉

安裝 samba
#yum install samba
samba-4.4.4-12.el7_3.x86_64

複製備份設定檔
# cp /etc/samba/smb.conf /etc/samba/smb.conf.backup

編輯設定檔
# vi /etc/samba/smb.conf

2017年3月10日 星期五

2017年3月9日 星期四

編寫教育局 "校園活動報導"


  1. 登入教育局網站
  2. 6.公告資訊 → 6.-4.校園活動報導
    7.公告資訊 → 7.-4.校園活動報導
  3. 編寫報導 → 新增報導
  4. 有紅色 * 號的欄位必填,黑色 + 號則選填。
    最多可上傳 5 張相片。
  5. 完成後按 "確定"

2017年3月8日 星期三

PuTTY SSH 連線 CentOS 中文亂碼

# vi ~/.bashrc

加入設定
LANG=zh_TW.Big5
export LANG

掛載 NFS 硬碟

# mount -t nfs 163.17.50.XXX:/mnt/array1/backup/ /backup/
mount: wrong fs type, bad option, bad superblock on 163.17.50.XXX:/mnt/array1/backup/,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

因為沒安裝 nfs 出現錯誤訊息,安裝就好:
#  yum install nfs-utils

CentOS 7.3 掛載新硬碟 (SCHOOL)

PVE 新增硬碟

  1. Hardware → Add → Hard Disk
  2. 設為 IDE 256G → Add

2017年3月7日 星期二

CentOS 7.3 安裝 AMP

# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

  1. 更新
    1. yum update
  2. 安裝常用工具 (非必要)
    1. yum install mlocate
    2. yum install wget
    3. yum install zip unzip
    4. yum install ntpdate
  3. 關閉 SELINUX
    1. vi /etc/sysconfig/selinux

      SELINUX=enforcing
      改為
      SELINUX=disabled
      重開機後生效
    2. setenforce 0
      暫時關閉 SELINUX

mysql_secure_installation 設定資料庫

CentOS 7.3
如果安裝完 mariadb,在未啟動 mariadb 時直接執行指令,會出現錯誤訊息:
# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):


2017年3月6日 星期一

CentOS 7.3 網路設定

# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

  1. # cd /etc/sysconfig/network-scripts/
    # vi ifcfg-ens18

安裝 CentOS 7.3

  1. 光碟開機開始安裝

    Install CentOS Linux 7 直接開始安裝
    Test this media & install CentOS Linux 7 先檢查光碟再開始安裝

建立 CentOS 7.3 虛擬機

硬體不知怎麼配置好,大部分用預設值。
CentOS 偵測不到 SCSI 硬碟 (不知怎麼設),改 IDE 硬碟。
Memory 最少要 256 M,否則無法安裝。

2017年3月5日 星期日

網站掛了,還以為可以撐更久

網站出現錯誤訊息

This page cannot be displayed due to an internal error.

If you are the administrator of this site, please visit the Xoops Troubleshooting Page for assistance.

Helpful infomation you should provide while asking for assistance:

Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34