<?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; 日记</title>
	<atom:link href="http://www.wangtianqi.com/blog/tag/%e6%97%a5%e8%ae%b0/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wangtianqi.com/blog</link>
	<description>每一天都是新的开始</description>
	<lastBuildDate>Mon, 12 Sep 2011 10:42:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>ubuntu下安装wordpress</title>
		<link>http://www.wangtianqi.com/blog/132</link>
		<comments>http://www.wangtianqi.com/blog/132#comments</comments>
		<pubDate>Fri, 05 Dec 2008 17:41:30 +0000</pubDate>
		<dc:creator>czyhd</dc:creator>
				<category><![CDATA[blog相关]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[日记]]></category>

		<guid isPermaLink="false">http://www.wangtianqi.com/132</guid>
		<description><![CDATA[我需要一个linux下的日记本,考虑到安全性以及可移植性,决定装个blog上去,这是折腾的根本原因&#8230;

一,apache的安装

sudo apt-get install apache2

<span class="readmore"><a href="http://www.wangtianqi.com/blog/132" title="ubuntu下安装wordpress">阅读全文——共1059字</a></span>]]></description>
			<content:encoded><![CDATA[<p>我需要一个linux下的日记本,考虑到安全性以及可移植性,决定装个blog上去,这是折腾的根本原因&#8230;</p>
<p>一,apache的安装</p>
<pre>sudo apt-get install apache2

二,php环境安装和设置</pre>
<p>sudo apt-get install libapache2-mod-php5<br />
sudo apt-get install php5</p>
<p>然后编辑/etc/php5/apache2/php.ini文件,主要是安全方面:</p>
<p>设置php程序错误日志<br />
&gt;error_reporting = E_ALL<br />
&gt;log_errors = On<br />
&gt;error_log = /var/log/php_err.log</p>
<p>#关闭register_globals<br />
&gt;register_globals = Off</p>
<p>#禁止打开远程地址<br />
&gt;allow_url_fopen = Off</p>
<pre>另外,不要启用安全模式..安不了wordpress
safe_mode = Off

三,mysql安装和设置
1、安装MySQL

sudo apt-get install mysql

2、配置

默认的MySQL安装之后root是没有密码的，所以首先用根用户进入：

$mysql -u root

进入mysql之后，最要紧的就是要设置Mysql中的root用户密码了，否则，Mysql服务无安全可言了。

mysql&gt; GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "123456";

注意，我这儿用的是123456做为root用户的密码，但是该密码是不安全的，请大家最好使用大小写字母与数字混合的密码，且不少于8位。

四,把wordpress目录放到/var/www下,修改权限,我用的是755,然后修改wp-config.php,安装即可

五,只允许本地访问
因为是日记本..所以...
我试着在httpd.conf和apache2.php里面禁止IP,但是很奇怪,没有用..
我的做法是,用rewrite,然后用.htaccess来阻止非本机用户访问.
sudo gedit /etc/apache2/sites-available/default
把前两个AllowOverride None改成AllowOverride All
然后在www目录下创建.htaccess文件,写入以下代码
Order deny,allow
Deny from all
Allow from 127.0.0.1
完成...

六,安全配置:把限制目录的选项打开
限制了fopen(),file()等函数可以操作的目录范围
&gt;open_basedir = /var/www/</pre>
<h3  class="related_post_title">相关主题</h3><ul class="related_post"><li><a href="http://www.wangtianqi.com/blog/183" title="升级了一下显卡驱动">升级了一下显卡驱动</a></li><li><a href="http://www.wangtianqi.com/blog/169" title="ubuntu 9.04的优化">ubuntu 9.04的优化</a></li><li><a href="http://www.wangtianqi.com/blog/162" title="突然发现swap分区的利用率太低了">突然发现swap分区的利用率太低了</a></li><li><a href="http://www.wangtianqi.com/blog/149" title="用openoffice写wordpress博客">用openoffice写wordpress博客</a></li><li><a href="http://www.wangtianqi.com/blog/148" title="ubuntu下制作ISO镜像文件">ubuntu下制作ISO镜像文件</a></li><li><a href="http://www.wangtianqi.com/blog/143" title="MOCP的配置">MOCP的配置</a></li><li><a href="http://www.wangtianqi.com/blog/140" title="玩了一下Brainfuck">玩了一下Brainfuck</a></li><li><a href="http://www.wangtianqi.com/blog/139" title="发现wanda小鱼蛮有意思的">发现wanda小鱼蛮有意思的</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.wangtianqi.com/blog/132/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

