1.解壓tar.bz2
tar jxvf android-ndk-r5c-linux-x86.tar.bz2
2.linux IP可以訪問網域名稱無法訪問
vi /etc/resolv.conf
添加,
nameserver 202.106.46.151
3.linux 安裝deb檔案
sudo dpkg -i ibus-sogoupycc_0.2.5-1_i386.debibus-sogoupycc-data_0.2.5-1_all.deb
4.UBUNTU清理記憶體(sudo su下執行)
echo 1 > /proc/sys/vm/drop_caches
5.UBUNTU查看記憶體free -m
6.給VMWARE虛擬機器硬碟瘦身
sudo vmware-toolbox之後在shrink標籤中進行
--------------------------------
http://www.linuxcast.net 不錯的linux學習網站,最近看視頻才想起這個部落格,繼續記錄吧
7,程式暫停,前台,後台執行的問題
正在執行的進程可以使用Ctrl+Z暫停掉
jobs看後台作業,帶序號的
可以使用fg <序號>將暫停jobs前台運行
bg <序號>將暫停Jobs後台運行
8.ESC+.可以得到上次命令的參數
9.建立硬碟分區
使用fdisk /dev/vdb,對vdb做操作,進入操作介面按m根據提示操作即可,建立主要磁碟分割,建立擴充分區,在擴充分區基礎上建立邏輯分區
10.建立邏輯卷1.需要建立物理卷(PV),會分成若干物理擴充PE(4M大小),使用命令pvcreate /dev/vdb,使用pvs/pvdisplay查看2.在該物理卷上建立邏輯卷組(VG) test,vgcreate test /dev/vdb,建立完使用vgs/vgdisplay查看下3.在該卷組中建立2G大小的邏輯卷(LV) test-1, lvcreate -n test-1 -L 2G test ,使用lvs/lvdisplay查看4.之後mkfs再mount即可使用,路徑是/dev/{vg-name}/{lv-name}5.umount之後刪除邏輯卷,lvremove /dev/{vg-name}/{lv-name}6.刪除卷組, vgremove /dev/{vg-name}7.清除物理卷,pvremove /dev/vdb11.screen的使用
- screen建立一個會話
- screen -ls 列出已存在的會話
- screen -r {id} 切換到指定id的會話
- Ctrl+a d 退出當前的會話,但會話還在後台,可以resume
- 在會話中Ctrl+d則完全結束會話
- 在會話中Ctrl+a c可建立新視窗
- 在會話中Ctrl+a S可以橫向分屏,Ctrl+a |可豎向分屏
- 在會話中Ctrl+a tab可以再分屏中切換
- 在會話中Ctrl+a {數字}可以切換視窗,即Ctrl+a c建立的,Ctrl+a n是下一個視窗,Ctrl+a p是前一個視窗
- 在會話中Ctrl+a A可以設定視窗名
- Ctrl+a ?查看協助
- screen用vi開啟退出後依然保留,http://stackoverflow.com/questions/9979318/how-to-avoid-emacs-or-vi-remaining-on-your-screen-after-closing-when-using-gnu,在~/.screenrc增加altscreen on,再ctrl+a :source ~/.screenrc
12.missing LSB tags最近在debian上安裝screen出現這個問題導致安裝不完整,出現類似下面的問題
insserv: warning: script 'K01monitor' missing LSB tags and overridesinsserv: warning: script 'monitor' missing LSB tags and overridesinsserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!insserv: Starting monitor depends on stop-bootlogd and therefore on system facility `$all' which can not be true!
解決見http://forum.directadmin.com/showthread.php?t=42174與其他的服務指令碼對比,需要對應服務/etc/init.d/monitor加上(因為這裡是monitor服務,其他服務也對應檔案加就行)
### BEGIN INIT INFO# Provides: monitor# Required-Start: $syslog# Required-Stop: $syslog# Should-Start: #named# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Start and stop directadmin# Description: DirectAdmin### END INIT INFO