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…

升级 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

debian 6 install webmin

运行 apt-get -f install /etc/apt/sources.list deb squeeze maindeb squeeze-updates maindeb squeeze/updates maindeb sarge contribdeb 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 sarge contribdeb sarge contrib You should also fetch and install my GPG key with which the repository is signed, with the commands :cd /rootwget 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.

Html 转易

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

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/test 将删除test.zip文件中的test/test-e 创建密码保护的zip文件-F 修复zip文件-r 递归文件夹结构-R 在当前文件夹中递归例如:1.将当前目录下的test1 test2打包为test.zip文件 $zip test1 test2 2.将当前目录下的所有文件和文件夹打包为,不打包子文件夹。 $zip data * 3.将当前目录file中的所有文件和文件夹打包进file.zip文件,递归子文件夹。 $zip -r file 4,将当前文件夹中的所有文件打包为 $zip -R data *后台执行nohup zip -r -n wiki &

mldonkey 乱码

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

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

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/ on line 191
Call Stack
10.0001402768{main}( ).../index.php:0
20.05261320704Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.05261320704Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.17892991184Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.17953015528Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.18033070856Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.18043087912require_once( '/var/www/vhosts/' ).../ComponentHelper.php:402
80.18553154792K2ControllerItemlist->execute( ).../k2.php:64
90.18553154792K2ControllerItemlist->display( ).../BaseController.php:710
100.18923243952K2ControllerItemlist->display( ).../itemlist.php:49
110.18923243952K2ControllerItemlist->display( ).../controller.php:19
120.19103265104Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.19313285840K2ViewItemlist->display( ).../ViewController.php:102
140.28064199312K2ViewItemlist->display( ).../view.html.php:1407
150.28064199312K2ViewItemlist->loadTemplate( ).../HtmlView.php:230
160.28194270128include( '/var/www/vhosts/' ).../HtmlView.php:701