How to reset the mySQL admin password

怎么重置MYSQL 的管理员密码 在linux 环境下,重置root 密码主要通过以下几个方面: How to reset the mySQL admin password In a Unix environment, the procedure for resetting the root password is as follows: 1. Log on to …

VPS Ubuntu 上安装配置 Postfix + Courier (初级篇)

参考文献:http://wiki.ubuntu.org.cn/Postfix_%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE%E6%8C%87%E5%8D%97#.E5.AE.89.E8.A3.85.E6.A6.82.E8.BF.B0 介绍 这份指南将帮助你建立一个基本的企业级Postfix邮件服务器。主要目的是教会你如何安装和配置一个包含IMAP和POP3服务的基本Postfix邮件服务器。 安装概述 安装配置过程中,postfix通过Internet发送和接收emial,并存储在用户邮箱里。同时客户也可以通过IMAP或者POP3恢复他们的邮件。 安装Postfix 一开始我想你需要做的一件事是修改 hostname,虽然大多数参考资料不提这个,但是这里依然存在一个问题,就是 hostname 里面可能含有 test 之类的单词,这是你的mailserver 被spam 的可能原因之一,所以我干脆把 hostname 改成 mydomain.com 了。 In this setup I assume that your domain is yourdomain.com and it …

Ubuntu Server Network Configuration

检查网络配置 $ ifconfig 配置DHCP客户端 $ sudo gedit /etc/network/interfaces 加入 iface eth0 inet dhcp 配置静态IP地址 $ sudo gedit /etc/network/interfaces eth0配置如下: auto eth0 address 192.168.0.88 netmask 255.255.255.0 gateway 192.168.0.1 让新配置生效 保存退出后,使用重启networking命令让新配置生效: $ …

ubuntu server 8 上建立虚拟主机 和 目录文件夹实现用户验证

关于Apache服务器如何实现用户验证 Apache服务器已经内置用户验证机制,大家只要适当的加以设置,便可以控制网站的某些部分要用户验证。 前期准备,必须已经安装apache,如果还没安装,或者对安装很模糊的话,请查询相应的资料。 设置虚拟主机 我们在/var/www(apache的主页根目录)下建立一个yourdomain.com目录 mkdir /var/www/yourdomain.com 打开 /etc/apache2/sites-available/default 文件 修改这个文件 NameVirtualHost * <VirtualHost your server IP address> ServerAdmin webmaster@localhost ServerName    yourdomain.com DocumentRoot /var/www/yourdomain.com <Directory /> Options FollowSymLinks AllowOverride None …

Linux(debian&ubuntu)下./configure错误详解

sudo apt-get install 软件包    这个是更新你指定的软件包 sudo apt-get update                获取更新列表 sudo apt-get dist-upgrade    开始更新 ./configure的问题 错误: C compiler cannot create executables 原因: 解决:sudo apt-get gcc libc6-dev 错误:checking for C compiler default …

Ubuntu Server apt-get install Apache2 & PHP5 & MySQL5

用apt-get方法安装mysql5 + Apache2 + PHP5+Phpmyadmin: 大家请先看下Ubuntu的WIKI,(http://wiki.ubuntu.org)上面讲的很详细的。但本人按上面做的第一次没有成功。apache2,php5,mysql5都可以运行,就是phpmyadmin不能用。 本人得到的经验是:MYSQL安成功后,一定要先给它设个密码,这上步是不可少的。 此篇只代表个人的观点和经验,可能会片面化和有错误,请大家批评指正,有问题大家一起来讨论!!

deb安装包的安装方法

deb 是debian linus 的安装格式,跟red hat 的rpm相似 安装: dpkg -i file.deb 不过要安装dpkg的package,也可用alien这类软件将package转为rpm等格式,或直接下个rpm 或tar包。 关于deb包转换成rpm的方法: sudo apt-get install alien #alien默认没有安装,所以首先要安装它。 sudo alien xxxx.rpm #将rpm转换位deb,完成后会生成一个同名的xxxx.deb。 sudo dpkg -i xxxx.deb #安装。

linux tar命令详解

tar命令 tar可以为文件和目录创建档案。利用tar,用户可以为某一特定文件创建档案(备份文件),也可以在档案中改变文件,或者向档案中加入新的文件。tar 最初被用来在磁带上创建档案,现在,用户可以在任何设备上创建档案,如软盘。利用tar命令,可以把一大堆的文件和目录全部打包成一个文件,这对于备份文 件或将几个文件组合成为一个文件以便于网络传输是非常有用的。Linux上的tar是GNU版本的。

Find matching HTML tags (greedy)

参考:http://cn.php.net/preg_match_all 非常有用的正则。 <?php // The \\2 is an example of backreferencing. This tells pcre that // it must match the second set of parentheses in the regular expression // itself, which would be the ([\w]+) in this case. The extra backslash is // required because the string is in double quotes. $html = “<b>bold text</b><a href=howdy.html>click me</a>”; preg_match_all(“/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/”, $html, $matches, PREG_SET_ORDER);foreach ( $matches as $val) { echo “matched: ” . $val[0] . “\n”; echo “part 1: ” . $val[1] . “\n”; echo “part 2: ” . …