歡迎您光臨本站 註冊首頁

Linux排錯記錄

←手機掃碼閱讀     火星人 @ 2014-03-08 , reply:0

Linux排錯記錄

#==========================RSYNC=================================#

故障:svn201@192.168.11.40::svnbak /opt/svnbak

@ERROR: auth failed on module svnbakrsync error: error starting client-server protocol (code 5) at main.c(1296) [receiver=2.6.8]

原因:在服務端的配置文件中secrets file = /etc/server.pas與客戶端的密碼不符.解決方法:修改客戶端的密碼.注意:secrets file:該選項指定一個包含定義用戶名:密碼對的文件.只有在"auth users"被定義時,該文件才有作用.文件每行包含一個username:passwd對.一般來說密碼最好不要超過8個字元.沒有默認的secures file名,需要限式指定一個.auth users:該選項指定由空格或逗號分隔的用戶名列表,只有這些用戶才允許連接該模塊.這裡的用戶和系統用戶沒有任何關係.如果"auth users"被設置,那麼客戶端發出對該模塊的連接請求以後會被rsync請求challenged進行驗證身份這裡使用的challenge/response認證協議.用戶的名和密碼以明文方式存放在"secrets file"選項指定的文件中.默認情況下無需密碼就可以連接模塊(也就是匿名方式).

#========================LNMP=====================================#PHP故障:在安裝PHP擴展memcache-2.2.5報錯 Cannot find config.m4. Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module解決方法:進入memcache-2.2.5的解壓后的源碼包,進入其中的ext目錄(cd ext),執行 ./ext_skel --extname=sdomain,顯示如下:Creating directory sdomainCreating basic files: config.m4 config.w32 .cvsignore sdomain.c php_sdomain.h CREDITS EXPERIMENTAL tests/001.phpt sdomain.php [done].

To use your new extension, you will have to execute the following steps:
1. $ cd ..2. $ vi ext/sdomain/config.m43. $ ./buildconf4. $ ./configure --[with|enable]-sdomain5. $ make6. $ ./php -f ext/sdomain/sdomain.php7. $ vi ext/sdomain/sdomain.c8. $ make
Repeat steps 3-6 until you are satisfied with ext/sdomain/config.m4 andstep 6 confirms that your module is compiled into PHP. Then, start writingcode and repeat the last two steps as often as necessary.進入 cd sddomain.文件如下:config.m4 CREDITS php_sdomain.h sdomain.phpconfig.w32 EXPERIMENTAL sdomain.c tests修改config.m4文件 dnl PHP_ARG_WITH(my_module, for my_module support,  dnl Make sure that the comment is aligned:  dnl [ --with-my_module       Include my_module support])  修改成  PHP_ARG_WITH(my_module, for my_module support,  dnl Make sure that the comment is aligned: [ --with-my_module       Include my_module support])  或者將  dnl PHP_ARG_ENABLE(my_module, whether to enable my_module support,  dnl Make sure that the comment is aligned:  dnl [ --enable-my_module      Enable my_module support]) 修改成  PHP_ARG_ENABLE(my_module, whether to enable my_module support,  dnl Make sure that the comment is aligned: [ --enable-my_module      Enable my_module support]) ---其實就是將這部分的dnl去掉,在這個文件里dnl就是註釋的意思,相當於我們PHP裡面的#或// 另外把他中間的一句描術也去掉修改sdomain.c文件 修改其中的代碼如下: function_entry my_module_functions[] = {    PHP_FE(say_hello,    NULL) /* 添加這一行代碼 */    PHP_FE(confirm_my_module_compiled,   NULL) /* For testing, remove later. */    {NULL, NULL, NULL}   /* Must be the last line in my_module_functions[] */}; 在文件最後在添加以下代碼: PHP_FUNCTION(say_hello){    zend_printf("hello sdomain!");}修改php_sdomain.h文件在PHP_FUNCTION(confirm_my_module_compiled ); /* For testing, remove later. */ 這行的下面添加一行:PHP_FUNCTION(say_hello); /* For testing, remove later. */在次進入memcache-2.2.5的源碼包執行[root@test memcache-2.2.5]# /usr/local/php/bin/phpizeConfiguring for:PHP Api Version: 20041225Zend Module Api No: 20060613Zend Extension Api No: 220060519進行安裝:[root@test memcache-2.2.5]# ./configure --with-php-config=/usr/local/php/bin/php-config [root@test memcache-2.2.5]# make[root@test memcache-2.2.5]# make install

#===========================Tomcat==============================#

故障:[root@test245 bin]# ./startup.sh Cannot find ./catalina.shThis file is needed to run this program[root@test245 bin]# sh catalina.shThe BASEDIR environment variable is not defined correctlyThis environment variable is needed to run this program解決方法:[root@test245 bin]# chmod x *.sh[root@test245 bin]# ./startup.sh Using CATALINA_BASE: /opt/tomcat/pabUsing CATALINA_HOME: /opt/tomcat/pabUsing CATALINA_TMPDIR: /opt/tomcat/pabb/tempUsing JRE_HOME: /opt/jdk1.6.0_26Using CLASSPATH: /opt/tomcat/pabb/bin/bootstrap.jar

#=========================================SVN=========================#

錯誤:/opt/subversion-1.6.7/bin/svnadmin: error while loading shared libraries: libsvn_fs_util-1.so.0: cannot open shared object file: No such file or directory/opt/subversion-1.6.7/bin/svn: error while loading shared libraries: libsvn_fs_util-1.so.0: cannot open shared object file: No such file or directory解決方法:1.給用戶登錄的許可權,修改/etc/passwd 改成/bin/bash.2.給庫目錄及其下面的文件可執行的許可權.










[火星人 ] Linux排錯記錄已經有442次圍觀

http://coctec.com/docs/linux/show-post-45878.html