<?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>Lefter &#187; mysql</title>
	<atom:link href="http://lefter.net/blog/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://lefter.net/blog</link>
	<description>blog of lefter</description>
	<lastBuildDate>Wed, 16 May 2012 03:54:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu安装 Apache</title>
		<link>http://lefter.net/blog/ubuntu-apache/</link>
		<comments>http://lefter.net/blog/ubuntu-apache/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 02:20:30 +0000</pubDate>
		<dc:creator>lujo</dc:creator>
				<category><![CDATA[程序相关]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://lefter.net/blog/?p=658</guid>
		<description><![CDATA[Ubuntu为我们提供了 su apt-get install 命令，通过它你可以很方便地安装一些软件，这些软件是放在Ubuntu放置在各个地方的服务器上面，如果你想安装的软件是比较常见的，一般都可以通过它来下载... ]]></description>
			<content:encoded><![CDATA[<p>Ubuntu为我们提供了 su apt-get install 命令，通过它你可以很方便地安装一些软件，这些软件是放在Ubuntu放置在各个地方的服务器上面，如果你想安装的软件是比较常见的，一般都可以通过它来下载.<br />
<code>sudo apt-get install apache2</code></p>
<p>配置网站目录，在Ubuntu下面的 apache 目录存放方式跟 Window下面有很大区别，它的配置文件是存放在 etc/apache2/ 这个文件夹下面,又将以前的配置文件分成了
<dl>
<dt>etc/apache2/conf.d/charset</dt>
<dd>这个是网站编码配置，里面内容很少，打开看就知道了，我这里将最后行的 ＃AddDefaultCharset UTF-8 前面的#去掉，使用UTF-8编码，当然也可以把 UTF-8改成别的编码.</dd>
<dt>etc/apache2/sites-available/default </dt>
<dd>这个是网站目录配置，想更改网站目录的话，就修改这个，默认的网站目录是/var/www(所有者为root,所以修改起来很不方便)</dd>
</dl>
<p>像LINUX源一样，要有一定的权限才能修改上面的配置文件，可以这样：<code>1:su  输入root密码 2:gedit etc/apache2/conf.d/charset </code>或者直接临时获取权限<code>1:sudo gedit etc/apache2/conf.d/charset </code>
</p>
<p>重启apache即可,<code>sudo service apache2 restart</code>也可以<code>sudo /etc/init.d/apache2 restart</code></p>
<p>BTW: init.d 下面是系统的服务类程序（比如xinet,samba,vsftp，xserver,apche,mysql）的启动登记   各个init.x目录下的文件表示这个运行级别下服务的运行与否,这里面的文件通常是一些脚本,来启动和结束各个服务的,具体的内容你可以用任何一个编辑器打开看的 </p>
<p><strong>顺便提一下mysql</strong> ，开启mysql的方法和apche一样：<code>sudo /etc/init.d/mysql start</code>不知我什么时候已经把 mysql安装成功了,因为我的/etc/nit.d/ 目录下有 mysal文件，于是我在终端上输入 mysql，提示<code>ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'h'</code>我想也是由于权限的问题造成的输入<code>mysql --user=root -p</code>就对了，然后就可以在终断开上运行MySql的命令了比如<br />
<code>mysql > show databases;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://lefter.net/blog/ubuntu-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

