2013/07/08

sql2008 install error "SQL Server 服務的指定認證無效。若要繼續,請提供 SQL Server 服務的有效帳戶和密碼。"

error

"SQL Server 服務的指定認證無效。若要繼續,請提供 SQL Server 服務的有效帳戶和密碼。"

fix

username


"NT AUTHORITY\SYSTEM"   or  "NT AUTHORITY\NETWORK SERVICE"

2013/04/11

running yum-complete-transaction first



There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
# install yum-complete-transaction
yum install yum-utils
# clean up yum-complete-transaction
yum-complete-transaction –cleanup-only

package-cleanup –dupes
package-cleanup –problems

2013/02/25

release swap

free && swapoff -a && swapon -a && free 

run as root

2012/11/24

clinet snmp install


CentOS

yum -y install net-snmp
#install tools
#yum -y install net-snmp-utils

# setup secret
echo 'rocommunity  XXXXXX' >> /etc/snmp/snmpd.conf
# setup snmp proxy
# squid sample
# proxy -v 1 -c public 127.0.0.1:3401 .1.3.6.1.4.1.3495

chkconfig snmpd on
service snmpd start



Ubuntu Server


apt-get install snmpd
#mv /etc/snmp/snmpd.conf snmpd.conf.old
#vim /etc/snmp/snmpd.conf
#rocommunity  XXXXXX  "ip address" (from monitor)
echo 'rocommunity  XXXXXX "ip address" (from monitor) ' >> /etc/snmp/snmpd.conf
sudo /etc/init.d/snmpd restart

2012/11/23

Cacti install note

0.
yum install -y httpd php php-mysql php-snmp php-xml mysql mysql-server cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel net-snmp-utils gcc wget man make perl-CPAN perl-ExtUtils-MakeMaker perl-ExtUtils-MakeMaker-Coverage crontabs xorg-x11-fonts-100dpi xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi ntp php-gd rrdtool

1.


fc-cache -vfs
mysqladmin --user=root password mypassword
mysqladmin --user=root --password reload

# Install and Configure Cacti
mkdir -p /var/www/html/cacti
cd /var/www/html/
wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz
tar zxvf cacti-0.8.8a.tar.gz
mv cacti-0.8.8a cacti
cd cacti
cd /var/www/html/cacti/cacti-0.8.8a

2.
service mysqld start
chkconfig mysqld on

#import Cacti SQL
mysqladmin -u root -p  mypassword create cacti
mysql -u root -pmypassword cacti < cacti.sql
mysql -u root -pmypassword

# MySQL command
mysql> GRANT ALL ON cacti.* TO admin@localhost IDENTIFIED BY 'adminpassword';
mysql> flush privileges;


3.

更改config.php成我們MySQL的username, password與url path,如下:

vi include/config.php
$database_username = "admin";
$database_password = "adminpassword";
$url_path = "/cacti/";

4.

更改目錄權限
chown -R apache:apache /var/www/html/cacti
chown -R admin /var/www/html/cacti/rra/ /var/www/html/cacti/log/

5.

crontab -e
*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1

service crond restart
service httpd start
chkconfig httpd on


2012/10/13

‎[筆記]

‎[筆記]
ESXI RAM與其他SERVER RAM對調後
部分VM開不起來...
(開機到某些程序會卡住 進入single user mode後關閉該程序後可開機進入登入畫面但無法登入)
telnet server 22 通的
ssh server 22 無回應

解法:關閉seLinux

2012/08/24

dpkg: parse error, in file `/var/lib/dpkg/available'


dpkg: parse error, in file `/var/lib/dpkg/available'

重建available


sudo dpkg --clear-avail && sudo apt-get update


2012/07/27

5Ghz頻寬(WIFI)

台灣地區目前開放使用之5Ghz頻寬範圍如下
台灣開放的5Ghz頻道如下..(直接打去NCC問的)
5250-5350
5470-5725
5725-5825


5G的頻道有
Band1: CH36、CH40、CH44、CH48(5180MHz~5240MHz)
Band2: CH52、CH56、CH60、CH64(5260MHz~5320MHz)
Band3: CH100、CH104、CH108、CH112、CH116、CH120、CH124、CH128、CH132、CH136、CH140(5500MHz~5700MHz)
Band4: CH149、CH153、CH157、CH161、CH165(5745MHz~5825MHz)


台灣地區開放的頻道確實是Band2到4


(有也一說是1到4 但是NCC表示BAND1不開放 但是可透過FCC認證轉為NCC認證申請 不確定是否有業者用這方式申請來讓旗下裝置與AP支援Band1,例如傻多就只支援BAND1跟4)


然而Band3在相關的法規上有規範 必須能夠同時偵測到雷達並自動跳頻


因此有部分業者的網路卡/無線機器台 直接設定不支援Band3的頻道


附註:
Ruckus的AP在5Ghz頻道內支援Band2 3 4 傻多的5Ghz AP與網卡支援Band1 Band4,
Netgear WNDA3100v2 支援Band1,Band4
Edimax的AP BR-6475nD支援Band 2 , 3 , 4的5Ghz...

2012/07/16

HAproxy


設定檔

global
 log 127.0.0.1 local0
 #chroot /var/lib/haproxy
 pidfile /var/run/haproxy.pid
 maxconn 4000
 user haproxy
 group haproxy
 daemon

#listen stats 184.82.2.32:808 ###查看状态的地址和端口http://184.82.2.32:808/haproxy?stats
#balance
# mode http
# stats enable
# stats auth taobao:Tao@2011
# timeout connect 10000 # default 10 second time out if a backend is not found
# timeout client 300000
# timeout server 300000
# maxconn 60000
# retries 3

listen smtp 192.168.0.111:25

 mode tcp
 log global
 timeout connect 10000 # default 10 second time out if a backend is not found
 timeout client 300000
 timeout server 300000
 maxconn 60000
 retries 3

balance roundrobin ###负载策略
 server smtpb 192.168.0.113:25 check ###后端真实服务器
 server smtpb 192.168.0.114:25 check ###后端真实服务器


安裝


cd /tmp/
useradd haproxy
wget http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.21.tar.gz
tar -xf haproxy-1.4.21.tar.gz
cd haproxy-1.4.21
make TARGET=linux26 PREFIX=/usr/local/haproxy
make install
vi /usr/local/haproxy/haproxy.cfg
haproxy -f /usr/local/haproxy/haproxy.cfg


啟動

/usr/local/sbin/haproxy -f /etc/haproxy/haproxy.cfg

停止

ps aux |grep haproxy

kill (pid number)



Postfix 綁上多個IP


vi /etc/postfix/main.cf
inet_interfaces = $myhostname, localhost


vi /etc/postfix/master.cf
#IP前面不能有任何空白
192.168.1.6:25 inet  n    -    n    -    -    smtpd -o content_filter=
192.168.1.7:25 inet  n    -    n    -    -    smtpd -o content_filter=
192.168.1.8:25 inet  n    -    n    -    -    smtpd -o content_filter=
#IP前面不能有任何空白

service postfix reload

netstat -tnlp
 tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 7008/master
 tcp 0 0 192.168.1.6:25 0.0.0.0:* LISTEN 7008/master
 tcp 0 0 192.168.1.7:25 0.0.0.0:* LISTEN 7008/master
 tcp 0 0 192.168.1.8:25 0.0.0.0:* LISTEN 7008/master