Skip to content
Permalink
Browse files

Site updated at 2015-07-23 03:37:03 UTC

  • Loading branch information...
FengHan committed Jul 23, 2015
1 parent 309afa9 commit fdecf6510e431f91a978d351fc974507514c4526
@@ -9,7 +9,7 @@
<meta name="author" content="HanFeng">


<meta name="description" content=" 404 Not Found 分享到: Recent Posts 使用Vagrant搭建本地Ubuntu开发环境 Docker小结 认识Docker 在Ubuntu上搭建Nginx + Php5-fpm Git的本地操作 ">
<meta name="description" content=" 404 Not Found 分享到: Recent Posts 在ubuntu上安装mariadb 使用Vagrant搭建本地Ubuntu开发环境 Docker小结 认识Docker 在Ubuntu上搭建Nginx + Php5-fpm ">


<!-- http://t.co/dKP3o1e -->
@@ -122,6 +122,10 @@ <h1 class="entry-title">404 Not Found</h1>
<h1>Recent Posts</h1>
<ul id="recent_posts">

<li class="post">
<a href="/blog/2015/07/23/mariadb-setup/">在ubuntu上安装mariadb</a>
</li>

<li class="post">
<a href="/blog/2015/07/22/vagrant-lnmp/">使用Vagrant搭建本地Ubuntu开发环境</a>
</li>
@@ -138,10 +142,6 @@ <h1>Recent Posts</h1>
<a href="/blog/2015/07/19/nginx_php5-fpm/">在Ubuntu上搭建Nginx + Php5-fpm</a>
</li>

<li class="post">
<a href="/blog/2015/07/18/git-local/">Git的本地操作</a>
</li>

</ul>
</section>

@@ -100,7 +100,7 @@ <h1 class="entry-title">About Me</h1>
<h3>Contact me:</h3>

<ul>
<li>Email: <a href="&#109;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#x63;&#x6f;&#x6e;&#x74;&#97;&#x63;&#x74;&#64;&#104;&#x61;&#110;&#102;&#101;&#110;&#x67;&#x2e;&#110;&#x61;&#x6d;&#x65;">&#x63;&#x6f;&#x6e;&#x74;&#x61;&#x63;&#x74;&#x40;&#104;&#x61;&#110;&#x66;&#x65;&#x6e;&#103;&#x2e;&#x6e;&#97;&#x6d;&#x65;</a></li>
<li>Email: <a href="&#109;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#x63;&#x6f;&#x6e;&#116;&#97;&#99;&#116;&#x40;&#x68;&#97;&#x6e;&#x66;&#101;&#110;&#x67;&#x2e;&#x6e;&#97;&#x6d;&#x65;">&#99;&#111;&#110;&#116;&#97;&#99;&#116;&#64;&#x68;&#97;&#110;&#102;&#101;&#x6e;&#x67;&#46;&#110;&#97;&#109;&#101;</a></li>
<li>Blog: <a href="http://hanfeng.name">http://hanfeng.name</a></li>
<li>GitHub: <a href="https://github.com/FengHan">https://github.com/FengHan</a></li>
</ul>
@@ -123,7 +123,7 @@ <h1>关于我</h1>
<h3>联系方式</h3>

<ul>
<li>邮件: <a href="&#109;&#97;&#105;&#x6c;&#116;&#x6f;&#58;&#99;&#x6f;&#110;&#116;&#x61;&#99;&#116;&#64;&#104;&#97;&#110;&#x66;&#x65;&#x6e;&#103;&#46;&#x6e;&#97;&#109;&#101;">&#99;&#111;&#110;&#x74;&#97;&#99;&#x74;&#64;&#104;&#97;&#110;&#102;&#101;&#110;&#103;&#46;&#x6e;&#97;&#x6d;&#101;</a></li>
<li>邮件: <a href="&#x6d;&#x61;&#x69;&#108;&#x74;&#111;&#x3a;&#99;&#x6f;&#110;&#x74;&#97;&#x63;&#116;&#64;&#x68;&#x61;&#x6e;&#x66;&#101;&#x6e;&#103;&#x2e;&#110;&#x61;&#109;&#101;">&#99;&#111;&#x6e;&#116;&#97;&#x63;&#116;&#64;&#104;&#x61;&#110;&#x66;&#x65;&#110;&#103;&#46;&#x6e;&#97;&#109;&#101;</a></li>
<li>博客: <a href="http://hanfeng.name">http://hanfeng.name</a></li>
<li>GitHub: <a href="https://github.com/FengHan">https://github.com/FengHan</a></li>
</ul>
@@ -140,6 +140,10 @@ <h3>联系方式</h3>
<h1>Recent Posts</h1>
<ul id="recent_posts">

<li class="post">
<a href="/blog/2015/07/23/mariadb-setup/">在ubuntu上安装mariadb</a>
</li>

<li class="post">
<a href="/blog/2015/07/22/vagrant-lnmp/">使用Vagrant搭建本地Ubuntu开发环境</a>
</li>
@@ -156,10 +160,6 @@ <h1>Recent Posts</h1>
<a href="/blog/2015/07/19/nginx_php5-fpm/">在Ubuntu上搭建Nginx + Php5-fpm</a>
</li>

<li class="post">
<a href="/blog/2015/07/18/git-local/">Git的本地操作</a>
</li>

</ul>
</section>

151 atom.xml
@@ -4,7 +4,7 @@
<title><![CDATA[hanfeng.name]]></title>
<link href="http://fenghan.github.io/atom.xml" rel="self"/>
<link href="http://fenghan.github.io/"/>
<updated>2015-07-22T17:14:34+08:00</updated>
<updated>2015-07-23T11:36:52+08:00</updated>
<id>http://fenghan.github.io/</id>
<author>
<name><![CDATA[HanFeng]]></name>
@@ -13,6 +13,36 @@
<generator uri="http://octopress.org/">Octopress</generator>


<entry>
<title type="html"><![CDATA[在ubuntu上安装mariadb]]></title>
<link href="http://fenghan.github.io/blog/2015/07/23/mariadb-setup/"/>
<updated>2015-07-23T10:50:50+08:00</updated>
<id>http://fenghan.github.io/blog/2015/07/23/mariadb-setup</id>
<content type="html"><![CDATA[<h1>前言</h1>
<p>MySQL被SUN收购后,又被Oracle收购。它的作者从新开发了一个完全兼容MySQL的数据库,并且以他的女儿命名,叫做<a href="https://mariadb.org/">MariDB</a></p>
<h1>安装</h1>
<p>首先从 <a href="http://downloads.mariadb.org/mariadb/repositories/">MariaDB 下载页面</a> 选择贴近你的 Ubuntu 版本的资料库镜像,然后下载页面会在底部显示镜像信息(如下所示),然后执行这些命令</p>
<pre><code>sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://mirrors.hustunique.com/mariadb/repo/5.5/ubuntu trusty main'
</code></pre>
<p>开始安装</p>
<pre><code>sudo apt-get update
sudo apt-get install mariadb-server
</code></pre>
<p>这样 MariaDB 5.5 就已经安装成功,你就可以像使用 MySQL 那样对它进行配置和使用了。</p>
<p>使用mysql -uroot -p1234测试。</p>
]]></content>
</entry>

<entry>
<title type="html"><![CDATA[使用Vagrant搭建本地Ubuntu开发环境]]></title>
<link href="http://fenghan.github.io/blog/2015/07/22/vagrant-lnmp/"/>
@@ -146,6 +176,12 @@ EnableSendfile off
sendfile off;
</code></pre>
<h3>补充</h3>
<p>Putty工具连接:</p>
<p>注:虚拟机的默认IP|Port:127.0.0.1:2222 用户:vagrant | root 密码:vagrant</p>
<h3>参考链接</h3>
<p><a href="http://www.ciandt.com.cn/blog/how-to-use-vagrant-build-drupal-development-environment-windows">CI&amp;T: 使用VAGRANT构建DRUPAL本地开发环境 - WINDOWS</a></p>
@@ -663,9 +699,9 @@ Docker Server:它是一个<strong>守护进程(Daemon)</strong>,一直运
<p><strong>安装Nginx</strong></p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>apt-get install nginx</span></code></pre></td></tr></table></div></figure>
<pre><code>apt-get update
apt-get install nginx
</code></pre>
<p><strong>配置Nginx</strong></p>
@@ -691,7 +727,7 @@ Docker Server:它是一个<strong>守护进程(Daemon)</strong>,一直运
<blockquote><p>/etc/nginx/sites-available/default</p></blockquote>
<p>修改配置</p>
<h3>fastcgi配置</h3>
<pre><code>location ~ \.php$ {
@@ -708,19 +744,18 @@ Docker Server:它是一个<strong>守护进程(Daemon)</strong>,一直运
<p><strong>配置生效</strong></p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>/etc/init.d/nginx reload</span></code></pre></td></tr></table></div></figure>
<pre><code>/etc/init.d/nginx reload
</code></pre>
<p><strong>启动Nginx</strong></p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>/etc/init.d/nginx start</span></code></pre></td></tr></table></div></figure>
<pre><code>/etc/init.d/nginx start
</code></pre>
<p><strong>测试Nginx</strong></p>
<p>在 /usr/share/nginx/html下新建index.php</p>
<p>再配置好php5-fpm后,再测试
在 /usr/share/nginx/html下新建index.php</p>
<pre><code>&lt;? php
phpinfo();
@@ -733,36 +768,23 @@ nginx -t</p>
<p>创建 tech.hanfeng.name</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>cd /usr/share/nginx
</span><span class='line'>
</span><span class='line'>mkdir tech.hanfeng.name
</span><span class='line'>
</span><span class='line'>cd tech.hanfeng.name
</span><span class='line'>
</span><span class='line'>echo '&lt;?php phpinfo();' &gt; index.php
</span><span class='line'>
</span><span class='line'>cd /etc/nginx/sites-available/
</span><span class='line'>
</span><span class='line'>cp default tech.hanfeng.name
</span><span class='line'>#Apache需要以.conf结尾,Nginx不用
</span><span class='line'>
</span><span class='line'>grep -v "#" tech.hanfeng.name
</span></code></pre></td></tr></table></div></figure>
<pre><code>cd /usr/share/nginx
mkdir tech.hanfeng.name
cd tech.hanfeng.name
echo '&lt;?php phpinfo();' &gt; index.php
cd /etc/nginx/sites-available/
cp default tech.hanfeng.name
#Apache需要以.conf结尾,Nginx不用
grep -v "#" tech.hanfeng.name
</code></pre>
<p>tech.hanfeng.name 虚拟主机配置:</p>
<pre><code>server {
listen 80;
@@ -791,17 +813,17 @@ nginx -t</p>
}
</code></pre>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>ln -s /etc/nginx/sites-available/tech.hanfeng.name /etc/nginx/sites-enabled/tech.hanfeng.name
</span><span class='line'>
</span><span class='line'>nginx -t
</span><span class='line'>
</span><span class='line'>/etc/init.d/nginx reload</span></code></pre></td></tr></table></div></figure>
<h3>生成软连接</h3>
<pre><code>ln -s /etc/nginx/sites-available/tech.hanfeng.name /etc/nginx/sites-enabled/tech.hanfeng.name
</code></pre>
<h3>测试并且加载nginx配置</h3>
<pre><code>nginx -t
/etc/init.d/nginx reload
</code></pre>
<h1>安装PHP</h1>
@@ -847,21 +869,8 @@ nginx -t</p>
<p>查看php5运行进程</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>ps -waux | grep php5</span></code></pre></td></tr></table></div></figure>
<p>打开关闭php5进程</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>sudo service php5-fpm stop
</span><span class='line'>sudo service php5-fpm start
</span><span class='line'>sudo service php5-fpm restart
</span><span class='line'>sudo service php5-fpm status</span></code></pre></td></tr></table></div></figure>
<pre><code>ps -waux | grep php5
</code></pre>
<h1>配置PHP5-FPM</h1>
@@ -874,6 +883,16 @@ listen = /var/run/php5-fpm.sock 改为
listen = 127.0.0.1:9000
</code></pre>
<p>配置好后,重新启动php5-fpm</p>
<h3>php5-fpm命令</h3>
<pre><code>sudo service php5-fpm stop
sudo service php5-fpm start
sudo service php5-fpm restart
sudo service php5-fpm status
</code></pre>
<p>一台机器安装nginx,另一台安装php,用上面的修改</p>
<p>重新运行php进程</p>
@@ -418,6 +418,10 @@ <h1>Comments</h1>
<h1>Recent Posts</h1>
<ul id="recent_posts">

<li class="post">
<a href="/blog/2015/07/23/mariadb-setup/">在ubuntu上安装mariadb</a>
</li>

<li class="post">
<a href="/blog/2015/07/22/vagrant-lnmp/">使用Vagrant搭建本地Ubuntu开发环境</a>
</li>
@@ -434,10 +438,6 @@ <h1>Recent Posts</h1>
<a href="/blog/2015/07/19/nginx_php5-fpm/">在Ubuntu上搭建Nginx + Php5-fpm</a>
</li>

<li class="post">
<a href="/blog/2015/07/18/git-local/">Git的本地操作</a>
</li>

</ul>
</section>

@@ -541,6 +541,10 @@ <h1>Comments</h1>
<h1>Recent Posts</h1>
<ul id="recent_posts">

<li class="post">
<a href="/blog/2015/07/23/mariadb-setup/">在ubuntu上安装mariadb</a>
</li>

<li class="post">
<a href="/blog/2015/07/22/vagrant-lnmp/">使用Vagrant搭建本地Ubuntu开发环境</a>
</li>
@@ -557,10 +561,6 @@ <h1>Recent Posts</h1>
<a href="/blog/2015/07/19/nginx_php5-fpm/">在Ubuntu上搭建Nginx + Php5-fpm</a>
</li>

<li class="post">
<a href="/blog/2015/07/18/git-local/">Git的本地操作</a>
</li>

</ul>
</section>

@@ -387,6 +387,10 @@ <h1>Comments</h1>
<h1>Recent Posts</h1>
<ul id="recent_posts">

<li class="post">
<a href="/blog/2015/07/23/mariadb-setup/">在ubuntu上安装mariadb</a>
</li>

<li class="post">
<a href="/blog/2015/07/22/vagrant-lnmp/">使用Vagrant搭建本地Ubuntu开发环境</a>
</li>
@@ -403,10 +407,6 @@ <h1>Recent Posts</h1>
<a href="/blog/2015/07/19/nginx_php5-fpm/">在Ubuntu上搭建Nginx + Php5-fpm</a>
</li>

<li class="post">
<a href="/blog/2015/07/18/git-local/">Git的本地操作</a>
</li>

</ul>
</section>

0 comments on commit fdecf65

Please sign in to comment.
You can’t perform that action at this time.