搜尋此網誌

2013年10月9日 星期三

win7下samba連不上

C:\Users\PC>net view \\192.168.0.250
系統發生 53 錯誤。

找不到網路路徑。

這樣很麻煩,因為RPi上面的hd快滿了,要慢慢進去刪很麻煩,趁著假日前還有空...

查了一下smb.conf設定沒有問題,testparm也ok...

防火牆兩邊(debian、win7)都關了,selinux也沒啟動...

查了一下win7的服務,發現 TCP/IP NetBIOS Helper 沒有啟動

 手動開啟後

 C:\Users\PC>net view \\192.168.0.250
共用資源在 \\192.168.0.250

raspberrypi server

共用名稱  類型  使用方式  註解

-------------------------------------------------------------------------------
BT        Disk            Samba server's BT
homes     Disk            Home Directories
命令已經成功完成。

收工!

2013年8月15日 星期四

Debian下pietty+screen

最近在vm下試debian與centos,發現只要是centos開screen,pietty上面會有一些不一定的文字...

但debian就沒有...原來是 PROMPT_COMMAND 與 /etc/screenrc  的問題


Debian 7.1下改grub2的開機桌布

上課打混用...


0.先裝套件
#apt-get  install grub2-splashimages
#ls  -l /usr/share/images/grub

1.修改設定
#vi /etc/default/grub

加入
GRUB_BACKGROUND="/usr/share/images/grub/Lake_mapourika_NZ.tga"
要確定下面這行有被註解
GRUB_TERMINAL=console


2.這個順便修改一下,加入紅色那行,約在132之後
# vi /etc/grub.d/00_header
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
  set gfxmode=${GRUB_GFXMODE}
  set gfxpayload=keep
  load_video
  insmod gfxterm

3.更該配色...(不過好像改不太出來...)
#vi /etc/grub.d/05_debian_theme
set menu_color_normal=green/yellow
set menu_color_highlight=yellow/red


4.更新grub2,再重新開機...至少圖片賞心悅目多了...
#update-grub



參考網站:
https://wiki.debian.org/Grub2
http://forum.ubuntu.org.cn/viewtopic.php?t=257189
http://wiki.ubuntu-tw.org/index.php?title=GRUB2%E4%B8%AD%E6%96%87%E6%8C%87%E5%8D%97%E7%AC%AC%E4%BA%8C%E7%89%88%28%E4%B8%8A%EF%BC%89

2013年8月6日 星期二

安裝sysstat失敗...update-rc.d: error: insserv rejected the script header

錯誤訊息一堆...想移也移不掉...

insserv: Starting noip2 depends on minissdpd and therefore on system facility `$all' which can not be true!
insserv: Max recursions depth 99 reached
insserv:  loop involving service noip2 at depth 1
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing sysstat (--purge):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 sysstat
E: Sub-process /usr/bin/dpkg returned an error code (1)

查了一下google
原來是少了header...
#vi /etc/init.d/noip2



加入
### BEGIN INIT INFO
# Provides:          noip2
# Required-Start:    $syslog
# Required-Stop:     $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: noip2 service
# Description:       noip2 service
### END INIT INFO


之後移除再安裝就不會有問題啦...

2013年7月24日 星期三

USB Dongle mutiboot

試了幾回,可惜原本EZLink Sirius 32G 做出來的不能用

所以拿另外一隻創建的JetFlash 16G來試用

在EPC上面老是按不出來多重開機,只好用VMWARE來試~~~

但VMWARE不支援USB開機,所以只好先去下載 :\Plop boot Manager

plpbt-5.0.14.zip 解壓縮之後有一個ISO檔餵給 VMWARE,就可以從USB開機了~~~

vmware player也可以這樣玩~~~~


2013年7月14日 星期日

Linux機器上使用AD網域帳戶登錄

作法可參考
http://blog.zwiegnet.com/linux-server/join-centos-to-active-directory-domain/
http://technet.microsoft.com/zh-tw/magazine/2008.12.linux.aspx
https://www.youtube.com/watch?v=Xz3koy9nTTg

不過有些東西要改

IIS7 + php5.5



這邊我卡很久,,,
步驟按照
http://www.askasu.idv.tw/index.php/2011/07/01/1405/
即可
懶一點只要把php.ini設好即可

安裝 php-5.5.0-rc2  x64版本

另外裝mysql-5.6.12.1 則要另外裝.NET4


php_x64就裝vcredist_x64.exe,裝php_x86就裝vcredist_x86

判斷標準... 

畫面出現0x00000135 就是沒裝可轉發套件
若出現80070032則是 處理常式對應沒有設定好對php的解析

之後看要步要啟用short_tag

即可正常開啟php檔

2013年3月19日 星期二

手殘誤刪 libc.so.6 導致系統異常

因為之前套件的關係,移除了 /var/lib/dpkg/info

因為某個套件編不過,所以想說整個重新更新~

但啟知慘劇開始..........



在 /var/log/apt/term.log 中 開始大量出現...

dpkg: warning: files list file for package 'transmission-remote-cli' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libblas3' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libraspberrypi-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python-debian' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'strace' missing; assuming package has no files currently installed
....

為了解決,所以重新裝套件。

# cat term.log|grep warning|cut -d " " -f 8 | sort | uniq | tr -d \' > /tmp/file
# apt-get install --reinstall $( cat /tmp/file)

發現裝到 libc6時又出問題

所以把下面這幾個檔案移到/tmp
libdl-2.13.so
libc-2.13.so
libm-2.13.so
libpthread-2.13.so
librt-2.13.so

搞笑了...一堆指令都無法使用

所以只好上網查了一下

# LD_PRELOAD=/tmp/libc-2.13.so ln -s /tmp/libc-2.13.so /lib/libc.so.6
# LD_PRELOAD=/tmp/libc-2.13.so ln -s /tmp/librt-2.13.so /lib/librt.so.1
# LD_PRELOAD=/tmp/libc-2.13.so ln -s /tmp/libdl-2.13.so /lib/libdl.so.2
# LD_PRELOAD=/tmp/libc-2.13.so ln -s /tmp/libpthread-2.13.so /lib/libpthread.so.0
# ldconfig
# cp /tmp/*-2.13.so /lib
# ldconfig

呼........差點心臟停了!!!




另外好像也可以這樣
# LD_PRELOAD=/tmp/libc-2.13.so rm /lib/libc-2.13.so

2013年3月1日 星期五

subprocess installed post-installation script returned error exit status 1

update-rc.d: error: insserv rejected the script header
dpkg: error processing transmission-daemon (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 transmission-daemon
E: Sub-process /usr/bin/dpkg returned an error code (1)

找了一下...

#cd /var/lib/dpkg/info
#rm -fr transmission-daemon*
#apt-get autoclean; apt-get autoremove; apt-get update; apt-get upgrade

收工...

2013年2月10日 星期日

Raspberry PI 設定紀錄

raspberry pi到貨了...紀錄一下這次的安裝過程

初步準備


1. 到 http://www.raspberrypi.org/downloads 下載發行版本


2. 下載( 2013-09-25-wheezy-raspbian.ziphttp://downloads.raspberrypi.org/raspbian_latest
old:http://downloads.raspberrypi.org/images/raspbian/2012-12-16-wheezy-raspbian/2012-12-16-wheezy-raspbian.zip


3. 因為沒有讀卡機,所以只好用EPC來燒錄SD卡,再下載 https://launchpad.net/win32-image-writer/+download


4. 解開2012-12-16-wheezy-raspbian.zip 再用Win32DiskImager燒錄到SD卡上


5. 把燒完的SD卡插到raspberry上,該接的網路線、鍵盤、HDMI等接好,最後插上micro usb電源