問題經驗

BE(Big-Endian)和LE(Little-Endian)字節轉換


使用cpio的功能


ls <file> | cpio -ov > file.cpio

cpio -iv --swap < file.cpio


SVN管理庫的創建

創建

svnadmin create /work/repos

加載apache的svn模塊

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<IfModule dav_svn_module>

<Location /repos>
   DAV svn
   SVNParentPath /work/run/repos
</Location>

</IfModule>
<IfModule unixd_module>

遇到錯誤

bin/apachectl restart
httpd: Syntax error on line 148 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_dav_svn.so into server: /usr/local/apache2/modules/mod_dav_svn.so: undefined symbol: dav_do_find_liveprop

原因:沒有加載mod_dav





Apache OpenMeetings的連接錯誤問題

在瀏覽器開始會議時,Flash控件遇到錯誤,NetConnection.Connect.Fail

原因是流服務的端口設置問題

需要將conf/red5.properties中

rtmp.port=8888

修改設置或修改防火牆規則

同時修改webapps/openmeetings/public/config.xml

<rtmpport>8888</rtmpport>

webapps的設置會影響到Flash連接流服務


編譯samba 4.x.x

很搞,一大堆前置,還要用到python,也不知道4是怎麼設計的

編譯gnutls

checking for NETTLE... configure: error:
  ***
  *** Libnettle 2.7.1 was not found.

安裝或編譯了libnettle還是不行

需要安裝pkg-config

error說得明白點不好麼


samba4取消了對

security = share

的支持

用user模式取代

   security = user
   map to guest = Bad Password


nettle還要用gmp編譯

配置apache模塊mod_dav效率低下問題

問題不在模塊,將windows中IE的

[Tools]

    ->[Internet Options]

        ->[Connections]

            ->[LAN Settings]

                ->[Automatically detect settings]的選項去除

wKioL1WlsnbALpklAAB_BEinm8s119.jpg


系統loop設備增設

在/etc/modules中加入

loop
options loop max_loop=64


PXE服務器設置

設置dhcp服務器

apt-get install isc-dhcp-server

配置/etc/dhcp/dhcpd.conf

subnet 192.168.19.0 netmask 255.255.255.0 {
  range 192.168.19.101 192.168.19.202;
  next-server 192.168.19.169;
  filename "pxelinux.0";
}

安裝tftp服務器

apt-get install tftpd

確認inetd.conf的內容

tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp

tftp的搜索路徑在/srv/tftp

下載debian的pxe啓動文件

解壓縮至/srv/tftp,使pxelinux.0在目錄中可見


apt-get使用時密鍵錯誤

W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32

gpg --recv-keys <key_id>
或
gpg --keyserver subkeys.pgp.net --recv-keys <key_id>

gpg --export <key_id> | apt-key add -


debian系統中無法連接無線網卡

DHCP client 超時

安裝wpasupplicant

wlan link not ready

/etc/network/interfaces
wpa-essid <AccessPoint>
wpa-keys <WPA key>

apt-get install wpasupplicant





使用sendemail的問題

sendemail[3170]: ERROR => No TLS support!  SendEmail can't load required libraries. (try installing Net::SSLeay and IO::Socket::SSL)
$ sudo apt-get install libnet-ssleay-perl
$ sudo apt-get install libio-socket-ssl-perl


invalid SSL_version specified at /usr/share/perl5/IO/Socket/SSL.pm line 332
將/usr/share/perl5/IO/Socket/SSL.pm中
m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))$}i
改爲
m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))}i

sendemail[5745]: ERROR => TLS setup failed: SSL connect attempt failed because of handshake problems error:00000000:lib(0):func(0):reason(0)
將sendemail中
if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3 TLSv2')) {
改爲
if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv23:!SSLv2')) {
或
if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3')) {



iscsitarget安裝

apt-get install iscsitarget iscsitarget_dkms

vi /etc/iet/ietd.conf
Target iqn.2015-04.org.homebox:kvstore.fileraw.download.100g
        Lun 1 Path=/work/run/disk/100G.raw,Type=fileio

vi /etc/default/iscsitarget
ISCSITARGET_ENABLE=true

/etc/init.d/iscsitarget restart



debian系統中無法使用WPS無線網卡

wlan link not ready

/etc/network/interfaces
wpa-essid <AccessPoint>
wpa-keys <WPA key>

DHCP client 超時

resolve:

安裝wpasupplicant
apt-get install wpasupplicant


cryptsetup的使用

dd if=/dev/urandom of=vdd_key bs=1024 count=4
cryptsetup luksFormat /dev/vdd vdd_key
cryptsetup luksAddKey /dev/vdd --key-file vdd_key
cryptsetup  luksAddKey  /dev/vdd  --force-password
cryptsetup luksDump /dev/vdd
LUKS header information for /dev/vdd


LUKS header information for /dev/vdd

Version:      1

Cipher name:    aes
Cipher mode:    cbc-essiv:sha256
Hash spec:      sha1
Payload offset: 4096
MK bits:        256
MK digest:      3b c4 23 9d e0 91 fe 50 26 f0 38 17 68 f3 3a 77 15 33 e3 1a
MK salt:        1b 90 b0 c3 e2 c8 9f 2d 35 ff ee 1c cb e1 a5 33
                a0 b9 29 5b a8 c9 82 3b 6c 6c 28 10 01 d4 d4 1e
MK iterations:  41375
UUID:           3bff3185-a74c-4c0d-ac07-87a4619243bf

Key Slot 0: ENABLED
        Iterations:             165972
        Salt:                   1b 27 ef 9d 68 55 1d ef 5f a5 8f 51 ab 08 90 9a
                                3d 9a cc 8f d3 dd 0d c5 d7 2b 2a 95 08 46 b8 3c
        Key material offset:    8
        AF stripes:             4000
Key Slot 1: ENABLED
        Iterations:             167898
        Salt:                   71 da 50 7c 7d aa f8 82 d8 f8 4d 2d e0 3d a8 11
                                ea 77 70 c7 61 aa dc 02 0a 3a 50 b7 69 76 d8 7b
        Key material offset:    264
        AF stripes:             4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED


cryptsetup luksOpen /dev/vda evda --key-file /etc/cryptsetup/vdd_key

vi /etc/crypttab
# <target name> <source device>         <key file>      <options>
evdd    /dev/vdd        /etc/cryptsetup/vdd_key luks

vi /etc/fstab
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/evdd        /work/run       ext4    defaults        0       0

minidlna的編譯錯誤,t-da.gmo

> make
make  all-recursive
make[1]: Entering directory `/home/liuch/minidlna-1.1.4'
Making all in po
make[2]: Entering directory `/home/liuch/minidlna-1.1.4/po'
test ! -f ./minidlna.pot || \
          test -z "da.gmo de.gmo es.gmo fr.gmo it.gmo ja.gmo nb.gmo nl.gmo pl.gmo ru.gmo sl.gmo sv.gmo" \
          || make da.gmo de.gmo es.gmo fr.gmo it.gmo ja.gmo nb.gmo nl.gmo pl.gmo ru.gmo sl.gmo sv.gmo
make[3]: Entering directory `/home/liuch/minidlna-1.1.4/po'
rm -f da.gmo && : -c --statistics --verbose -o da.gmo da.po
rm -f es.gmo && : -c --statistics --verbose -o es.gmo es.po
rm -f de.gmo && : -c --statistics --verbose -o de.gmo de.po
mv: rm -f fr.gmo && : -c --statistics --verbose -o fr.gmo fr.po
cannot stat `t-da.gmo': No such file or directory
mv: make[3]: *** [da.gmo] Error 1
make[3]: *** Waiting for unfinished jobs....
cannot stat `t-es.gmo': No such file or directory
make[3]: *** [es.gmo] Error 1
mv: cannot stat `t-de.gmo': No such file or directory
make[3]: *** [de.gmo] Error 1
mv: cannot stat `t-fr.gmo': No such file or directory
make[3]: *** [fr.gmo] Error 1
make[3]: Leaving directory `/home/liuch/minidlna-1.1.4/po'
make[2]: *** [stamp-po] Error 2
make[2]: Leaving directory `/home/liuch/minidlna-1.1.4/po'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/liuch/minidlna-1.1.4'
make: *** [all] Error 2

resolve:

安裝gettext

清除配置,make distclean

重新編譯,configure,make


Windows7自動掛載虛擬盤文件

問題: C盤系統盤分區空間不夠,多出現警告提示

解決: 使用其他空間上建虛擬盤,將C盤一些大的目錄內容轉移,再掛載到該目錄下。(由於目錄掛載只能是空目錄,Program Files等目錄由於文件啓動時就開始佔用不適合於轉移,適合選擇空間大而不用的目錄等)

撰寫腳本(以C:\ProgramData\Package Cache爲目標)保存至mount_main_arch_data.txt

select vdisk file="D:\Temp\vm\main_drive_archive_data_20170925.vhd"
attach vdisk
assign mount="C:\ProgramData\Package Cache"

添加啓動執行程序,或者在任務計劃管理器中添加啓動任務

diskpart /s "mount_main_arch_data.txt"

可以參照詳細原始內容

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章