This is an old revision of the document!
路徑 : ahdb從git/ahdb路徑下面開始 ex. load XXXX.pdb moso從git/moso路徑下面開始 ex. load tmp/XXX/XXXX.pdb
sudo adduser --uid 1011 --gid 1000 --home /homeL/guy --shell /bin/bash
sudo vi /etc/apt/sources.list
複製(ex.)
deb http://free.nchc.org.tw/ubuntu/ lucid main deb-src http://free.nchc.org.tw/ubuntu/ lucid main
貼上至sources.list最末行,即完成增加更新主機列表的動作
sudo vi /etc/sudoers
使用者名稱mbi 密碼
-再編輯resolv.conf (應該不用,如果是從終端機就要再這邊設定)
更新ubnuntu
-clinet 端 (設在後面的電腦)
以下步驟要確定vi很順,不然會無法重開機且失敗機率很高。如果真的不順就重開機或重灌吧。
-server 端 (設在merry,基本上應該已經設好了,除非電腦真的太多了,才有可能要新增)
vi /etc/ypserv.securenets\\ (加入)host 192.168.1.x (client ip)\\ -make -C /var/yp (如果今天有新增使用者,那個使用者馬上就想要到後面的電腦來用的話,有時候沒有辦法用的情形的話,那這個時候就要執行這個程式看看)\\ *安裝NFS (又跑回client端了!!)\\ apt-get install nfs-common\\ mount -t nfs 192.168.1.1:/home /home \\ *自動掛載/home目錄\\
sudo apt-get install autofs (如此一來重開機才可以看到home)
vi /etc/auto.master
最下面加
/home /etc/auto.home (home 代表home目錄)
vi /etc/auto.home
* 192.168.1.1:/home/& (新增此行)
127.0.1.1 [hosts]
重開 設定網路 (把IP 改成正確的)
apt-get install sysv-rc-conf
先建立一新使用者www-user, 更改/etc/apache2/envvars, 改成
export APACHE_RUN_USER=www-user export APACHE_RUN_GROUP=www-user
再重開apache2即可
啟動Apache server
sudo /etc/init.d/apache2 start
停止Apache server
sudo /etc/init.d/apache2 stop
重啟動Apache server
sudo /etc/init.d/apache2 restart
cd /etc/apache2/mod-enabled/ ln -s ../mods-available/userdir.conf userdir.conf ln -s ../mods-available/userdir.load userdir.load
sudo vim /etc/apache2/sites-avaiable/default
將原指令
<Directory /var/www> Options Indexes FollowSymLinks MultiViews
改成
<Directory /var/www> Options -Indexes FollowSymLinks MultiViews
以及
sudo vim /etc/apache2/mods-available/userdir.conf
<Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit </Directory> 改成 <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit AddHandler cgi-script .cgi .pl .php Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec +ExecCGI </Directory>
在想要保護的目錄下, 寫一個.htaccess檔, 內容為
AuthName "Hi, there." AuthUserFile [passwd path]/.passwd AuthType Basic require valid-user
創建具瀏覽權限的名單 .passwd
htpasswd -c [passwd path]/.passwd username (第一次建立.passwd) htpasswd [passed path]/.passwd username (新增其它具有權限瀏覽的user)
修改userdir.conf
sudo vim /etc/apache2/mods-available/userdir.conf
<Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit AddHandler cgi-script .cgi .pl .php Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec +ExecCGI </Directory> 再增加以下區段 <Directory /home/xx/*/public_html> AllowOverride FileInfo AuthConfig Limit AddHandler cgi-script .cgi .pl .php Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec +ExecCGI </Directory>
重開apache即可
sudo /etc/init.d/apache2 restart
修改/etc/apache2/mods-available/php5.conf 將以下部分以#號標記
#<IfModule mod_userdir.c> # <Directory /home/*/public_html> # php_admin_value engine On # </Directory> #</IfModule>
新增/etc/apache2/sites-available/serv
<Files ~ "^do$">
SetHandler cgi-script
</Files>
Alias /bp/ "/home/dirty/wrk/BP2010/"
<DirectoryMatch ~ "^/home/dirty/wrk/">
Options Indexes
<Limit GET POST>
Allow from all
</Limit>
</DirectoryMatch>
在/etc/apache2/sites-enable/
ln -s /etc/apache2/sites-available/serv .
apt-get update apt-cache showpkg blast2 (verify the version of blast2) apt-get install blast2
execute cpan
sudo cpan
install perl module (ex. JSON)
cpan> install JSON
type “o conf” and list all configur
cpan> o conf
reset configuration of CPAN (You cna select “no” and configure manually)
cpan> o conf init
write config in config file (don't need config again next time)
cpan> o conf commit
cpan> o conf urllist shift cpan> o conf urllist push http://ftp.cse.yzu.edu.tw/pub/CPAN/ cpan> o conf urllist cpan> o conf commit
http://sial.org/howto/perl/life-with-cpan/
http://www.cpan.org/SITES.html
sudo apt-get install libgd-gd2-perl
~serv/cdhit/cdhit -i ndbp.fa -o ndbp.40 -c 0.4 -n 2 -T 0
建議先cp 至欲使用之目錄
更改捷徑 將bin/blastall blastpgp formatdb 連結至目前版本之執行檔
~serv/PISCES/bin/Cull_for_UserSEQ.pl -i ndbp.40 -p 25 -l 50-6000
(使用方式:README)
若出現 mv …錯誤訊息 不管他 再執行一次
left terms and list operators (leftward)
left ->
nonassoc ++ --
right **
right ! ~ \ and unary + and -
left =~ !~
left * / % x
left + - .
left << >>
nonassoc named unary operators
nonassoc < > <= >= lt gt le ge
nonassoc == != <=> eq ne cmp
left &
left | ^
left &&
left ||
nonassoc .. ...
right ?:
right = += -= *= etc.
left , =>
nonassoc list operators (rightward)
right not
left and
left or xor
cut -d ':' -f3,6 以分隔字元 :分欄(也可以用regexp) 將3 6欄擷取出
sed '/.+_.+/d' [file] 將file中有NP_xxooxx的行刪掉
my @sortbox =sort {$a→[0] ⇔$b→[0]} @box;
splice 要從array索引值大的開始刪
shell:read (讀取輸入)+ 變數 使用:$變數
sed -n '3p' [file] 從file中取出第三行
awk -f : 以:為分隔
:%s/.*/\U&/ 小寫轉大寫
sudo apt-get update
sudo apt-get -y dist-upgrade (如果上面尚未更新完全,可以用這個)
至cron.daily可以看如何讓這個更新自動化
sudo apt-get install openssh-server