2014年10月27日 星期一

EC2 使用多個EIP

使用在AWS公有雲環境下要使用EC2有時候會有多Public IP需求

不過AWS在使用上會有一些限制

1. 預設EIP 只能使用五個,超過要申請
2. 每一種Instance Type 所能接的網卡跟每一張網卡能使用的IP又不一樣

以Free Tier包含的T2.Micro來說 最高可以接兩張網卡,每一張網卡可以配置兩個IP(Private) 也就是說

一台T2.Micro最多可以配置4個IP(Private)

而EIP(Public)的使用上是一對一對應,有幾個Private IP就可以對應幾個EIP
*注意AWS 沒辦法多個EIP對應到單一IP


ref:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html

EC2 Using Multiple EIP Limit

2014年7月1日 星期二

手動安裝apache+php

在2014的年中,因為客戶的需求需要很舊版的Apache+PHP+Mysql Client

使用yum 安裝只裝的到新版本因此必須手動安裝

OS: CentOS

首先要先把基本的工具跟Library裝好
部分Library 會有太新的問題<就必須抓舊版的回來裝
gcc
autoconf
freetype-devel.x86_64
zlib-devel.x86_64
libxml2-devel
gd-devel.x86_64
libjpeg-turbo-devel.x86_64
libpng-devel.x86_64
libmcrypt-devel.x86_64
libtool-ltdl-devel
mysql mysql-devel mysql-lib

#新作業系統都是64 library需要指定一下
# ln -s /usr/include /opt/include
# ln -s /usr/lib64 /opt/lib

#太舊的PHP不支援openssl 1.x.x 要手動裝
openssl 0.9.8
./config --prefix=/usr/local/openssl
make install_sw  # 不安裝說明文件

apache2
/configure --prefix=/usr/local/apache2 --enable-ssl --enable-so --with-ssl=/usr/local/openssl

php5
./configure --prefix=/usr/local/php5 --with-mysql=/opt  --with-gd=/opt --with-jpeg-dir=/opt --with-png-dir=/opt --with-libxml-dir=/usr/local/libxml2/ --with-zlib-dir=/opt --with-mcrypt=/opt --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --with-mysqli

#修改啟動稿
cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
vi /etc/rc.d/init.d/httpd
在 #!/bin/sh 下面加入以下兩行
# chkconfig: 2345 10 90
# description: Activates/Deactivates Apache Server

設定啟動狀態
chkconfig --add httpd
chkconfig httpd on



2013年9月2日 星期一

Win7 試用延期

Win7 試用延期

第一次 安裝完 30天後 slmgr -rearm  (可以三次90天)

接下來改機碼 八次+rearm  (240天)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform

SkipRearm 設定成1

重開機後就可以再次slmgr -rearm (可以操作八次)

累加可以試用360天

2013年8月16日 星期五

AD 故障排除筆記



當要打開群組原則卻發現跳出下面的訊息

無法開啟 [群組原則] 物件。您可能沒有足夠的權限。
系統找不到指定的路徑。

常見於AD的SYSVOL中群組原則的目錄損毀或遺失

解決方法:
        從備份還原或是手動把目錄建回來
目錄
%SystemRoot%\Sysvol\Sysvol\DomainName
%SystemRoot%\Sysvol\Sysvol\DomainName\Policies
%Systemroot%\sysvol\sysvol\domainname\policies\{guid}
%SystemRoot%\Sysvol\Sysvol\DomainName\Policies\{GUID}\Machine
%SystemRoot%\Sysvol\Sysvol\DomainName\Policies\{GUID}\User

\\AD server\SYSVOL\DomainName\Policies   <--- p="">
目錄名稱必須符合GUID格式前後加上大括號也就是 {GUID}
GUID可以在AD 使用者與電腦 管理工具中 打開進階檢視
在System下的Policies目錄下獲得

另一種解法
Windows 2000 : Windows 2000 Default Group Policy Restore Tool
Windows 2003/2008: 內建的 DCGPOFix

Tools:
Ultrasound - Monitoring and Troubleshooting Tool for File Replication Service (FRS)
reference:
http://www.microsoft.com/taiwan/technet/columns/profwin/38-winserver.mspx
http://blogs.technet.com/b/grouppolicy/archive/2008/10/16/restoring-default-domain-policies-to-their-defaults.aspx

2013年7月3日 星期三

汽車保單紀錄

本篇打算用來記錄每年的保險額度及保額。

2012/10 續保

2013年6月10日 星期一

網域時間同步設定

先查詢PDC 位於哪台Server
netdom query fsmo

1.登入PDC角色所在的網域控制站

2.輸入下列命令 (使用國家時間與頻率標準實驗室時間伺服器)
W32tm /config /manualpeerlist:time.stdtime.gov.tw /syncfromflags:manual

3.更新windows 時間服務設定
W32tm /config /update
或 Net stop w32time Net start w32time


dcdiag 查看是否有其他錯誤訊息


2013年5月8日 星期三

如何透過群組原則設定校時伺服器

Instructions

    • 1
      Click the Windows "Start" button and select "Programs." Click "Administrative Tools" and then click "Group Policy Editor." This opens your GPO object console editor.
    • 2
      Click "Computer Configuration" on the left panel to expand a list of options. Click "Administrative Templates," "System," then "Windows Time Service."
    • 3
      Click the "Time Providers" key in the central pane. This is where you set the NTP group policy for your network users.
    • 4
      Double-click "Windows NTP Server." Enter your central server name you want to use as the NTP server. This is typically the domain controller for the network. Click "OK" to save the changes.
    • 5
      Close the GPO editor. It may take several minutes for the group policy to propagate on the network and your users' computers to synchronize with the central server clock.


Reference: How to Set a NTP Server Group Policy | eHow.com http://www.ehow.com/how_6764132_set-ntp-server-group-policy.html#ixzz2SgjDyIkV