<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>鬼の领地 &#187; MySQL</title>
	<atom:link href="http://blog.upsuper.org/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.upsuper.org</link>
	<description>the place where there are some ghost appearing...</description>
	<lastBuildDate>Wed, 19 Oct 2011 13:21:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>尝试一下Piwik，新的统计系统</title>
		<link>http://blog.upsuper.org/try-the-piwik-a-new-statistical-system/</link>
		<comments>http://blog.upsuper.org/try-the-piwik-a-new-statistical-system/#comments</comments>
		<pubDate>Sat, 17 May 2008 08:53:21 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[琐事杂谈]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[统计]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=93</guid>
		<description><![CDATA[今天发现一个开源的php+mysql统计系统——Piwik (demo)。这个系统看过去是相当不错，而且使用了AJAX提供良好的用户体验。于是我就下了一个传上去试一下，毕竟我对现在的Ourplus毕竟不很满意。 不过传上去后才发现，这个系统根本不支持中文，全英文的界面。 本来想，算是不错的一个这么庞大的统计系统，应该能比较容易地进行翻译，因此就看了一下。发现确实有一个名叫lang的文件夹，进去一看，果然有语言文件！可是翻译的时候发现，仅仅几条。经过侦查，发现这个系统高度插件化，几乎所有的功能都是通过插件提供的，给翻译带来了极大的困难。在翻译了几个插件以后，传上去测试，发现乱码，觉得是编码问题，就把中文的语言文件存为UTF-8，乱码问题解决。但是是在不想继续翻译了…… 回到主界面，突然发现右上方写着“Piwik is a collaborative project and still Beta. If you want to help, please contact us.”。瞬间，觉得还是不用了，等着它的正式版吧！ 不过要说的是，这确实应该会成为一个相当不错的统计系统，据说堪比Google Analytics！]]></description>
			<content:encoded><![CDATA[<p>今天发现一个开源的php+mysql统计系统——<a href="http://piwik.org/" target="_blank">Piwik</a> (<a href="http://piwik.org/demo/" target="_blank">demo</a>)。这个系统看过去是相当不错，而且使用了AJAX提供良好的用户体验。于是我就下了一个传上去试一下，毕竟我对现在的Ourplus毕竟不很满意。</p>
<p>不过传上去后才发现，这个系统根本不支持中文，全英文的界面。</p>
<p>本来想，算是不错的一个这么庞大的统计系统，应该能比较容易地进行翻译，因此就看了一下。发现确实有一个名叫lang的文件夹，进去一看，果然有语言文件！可是翻译的时候发现，仅仅几条。经过侦查，发现这个系统高度插件化，几乎所有的功能都是通过插件提供的，给翻译带来了极大的困难。在翻译了几个插件以后，传上去测试，发现乱码，觉得是编码问题，就把中文的语言文件存为UTF-8，乱码问题解决。但是是在不想继续翻译了……</p>
<p>回到主界面，突然发现右上方写着“Piwik is a collaborative project and still Beta. If you want to help, please contact us.”。瞬间，觉得还是不用了，等着它的正式版吧！</p>
<p>不过要说的是，这确实应该会成为一个相当不错的统计系统，据说堪比Google Analytics！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/try-the-piwik-a-new-statistical-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu之旅（一）</title>
		<link>http://blog.upsuper.org/ubuntu-trip-1/</link>
		<comments>http://blog.upsuper.org/ubuntu-trip-1/#comments</comments>
		<pubDate>Sat, 10 May 2008 15:44:10 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[探究学习]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[快捷键]]></category>
		<category><![CDATA[虚拟机]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=87</guid>
		<description><![CDATA[今天小小地探索了一下伟大的Ubuntu，使用的是刚出的Ubuntu8.04LTS。这里就来说一说吧~ 本来想给我的电脑直接装上Ubuntu8.04LTS的，盘刻好了，还用分区魔术师划了些地方出来装。结果还是失败了，好像是提示什么I/O APIC的问题，Ubuntu的Linux内核根本启动不起来……所以最后只好回到Windows下用VMware了。 原来我的VMware里面就有一个Ubuntu的虚拟机，今天便把原来的内容全部消掉，重新安装了一个新的Ubuntu。安装还算顺利，就是安完还是半中文半英文，看得蛮不爽的说。 我的VMware设置为桥接到宿主所在网络，所以和在真实的网络环境一样。因为知道Ubuntu最依靠的就是网络，所以就先把网络设置好了。我家使用的是一个小型的支持DHCP的家用路由器，因此我在“系统-&#62;系统管理-&#62;网络”里面点击解锁后点击列表中的第一个，并设置其为DHCP。随后登入路由器，发现为我的Ubuntu虚拟系统分配了一个新的IP地址。Ubuntu的网络是连上了，可是我宿主机Windows的网络却不能用了，可虚拟机里面却好好的……郁闷……算了，先用虚拟机吧~ 下面来处理语言的问题。经过调查，我先更新了apt的sources.list。首先点击“应用程序-&#62;附件-&#62;终端”，应用程序可能是中文，不过反正就是第一个菜单。然后输入： 1 2 sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup sudo gedit /etc/apt/sources.list 前面的sudo大约表示能够用最大权限，似乎etc目录都要用最大权限才能修改的样子，至于gedit是使用Gnome的Ubuntu下才有的命令。接下来我跟大家说说我更新以后的sources.list吧： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 deb http://archive.ubuntu.org.cn/ubuntu-cn/ hardy [...]]]></description>
			<content:encoded><![CDATA[<p>今天小小地探索了一下伟大的Ubuntu，使用的是刚出的Ubuntu8.04LTS。这里就来说一说吧~</p>
<p><span id="more-87"></span></p>
<p>本来想给我的电脑直接装上Ubuntu8.04LTS的，盘刻好了，还用分区魔术师划了些地方出来装。结果还是失败了，好像是提示什么I/O APIC的问题，Ubuntu的Linux内核根本启动不起来……所以最后只好回到Windows下用VMware了。</p>
<p>原来我的VMware里面就有一个Ubuntu的虚拟机，今天便把原来的内容全部消掉，重新安装了一个新的Ubuntu。安装还算顺利，就是安完还是半中文半英文，看得蛮不爽的说。</p>
<p>我的VMware设置为桥接到宿主所在网络，所以和在真实的网络环境一样。因为知道Ubuntu最依靠的就是网络，所以就先把网络设置好了。我家使用的是一个小型的支持DHCP的家用路由器，因此我在“系统-&gt;系统管理-&gt;网络”里面点击解锁后点击列表中的第一个，并设置其为DHCP。随后登入路由器，发现为我的Ubuntu虚拟系统分配了一个新的IP地址。Ubuntu的网络是连上了，可是我宿主机Windows的网络却不能用了，可虚拟机里面却好好的……郁闷……算了，先用虚拟机吧~</p>
<p>下面来处理语言的问题。经过调查，我先更新了apt的sources.list。首先点击“应用程序-&gt;附件-&gt;终端”，应用程序可能是中文，不过反正就是第一个菜单。然后输入：</p>

<div class="wp_codebox"><table><tr id="p878"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p87code8"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list_backup
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gedit <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list</pre></td></tr></table></div>

<p>前面的sudo大约表示能够用最大权限，似乎etc目录都要用最大权限才能修改的样子，至于gedit是使用Gnome的Ubuntu下才有的命令。接下来我跟大家说说我更新以后的sources.list吧：</p>

<div class="wp_codebox"><table><tr id="p879"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
</pre></td><td class="code" id="p87code9"><pre class="text" style="font-family:monospace;">deb http://archive.ubuntu.org.cn/ubuntu-cn/ hardy main restricted universe multiverse
&nbsp;
# 这一套极快，每秒可以上MB级
deb http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
&nbsp;
deb http://mirror.rootguide.org/ubuntu/ hardy main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-updates main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-backports main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-security main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://mirror.rootguide.org/ubuntu/ hardy-proposed main restricted universe multiverse
&nbsp;
# 这是官方的源
deb http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse</pre></td></tr></table></div>

<p>接着就在终端中运行</p>

<div class="wp_codebox"><table><tr id="p8710"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p87code10"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update</pre></td></tr></table></div>

<p>一阵等待过后（等待的时候玩Ubuntu里面的数独，发觉还是有些难度的），然后打开“系统-&gt;系统设置-&gt;语言设置”里面，找到中文打上钩，确定以后就自动完成了中文语言包的下载，重新启动后就看到了全中文的界面！然后使用Firefox上网，可以用Ctrl+Space调出中文的输入法。个人觉得里面默认的拼音输入法不亚于搜狗哈~</p>
<p>接着就觉得看过去太小了，想把分辨率调高一些。在“系统-&gt;首选项”里面看到了屏幕分辨率，打开一看，竟然有我显示器推荐使用的1440&#215;900，当即就选了。然后用Ctrl+Alt+Enter让VMware进入全屏模式，就像真的用Ubuntu一样！</p>
<p>因为这次打开Ubuntu的主要目的是学习LAMP，于是就装起了相关的东西。一开始的时候不知道新立得就有LAMP-Server，还傻傻的装了好多东西：</p>

<div class="wp_codebox"><table><tr id="p8711"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p87code11"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2 mysql-server
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-common php5-gd php5-mysql libapache2-mod-php5
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> phpmyadmin</pre></td></tr></table></div>

<p>其实并没有上面这条命令这么顺利的，我是绕了不少弯路。开始的时候apache2装上去然后装php5，然后我很快找到了位于/var/www/的网站目录。接着就在里面放上了一个“Hello World!”的php：</p>

<div class="wp_codebox"><table><tr id="p8712"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p87code12"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Hello World!&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>但是不能解析……结果后来知道，要重启一下apache2：</p>

<div class="wp_codebox"><table><tr id="p8713"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p87code13"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></td></tr></table></div>

<p>后来装完mysql后去下载了一个phpmyadmin解压到/var/www/目录里，结果不能访问，说是php没有加载mysql模块，我就囧了。后来把这个文件夹删了，然后用apt的phpmyadmin，在/etc/apache2/sites-available/文件夹里的default文件的虚拟服务器中添加了：</p>

<div class="wp_codebox"><table><tr id="p8714"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p87code14"><pre class="apache" style="font-family:monospace;">    <span style="color: #00007f;">Alias</span> /phpmyadmin/ <span style="color: #7f007f;">&quot;/usr/share/phpmyadmin/&quot;</span>
&nbsp;
        <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">none</span>
        <span style="color: #00007f;">AllowOverride</span> Limit
        <span style="color: #00007f;">Order</span> <span style="color: #00007f;">Deny</span>,<span style="color: #00007f;">Allow</span>
        <span style="color: #00007f;">Deny</span> from <span style="color: #0000ff;">all</span>
        <span style="color: #00007f;">Allow</span> from <span style="color: #0000ff;">all</span></pre></td></tr></table></div>

<p>终于是可以用了。</p>
<p>刚刚升级了一下VMware到6.0，貌似宿主机和虚拟机可以一起上网了。另外终于是把VMware Tools给装上去了。也不知道是怎么装的，莫名其妙就装好了，所以就不写了。</p>
<p>我能这么还算顺利的做完这些事情，很大程度要感谢前辈们的指导。今天配置的过程中参考了许多来自不同地方的资料，其中帮助最广泛和最大的要数<a href="http://wiki.ubuntu.org.cn/index.php?title=Qref/Hardy&amp;variant=zh-cn" target="_blank">快速配置教程</a>了，其中的精细的指导实在是好，让我这样愚笨的人都在短时间内完成了一些东西。</p>
<p>最后赞叹一下这些伟大的自由软件的精妙和强大，实在是一个值得深究的东西啊！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/ubuntu-trip-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我们的Online Judge</title>
		<link>http://blog.upsuper.org/our-online-judge/</link>
		<comments>http://blog.upsuper.org/our-online-judge/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 11:33:28 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[我的计划]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[C/C++/C#]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Online Judge]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=27</guid>
		<description><![CDATA[和 MRain 开始编写我们信息组内部用的Online Judge。 这个Online Judge我准备做成类似Cena的网页版，准备使用PHP+MySQL+Apache+Windows2K3作为运行环境，AJAX做界面，C++程序做后台测评程序。采取类似USACO的提交立即测评，在线等待结果的测评方式。 现在我正在撰写文档，估计正式编写工作从下一周开始。]]></description>
			<content:encoded><![CDATA[<p>和 MRain 开始编写我们信息组内部用的Online Judge。</p>
<p>这个Online Judge我准备做成类似Cena的网页版，准备使用PHP+MySQL+Apache+Windows2K3作为运行环境，AJAX做界面，C++程序做后台测评程序。采取类似USACO的提交立即测评，在线等待结果的测评方式。</p>
<p>现在我正在撰写文档，估计正式编写工作从下一周开始。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/our-online-judge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

