Debian (21)

Auto update an debian Server with Aptitude

How to keep software up-to-date automatically on Ubuntu Server using Aptitude Usual disclaimer This article is provided as it and no responsibility will be taken for things going wrong. Tested on Ubuntu 8.10 server. Using Aptitude If you've ever tried out Ubuntu you'll probably know what aptitude is and how to manage packages. Updating your system is as simple as sudo aptitude udpate && sudo aptitude upgrade This updates the package lists and presents any upgrades. Automating the process Wouldn't it be easier if you could automate this and forget about it? That way your server can stay up to…
Read more...

升级 Debian

由 5.0 (lenny) 升级至测试版本 (squeeze) 变身成系统使用者 (root) 的身份: $ su passwd: # 将 /etc/apt/sources.list 中的 stable 或 lenny 转成 squeeze: cd /etc/apt cp sources.list sources.list.bak sed -e 's/\<\(stable\|lenny\)\>/squeeze/g' sources.list.bak >sources.list 更新最新的套件资讯: apt-get update 更新整个系统: apt-get dist-upgrade
Read more...

debian 6 install webmin

运行 apt-get -f install /etc/apt/sources.list deb http://ftp.fr.debian.org/debian/ squeeze maindeb http://ftp.fr.debian.org/debian/ squeeze-updates maindeb http://security.debian.org/ squeeze/updates maindeb http://download.webmin.com/download/repository sarge contribdeb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib If you like to install and update Webmin via APT, edit the /etc/apt/sources.list file on your system and add the lines : deb http://download.webmin.com/download/repository sarge contribdeb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib You should also fetch and install my GPG key with which the repository is signed, with the commands :cd /rootwget http://www.webmin.com/jcameron-key.ascapt-key add jcameron-key.asc You will now be able to install with the commands :apt-get updateapt-get install webminAll dependencies should be resolved automatically.
Read more...

Html 转易

如果不用用单引号的话可以用转义字符<?php echo"<a href=\"www.gznhgm.cn\">这是一个链接</a>"?>
Read more...

zip 压缩

如何在Debian下创建zip文件?zip软件包可创建zip格式的压缩文件。使用如下命令安装: #aptitude install zip 使用方法zip [-derRF...][zipfile [file1 file2 ...]] 基本命令格式是 zip options article inpattern inpatternarticle是新的或已存在的zip文件,inpattern是文件夹或文件路径,可包括通配符。-d 删除zip文件中的文件,如 zip -d test.zip test/test 将删除test.zip文件中的test/test-e 创建密码保护的zip文件-F 修复zip文件-r 递归文件夹结构-R 在当前文件夹中递归例如:1.将当前目录下的test1 test2打包为test.zip文件 $zip test.zip test1 test2 2.将当前目录下的所有文件和文件夹打包为data.zip,不打包子文件夹。 $zip data * 3.将当前目录file中的所有文件和文件夹打包进file.zip文件,递归子文件夹。 $zip -r file.zip file 4,将当前文件夹中的所有文件打包为data.zip $zip -R data *后台执行nohup zip -r -n wiki.zip wiki &
Read more...

mldonkey 乱码

首先检查是否装了locales apt-get install locales 然后 编辑/etc/init.d/mldonkey-server 在一堆“#”后的第一行加入 export LANG=zh_CN.UTF-8
Read more...

Mysql start virtualmin debian

设置MYSQL 首先拷贝mysql.server到/etc/init.d目录下命名为mysql # cp /自己的安装目录/mysql/share/mysql/mysql.server /etc/init.d/mysql 然后进入/etc/rc2.d目录,这是debian默认的启动级别。建立连接指向/etc/init.d/mysql # cd /etc/rc2.d # ln -s /etc/init.d/mysql S20mysql 重新启动系统后,mysql就自动启动了。 chown mysql:mysql /var/run/mysqld
Read more...

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php on line 191