SSH拒绝登录的问题

Posted on 七月 25th, 2006 in Linux | No Comments »

DEBIAN SARGE服务器,升级到testing后,无法ssh登录了。
经在服务器上检查,SSHD没有问题,帐号没有问题,密码没有问题,服务器安全也没有问题。最终发现是由于默认的安全性得到了提高,导致此问题的。

最后在http://www.debian-administration.org/articles/152找到了问题的答案。

或者不使用publickey登录,使用密码登录,要确认PasswordAuthentication该选项设置成 yes。

我的问题在于我的home目录属性发生了变化,即别人也可以写,导致安全检查无法通过。
修复过程:
1、直接到机房登录服务器,修改PasswordAuthentication为yes。
2、重启SSH服务,客户端生成RSA:
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub username@myserver
cd
chmod 700 .ssh
cd /home
chmod 700 myhome

Grass 6.1cvs 在 Debian Sarge下的编译

Posted on 三月 30th, 2006 in GIS, Linux | No Comments »

quoted from the grass's user mail list.

1) The DebianGIS project publishes backported packages of GRASS 6.0.2
and 6.1-cvs for Debian/Stable (sarge) as well as other geospatial
software (eg gdal 1.3.1).

see http://pkg-grass.alioth.debian.org/cgi-bin/wiki.pl

2) If you explore the "build depends" line in the package description
you can quickly figure out what packages you need to compile it
yourself. You can even use the debian package building framework as a
one line command. See the debian/ directory in the GRASS source code.

see http://freegis.org/cgi-bin/viewcvs.cgi/grass6/debian/

(Paulo, could you write up a quick README file for there on how to build
your own packages? I don't know the "correct" way.)

3) compile it yourself. If you get *latest* CVS code you can compile
with tcltk 8.4 and fftw3, otherwise use tcltk8.3 and fftw2 without
losing anything.

I think for the FFMPEG animation support in NVIZ you need to get some
non-Free packages from Christian Marillat's repository:

add to /etc/apt/sources.list:
deb ftp://ftp.nerim.net/debian-marillat/ sarge main

./configure step: (season to taste)

CFLAGS="-ggdb -march=pentium4 -Wall" ./configure \
--with-tcltk-includes=/usr/include/tcl8.3 \
--with-motif --with-motif-includes=/usr/X11R6/include \
--with-readline --with-cxx --with-glw --with-odbc --with-sqlite \
--with-freetype --with-freetype-includes=/usr/include/freetype2 \
--without-postgres \
2>&1 | tee config_log.txt

# --with-ffmpeg --with-ffmpeg-includes=/usr/include/ffmpeg

$ make

To run GRASS, simply start (or symlink to)
$ ./bin.$ARCH/grass61

or, as root,
# make install

GRASS 6.1-cvs Compile package reqs for Debian/Stable, 31 Oct 2005

gcc # for compile
libc6-dev # for basics
flex # for lex
bison # for yacc
libncurses5-dev # for curses
zlib1g-dev # zlib
libreadline5-dev # readline
libjpeg62-dev or libjpeg-mmx-dev # for JPEG support
libtiff4-dev # for TIFF support
libpng12-dev # for PNG support
tcl8.3-dev # for TCL
tk8.3-dev # for TK
#postgresql # for Postgresql support
#postgresql-dev # for Postgresql support
xlibmesa-gl-dev # for OpenGL
#libstdc++5-3.3-dev # for glu-dev
xlibmesa-glu-dev # for OpenGL
unixodbc-dev # for ODBC
fftw-dev # for FFT functions
lesstif2-dev # for Motif
libfreetype6-dev # for Freetype Fonts
libgdal1-dev # for GDAL
gdal-bin # for GDAL (doesn't include libraries or gdal-config)
proj # for PROJ.4
sqlite3 # for SQLite
libsqlite3-dev # for SQLite
#libavcodec-dev # for FFMPEG support
libavcodeccvs-dev# for FFMPEG support
libavutilcvs-dev # for FFMPEG support

make # won't get far without this..
g++ # for r.terraflow

new:
tcl8.4-dev # for TCL
tk8.4-dev # for TK
fftw3-dev # for FFT modules

good luck,
Hamish

看样子,原来NVIZ在TCL/TK 8.4下的BUG已经解决了,而且支持FFTW3了,还可以输出视频了。

Debian Sarge下的squid配置

Posted on 三月 18th, 2006 in Linux | No Comments »

默认情况下,SQUID是禁止所有用户的。
可以对/etc/squid/squid.conf进行一下简单的修改:

visible_hostname xxx
acl cas src 210.77.0.0/255.255.0.0
http_access allow cas

然后运行:
squid -z
/etc/init.d/squid restart

debian sarge中文输入

Posted on 三月 27th, 2005 in Linux | No Comments »

在debian sarge中如何进行中文?特别是通过VNC进行远程桌面时。
首先要安装scim:
apt-get install scim scim-tables-zh scim-chinese
然后建立一个新文件:/etc/X11/Xsession.d/95xinput

case "$LANG" in
zh_TW*)
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
;;
zh_HK*)
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
;;
zh_CN*)
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
;;
esac

export XMODIFIERS

然后,远程桌面登陆后,首先修改启动热键,因为默认的会和WINDOWS上的冲突,被WINDOWS先接收走了,不再传递给VNC了。(比如,可以更改为ctrl+alt+space)
参考:http://wiki.linux.org.hk/index.php/How_to_make_Debian_support_chinese

debian sarge 不认2G内存

Posted on 三月 25th, 2005 in Linux | 1 Comment »

sarge中默认的安装光盘安装的内核是2.6.8-1,但不支持大于1G的内存。
但安装新的内核后就可以了。
apt-get install kernel-image-2.6.8-2-686

install tomcat5 in debian sarge

Posted on 三月 16th, 2005 in Linux, MapServer | 2 Comments »

1.install j2sdk 1.5

http://wiki.debian.org.tw/index.php/Java

2. 下载tomcat5的bin版本
wget ...
tar ...
mv ... /usr/local/
ln -s /usr/local/... /usr/local/tomcat
export JAVA_HOME=/usr/lib/j2sdk1.5-sun
/usr/local/tomcat/bin/startup.sh
3. 设置Mapserver
cp *.so /usr/lib/j2sdk1.5-sun/jre/lib/i386/
然后参考: http://www.unicolet.org/mapserver/tomcat.html

debian sarge mapserver tomcat4

Posted on 三月 11th, 2005 in MapServer | 1 Comment »

最简单方案

apt-get install gdal-bin libgdal-doc libgdal1 libgdal1-dev proj
apt-get install libgd2 libgd2-dev
./configure --with-gd=/usr --with-gdal=/usr/bin/gdal-config --with-ogr --with-proj --with-threads --with-postgis=/usr/local/pgsql/bin/pg_config
make

cd mapscript/java
make
make test
cp *.so /usr/lib/jni/
cp *.jar /usr/share/tomcat4/common/lib

debian sarge的PHP4的编译参数

Posted on 二月 25th, 2005 in Linux | 1 Comment »

debian中默认的PHP4编译参数,太长了,导致MAPSERVER的MAPSCRIPT无法编译。

'./configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2' '--with-regex=system' '--with-config-file-path=/etc/php4/apache2' '--disable-rpath' '--enable-memory-limit' '--disable-debug' '--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db4' '--with-iconv' '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--disable-xml' '--with-expat-dir=/usr' '--with-xmlrpc' '--enable-yp' '--with-zlib' '--with-pgsql' '--with-kerberos=/usr' '--with-openssl=/usr' '--enable-dbx' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--with-exec-dir=/usr/lib/php4/libexec' '--disable-static' '--with-curl=shared,/usr' '--with-dom=shared,/usr' '--with-dom-xslt=shared,/usr' '--with-dom-exslt=shared,/usr' '--with-zlib-dir=/usr' '--with-gd=shared,/usr' '--enable-gd-native-ttf' '--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6' '--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr' '--with-imap=shared,/usr' '--with-imap-ssl' '--with-ldap=shared,/usr' '--with-mcal=shared,/usr' '--with-mhash=shared,/usr' '--without-mm' '--with-mysql=shared,/usr' '--with-unixODBC=shared,/usr' '--with-recode=shared,/usr' '--enable-xslt=shared' '--with-xslt-sablot=shared,/usr' '--with-snmp=shared,/usr' '--with-ttf=shared,/usr' '--with-t1lib=shared,/usr' '--with-gd=shared,/usr' '--with-mysql=shared,/usr'