<?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; Linux</title>
	<atom:link href="http://www.qiais.com/achives/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.qiais.com</link>
	<description>琪埃信息系统</description>
	<lastBuildDate>Tue, 11 Feb 2020 01:50:29 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0</generator>
	<item>
		<title>yum 安装软件 版本确认</title>
		<link>http://www.qiais.com/achives/830/</link>
		<comments>http://www.qiais.com/achives/830/#comments</comments>
		<pubDate>Tue, 11 Feb 2020 01:50:29 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=830</guid>
		<description><![CDATA[sudo yum &#8211;showduplicates search php]]></description>
				<content:encoded><![CDATA[<p>sudo yum &#8211;showduplicates search php</p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/830/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VirtualBox 上安装 CentOS 设定ssh</title>
		<link>http://www.qiais.com/achives/828/</link>
		<comments>http://www.qiais.com/achives/828/#comments</comments>
		<pubDate>Tue, 11 Feb 2020 01:47:29 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=828</guid>
		<description><![CDATA[ホストオンリーネットワークアダプタの設定の確認 VirtualBoxを起動し、メニュー「ファイル」⇒「ホストネ...]]></description>
				<content:encoded><![CDATA[<p><strong>ホストオンリーネットワークアダプタの設定の確認</strong><br />
VirtualBoxを起動し、メニュー「ファイル」⇒「ホストネットワークマネージャー」を開き、ホストオンリーネットワークアダプタが存在し、DHCPサーバーが有効になっていることを確認します。<br />
存在しなかったら、 作成してDHCPを有効かします。</p>
<p><strong>VirtualHostのネットワーク設定</strong><br />
3. 「ネットワーク」をクリックし、「アダプター１」タブの割り当てを「NAT」から「ホストオンリーアダプター」に変更します。</p>
<p><strong>ip確認</strong><br />
ip a</p>
<p><strong>proxy設定</strong><br />
echo export http_proxy=http://192.168.56.1:3128>/etc/profile.d/proxy.sh<br />
echo export https_proxy=http://192.168.56.1:3128>>/etc/profile.d/proxy.sh<br />
source /etc/profile.d/proxy.sh<br />
#結果確認<br />
curl www.google.co.jp</p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/828/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS6安装postgres11</title>
		<link>http://www.qiais.com/achives/821/</link>
		<comments>http://www.qiais.com/achives/821/#comments</comments>
		<pubDate>Sat, 29 Dec 2018 03:01:33 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Postgresql]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=821</guid>
		<description><![CDATA[1. 从官方网站安装库包 # yum -y install https://download.postgres...]]></description>
				<content:encoded><![CDATA[<p>1. 从官方网站安装库包<br />
<code><br />
# yum -y install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6.9-x86_64/pgdg-centos11-11-2.noarch.rpm</p>
<p># yum -y update<br />
</code></p>
<p>2. Postgresql安装<br />
<code><br />
# yum install postgresql11 postgresql11-server postgresql11-libs<br />
</code></p>
<p>3. 确认<br />
<code><br />
[root@localhost ~]# rpm -qa | grep postgres<br />
postgresql11-libs-11.1-1PGDG.rhel6.x86_64<br />
postgresql11-11.1-1PGDG.rhel6.x86_64<br />
postgresql11-server-11.1-1PGDG.rhel6.x86_64<br />
[root@localhost ~]#<br />
</code></p>
<p>4. 数据库初始化<br />
<code><br />
# service postgresql-11 initdb<br />
</code></p>
<p>5.修改配置文件<br />
/var/lib/pgsql/11/data/pg_hba.conf<br />
<code><br />
# "local" is for Unix domain socket connections only<br />
local   all             all                                     peer<br />
# IPv4 local connections:<br />
host    all             all             127.0.0.1/32            ident<br />
　：<br />
</code></p>
<p>修改如下<br />
<code><br />
　：<br />
# "local" is for Unix domain socket connections only<br />
local   all             all                                     trust<br />
# IPv4 local connections:<br />
host    all             all             127.0.0.1/32            trust<br />
　：<br />
</code></p>
<p>6. 启动服务<br />
<code><br />
# service postgresql-11 start<br />
</code></p>
<p>7. 服务状态确认<br />
<code><br />
service postgresql-1 status<br />
</code></p>
<p>8. 服务登录<br />
<code><br />
chkconfig postgresql-11 on<br />
</code></p>
<p>9.连接确认<br />
<code><br />
[root@localhost ~]# su - postgres<br />
-bash-4.1$ psql<br />
psql (11.1)<br />
"help" .....</p>
<p>postgres=# \q<br />
-bash-4.1$ exit<br />
logout<br />
[root@localhost ~]#<br />
</code></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>10. 创建用户<br />
<code><br />
create user user01 with password 'password01';<br />
</code></p>
<p>11.创建数据库<br />
<code><br />
create database db01 encoding 'UTF8' owner user01;<br />
</code></p>
<p>12. 登录数据库<br />
<code><br />
psql -d db01 -U user01<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/821/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS7安装apache,php</title>
		<link>http://www.qiais.com/achives/806/</link>
		<comments>http://www.qiais.com/achives/806/#comments</comments>
		<pubDate>Sat, 20 Feb 2016 06:44:23 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[网站服务器]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=806</guid>
		<description><![CDATA[1.安装httpd 2.开放80端口 3.*firewall，如果firewall没有安装的可以通过以下命令执...]]></description>
				<content:encoded><![CDATA[<p>1.安装httpd</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 ~]# yum -y install httpd httpd-devel
[root@ip-10-167-141-167 ~]# yum -y install php php-mbstring php-xml
[root@ip-10-167-141-167 ~]# systemctl start httpd
</pre>
<p>2.开放80端口</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 ~]# firewall-cmd --permanent --zone=public --add-service=http
[root@ip-10-167-141-167 ~]# firewall-cmd --permanent --zone=public --add-service=https
[root@ip-10-167-141-167 ~]# firewall-cmd --reload
</pre>
<p>3.*firewall，如果firewall没有安装的可以通过以下命令执行安装</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 ~]# yum -y install firewalld
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/806/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS7安装mysql</title>
		<link>http://www.qiais.com/achives/803/</link>
		<comments>http://www.qiais.com/achives/803/#comments</comments>
		<pubDate>Sat, 20 Feb 2016 06:27:57 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=803</guid>
		<description><![CDATA[CentOS7中Mysql的安装步骤 1.删除mariadb 2.安装 3.启动Mysql 4.初始化DB]]></description>
				<content:encoded><![CDATA[<p><strong>CentOS7中Mysql的安装步骤</strong></p>
<p>1.删除mariadb</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 centos]# yum list installed | grep maria
mariadb-libs.x86_64                        1:5.5.44-2.el7.centos       @base    
[root@ip-10-167-141-167 centos]# yum -y remove mariadb-libs
[root@ip-10-167-141-167 centos]# 
</pre>
<p>2.安装</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 centos]# yum -y install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
[root@ip-10-167-141-167 centos]# yum -y install mysql mysql-devel mysql-server mysql-utilities
</pre>
<p>3.启动Mysql</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 centos]# systemctl is-enabled mysqld.service
enabled
#disable的情况下
[root@ip-10-167-141-167 centos]# systemctl enable mysqld.service
[root@ip-10-167-141-167 centos]# systemctl start mysqld.service
</pre>
<p>4.初始化DB</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 centos]# mysql_secure_installation
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/803/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS6のインストール</title>
		<link>http://www.qiais.com/achives/770/</link>
		<comments>http://www.qiais.com/achives/770/#comments</comments>
		<pubDate>Mon, 30 Mar 2015 07:39:42 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=770</guid>
		<description><![CDATA[1.ミニバージョンのCentOSをダウンロードする 下のミラーから64bitのCentOS6のミニ版をダウンロ...]]></description>
				<content:encoded><![CDATA[<h4>1.ミニバージョンのCentOSをダウンロードする</h4>
<p>下のミラーから64bitのCentOS6のミニ版をダウンロードする</p>
<pre class="brush: plain; title: ; notranslate">http://mirror.fairway.ne.jp/centos/6/isos/x86_64/</pre>
<p>下载，否则即使顺利安装，以后也会有各种问题。</p>
<h4>2.烧制启动盘</h4>
<p>如果是Windows XP的话，你需要安装刻录软件，再进行刻录。如果是Windows8的话不用安装刻录软件就可以刻录，具体怎么刻录的话，百度一下。<br />
虚拟机下安装的话不用刻录，直接使用iso文件就可以。</p>
<h4>3.安装CentOS</h4>
<p>因为是服务器，我们将安装text模式的CentOS。GUI界面模式的服务器消耗更多的硬件，服务器安装的话不推荐。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.17.16.png"><img class="alignnone size-medium wp-image-86" alt="スクリーンショット 2013-11-27 16.17.16" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.17.16-300x225.png" width="300" height="225" /></a></p>
<p>&lt;1&gt;选择［Install or upgrade an existing system］，并且按下［tab］键，光标处输入［text］，按下［enter］键</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.18.05.png"><img class="alignnone size-medium wp-image-87" alt="スクリーンショット 2013-11-27 16.18.05" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.18.05-300x170.png" width="300" height="170" /></a></p>
<p>&lt;2&gt;测试安装盘是否可安装，推荐［OK］，我的光盘测试过，这里选择［skip］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.18.39.png"><img class="alignnone size-medium wp-image-88" alt="スクリーンショット 2013-11-27 16.18.39" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.18.39-300x168.png" width="300" height="168" /></a></p>
<p>&lt;3&gt;下一界面选择［OK］，并切按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.19.31.png"><img class="alignnone size-medium wp-image-90" alt="スクリーンショット 2013-11-27 16.19.31" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.19.31-300x168.png" width="300" height="168" /></a></p>
<p>&lt;4&gt;语言选择，选择［Chinese(Simplified)］，跳到［OK］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.20.15.png"><img class="alignnone size-medium wp-image-91" alt="スクリーンショット 2013-11-27 16.20.15" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.20.15-300x187.png" width="300" height="187" /></a></p>
<p>&lt;5&gt;安装界面没有中文警告，安装界面基本只支持英文，这里选择［OK］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.26.03.png"><img class="alignnone size-medium wp-image-93" alt="スクリーンショット 2013-11-27 16.26.03" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.26.03-300x169.png" width="300" height="169" /></a></p>
<p>&lt;6&gt;键盘模式，这里选择［us］，跳到［OK］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.26.32.png"><img class="alignnone size-medium wp-image-94" alt="スクリーンショット 2013-11-27 16.26.32" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.26.32-300x169.png" width="300" height="169" /></a></p>
<p>&lt;7&gt;选择［Re-initialize all］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.27.15.png"><img class="alignnone size-medium wp-image-95" alt="スクリーンショット 2013-11-27 16.27.15" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.27.15-300x169.png" width="300" height="169" /></a></p>
<p>&lt;8&gt;时区选择，这里选择［Asia/Shanghai］，跳到［OK］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.27.43.png"><img class="alignnone size-medium wp-image-96" alt="スクリーンショット 2013-11-27 16.27.43" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.27.43-300x166.png" width="300" height="166" /></a></p>
<p>&lt;9&gt;输入root用户密码，跳到［OK］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.29.03.png"><img class="alignnone size-medium wp-image-98" alt="スクリーンショット 2013-11-27 16.29.03" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.29.03-300x168.png" width="300" height="168" /></a></p>
<p>&lt;10&gt;硬盘分区选择，这里选择［Use entire drive］，跳到［OK］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.29.21.png"><img class="alignnone size-medium wp-image-99" alt="スクリーンショット 2013-11-27 16.29.21" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.29.21-300x169.png" width="300" height="169" /></a></p>
<p>&lt;11&gt;向硬盘写数据配置，选择［write changes to disk］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.30.02.png"><img class="alignnone size-medium wp-image-100" alt="スクリーンショット 2013-11-27 16.30.02" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.30.02-300x168.png" width="300" height="168" /></a></p>
<p>&lt;12&gt;安装包的安装进程。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.32.13.png"><img class="alignnone size-medium wp-image-101" alt="スクリーンショット 2013-11-27 16.32.13" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.32.13-300x167.png" width="300" height="167" /></a></p>
<p>&lt;13&gt;安装结束，重起服务器，选择［Reboot］，按下［enter］键。</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.35.29.png"><img class="alignnone size-medium wp-image-103" alt="スクリーンショット 2013-11-27 16.35.29" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-27-16.35.29-300x171.png" width="300" height="171" /></a></p>
<p>&lt;14&gt;成功重起，输入用户名：root，密码，按下［enter］键进入服务器。</p>
<p>结束，谢谢阅览！！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/770/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS+Ruby on rails+Apache构建ruby的web程序</title>
		<link>http://www.qiais.com/achives/764/</link>
		<comments>http://www.qiais.com/achives/764/#comments</comments>
		<pubDate>Thu, 11 Sep 2014 08:04:40 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=764</guid>
		<description><![CDATA[关于Ruby是什么，Ruby on rails是什么，这里不做介绍，请参看官方网站。 这主要是讨论如何在Cen...]]></description>
				<content:encoded><![CDATA[<p>关于Ruby是什么，Ruby on rails是什么，这里不做介绍，请参看官方网站。</p>
<p>这主要是讨论如何在CentOS上架设Ruby on rails的web应用程序。</p>
<p>1. 如何安装CentOS，请参考<a href="http://www.qiais.com/achives/77/" title="安装Linux(Centos6)服务器" target="_blank">安装Linux(Centos6)服务器</a><br />
2. 如何安装Apache，请参考<a href="http://www.qiais.com/achives/92/" title="在Linux(CentOS6)上搭建Apache2+Mysql5+PHP5开发环境" target="_blank">在Linux(CentOS6)上搭建Apache2+Mysql5+PHP5开发环境</a><br />
3. 安装Ruby 2以及Rails 3<br />
   Linux上管理安装Ruby的最好方法莫过于RVM(Ruby Version Manager)了，RVM可以很轻松的管理Ruby的各个版本，方便的切换Ruby版本。<br />
   最新的RVM可以通过下面的命令获取，安装。请使用root登录导系统进行操作。</p>
<pre class="brush: plain; title: ; notranslate">
# curl -L get.rvm.io | bash -s stable 
# source /etc/profile.d/rvm.sh 
</pre>
<p>  安装RVM必要的包以及相关软件</p>
<pre class="brush: plain; title: ; notranslate">
rvm requirements 
</pre>
<p>  安装Ruby, 现时最新版本伟2.1.2</p>
<pre class="brush: plain; title: ; notranslate">
rvm install 2.1.2
</pre>
<p>  将2.1.2设置为默认使用版本</p>
<pre class="brush: plain; title: ; notranslate">
rvm use 2.0.0 --default
</pre>
<p>  安装Rails，这需要一定的时间，请耐心等待</p>
<pre class="brush: plain; title: ; notranslate">
gem install rails
</pre>
<p>  查看已安装Ruby以及Rails版本</p>
<pre class="brush: plain; title: ; notranslate">
# ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
# rails -v
Rails 3.2.13
#
</pre>
<p>4. 安装Phusion Passenger</p>
<p>  Phusion Passenger是一应用服务器，经常被用在Ruby的web应用程序上或网站上，以Ruby的gem的形式发布。</p>
<p>  安装Phusion Passenger gem</p>
<pre class="brush: plain; title: ; notranslate">
gem install passenger 
</pre>
<p>  安装Apache的两个包</p>
<pre class="brush: plain; title: ; notranslate">
yum install curl-devel httpd-devel 
</pre>
<p>编译Apache的Phusion Passenger模块</p>
<pre class="brush: plain; title: ; notranslate">
passenger-install-apache2-module  
</pre>
<p>编译过程中会出现类似于下面的信息，需要将其手动设置到/etc/httpd/conf/httpd.conf中</p>
<pre class="brush: plain; title: ; notranslate">
   LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.50/buildout/apache2/mod_passenger.so
   &lt;IfModule mod_passenger.c&gt;
     PassengerRoot /usr/local/rvm/gems/ruby-2.1.2/gems/passenger-4.0.50
     PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.1.2/wrappers/ruby
   &lt;/IfModule&gt;
</pre>
<p>5. Rails简单程序</p>
<p>  准备</p>
<pre class="brush: plain; title: ; notranslate">
# yum install sqlite-devel
# cd /home/mokuzai
</pre>
<p> 创建站点</p>
<pre class="brush: plain; title: ; notranslate">
# rails new mokuzai-point 
# cd mokuzai-point
</pre>
<p>  执行bundle install命令</p>
<pre class="brush: plain; title: ; notranslate">
bundle install
</pre>
<p>  初始化数据库</p>
<pre class="brush: plain; title: ; notranslate">
rake db:migrate 
</pre>
<p>创建虚拟站点</p>
<pre class="brush: plain; title: ; notranslate">
  RackEnv development
&lt;VirtualHost *:80&gt; 
 ServerName mokuzai-point.hanbai.jp 
 # !!! Be sure to point DocumentRoot to 'public'! 
 DocumentRoot /home/mokuzai/mokuzai-point/public 
 &lt;Directory /home/mokuzai/mokuzai-point/public&gt; 
 # This relaxes Apache security settings. 
 AllowOverride all 
 # MultiViews must be turned off. 
 Options -MultiViews 
 &lt;/Directory&gt; 
&lt;/VirtualHost&gt;
</pre>
<p>  重启Apache</p>
<pre class="brush: plain; title: ; notranslate">
service httpd restart
</pre>
<p>确认<br />
<a href="http://mokuzai-point.hanbai.jp" title="http://mokuzai-point.hanbai.jp" target="_blank">http://mokuzai-point.hanbai.jp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/764/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AWS扩展root空间容量（备忘）</title>
		<link>http://www.qiais.com/achives/751/</link>
		<comments>http://www.qiais.com/achives/751/#comments</comments>
		<pubDate>Sat, 06 Sep 2014 01:20:01 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=751</guid>
		<description><![CDATA[AWS的CentOS实例创建时默认8Gb左右的root硬盘，现实当中这远远不够，需要扩展。 在创建实例时有一步...]]></description>
				<content:encoded><![CDATA[<p>AWS的CentOS实例创建时默认8Gb左右的root硬盘，现实当中这远远不够，需要扩展。<br />
在创建实例时有一步骤是设置root硬盘大小的，默认8GB，将其修改为100GB后，需要通过resize2fs命令使增加的硬盘可用</p>
<pre class="brush: plain; title: ; notranslate">
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvde       7.9G  1.5G  6.0G  20% /
tmpfs           1.8G     0  1.8G   0% /dev/shm
</pre>
<p>使用resize2fs</p>
<pre class="brush: plain; title: ; notranslate">
# resize2fs /dev/xvde
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/xvde is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 7
Performing an on-line resize of /dev/xvde to 26214400 (4k) blocks.
The filesystem on /dev/xvde is now 26214400 blocks long.
</pre>
<p>再次确认</p>
<pre class="brush: plain; title: ; notranslate">
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvde        99G  1.5G   92G   2% /
tmpfs           1.8G     0  1.8G   0% /dev/shm
</pre>
<p>root硬盘增加到99G了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/751/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS6.5 安装 Mysql5.6</title>
		<link>http://www.qiais.com/achives/748/</link>
		<comments>http://www.qiais.com/achives/748/#comments</comments>
		<pubDate>Thu, 28 Aug 2014 03:30:19 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=748</guid>
		<description><![CDATA[CentOS6系列默认安装的Mysql版本为5.1，今天讨论如何将其升级到5.6 查看现有mysql版本 删除...]]></description>
				<content:encoded><![CDATA[<p>CentOS6系列默认安装的Mysql版本为5.1，今天讨论如何将其升级到5.6</p>
<p>查看现有mysql版本</p>
<pre class="brush: plain; title: ; notranslate">
# rpm -qa | grep mysql
mysql-utilities-1.3.6-1.el6.noarch
mysql-server-5.1.71-1.el6.x86_64
mysql-libs-5.1.71-1.el6.x86_64
mysql-5.1.71-1.el6.x86_64
mysql-connector-python-1.1.4-1.el6.noarch
mysql-devel-5.1.71-1.el6.x86_64
</pre>
<p>删除旧版本Mysql</p>
<pre class="brush: plain; title: ; notranslate">
# yum remove mysql*
</pre>
<p>添加mysql库</p>
<pre class="brush: plain; title: ; notranslate">
# yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
</pre>
<p>安装新的Mysql</p>
<pre class="brush: plain; title: ; notranslate">
#yum install mysql mysql-devel mysql-server mysql-utilities
</pre>
<p>查看新版本</p>
<pre class="brush: plain; title: ; notranslate">
# rpm -qa | grep mysql
mysql-community-libs-5.6.20-4.el6.x86_64
mysql-community-client-5.6.20-4.el6.x86_64
mysql-utilities-1.4.4-1.el6.noarch
mysql-community-release-el6-5.noarch
mysql-community-common-5.6.20-4.el6.x86_64
mysql-connector-python-1.2.2-1.el6.noarch
mysql-community-server-5.6.20-4.el6.x86_64
mysql-community-devel-5.6.20-4.el6.x86_64
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/748/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux(CentoOS)上安装ftp服务器，并且设置ssl安全链接</title>
		<link>http://www.qiais.com/achives/732/</link>
		<comments>http://www.qiais.com/achives/732/#comments</comments>
		<pubDate>Tue, 15 Jul 2014 02:15:21 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[FTP]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=732</guid>
		<description><![CDATA[FTP服务器虽然不是很安全，又很消耗带宽，但某些时候还是有必要安装的，特别是当我们的客户对网络不是很熟悉的时候...]]></description>
				<content:encoded><![CDATA[<p>FTP服务器虽然不是很安全，又很消耗带宽，但某些时候还是有必要安装的，特别是当我们的客户对网络不是很熟悉的时候，<br />
架设一台服务器很方便客户将文件上chuang</p>
<p>CentOS上安装FTP不是一件很难的事，但是需要加强服务器的安全，防止用户名与密码被盗。</p>
<p>1. 安装vsftpd</p>
<pre class="brush: plain; title: ; notranslate"># yum -y install vsftpd</pre>
<p>2.配置vsftpd.conf</p>
<pre class="brush: plain; title: ; notranslate">
# vi /etc/vsftpd/vsftpd.conf
</pre>
<pre class="brush: plain; title: ; notranslate">
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO　←　禁止anonymous（匿名）用户登录

# Activate logging of uploads/downloads.
xferlog_enable=YES　←　/var/log/vsftpd.log 启动连接，传送日志

# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log　←　日志文件为 /var/log/vsftpd.log

# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=NO　←　/var/log/vsftpd.log 设置日志格式

local_enable=YES
local_root=public_html ←　设置用户只能看到自己目录的public_html目录下的内容

# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command &quot;SIZE /big/file&quot; in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
ascii_upload_enable=YES　←　允许ascii模式上传
ascii_download_enable=YES　←　允许ascii模式下载

# You may fully customise the login banner string:
ftpd_banner=Welcome to blah FTP service.　←　登录FTP时隐藏软件名称以及版本号

# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=YES　←　限制用户只能在自己的目录下上传下载
chroot_list_enable=YES　←　允许chroot_list用户可以越过自己的目录
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list　←　chroot_list文件路径

# You may activate the &quot;-R&quot; option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as &quot;ncftp&quot; and &quot;mirror&quot; assume
# the presence of the &quot;-R&quot; option, so there is a strong case for enabling it.
ls_recurse_enable=YES　←　允许文件夹上传下载

#添加以下
use_localtime=YES　←　设置ftp显示时间为当地时间
pasv_addr_resolve=YES
pasv_address=shintoku-town.net
pasv_min_port=60000　←　PASV模式最小端口号
pasv_max_port=60030　←　PASV模式最大端口号
ssl_enable=YES　←　SSL有效
rsa_cert_file=/etc/ssl/private/vsftpd.pem　←　ssl证书
rsa_private_key_file=/etc/ssl/private/vsftpd.pem　←　ssl证书
force_local_logins_ssl=YES　←　强制SSL登录
force_local_data_ssl=YES　←　强制通过SSL进行文件传输

ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES

require_ssl_reuse=NO
ssl_ciphers=HIGH    ← 使支持 DES-CSC3-SHA
</pre>
<p>3.添加可超越自己目录的用户(这里为qiais)</p>
<pre class="brush: plain; title: ; notranslate"># echo qiais &gt;&gt; /etc/vsftpd/chroot_list</pre>
<p>4.禁止某些用户登录ftp服务器，这里禁止sai用户登录服务器</p>
<pre class="brush: plain; title: ; notranslate">echo sai &gt;&gt; /etc/vsftpd/ftpusers</pre>
<p>5.生成服务器证书</p>
<pre class="brush: plain; title: ; notranslate"> # mkdir /etc/ssl/private </pre>
<pre class="brush: plain; title: ; notranslate">
[root@centos certs]
# openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem　←　生成证书
umask 77 ; \
PEM1=`/bin/mktemp /tmp/openssl.XXXXXX` ; \
PEM2=`/bin/mktemp /tmp/openssl.XXXXXX` ; \
/usr/bin/openssl req -utf8 -newkey rsa:1024 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 -set_serial 0 ; \
cat $PEM1 &gt;  vsftpd.pem ; \
echo &quot;&quot;    &gt;&gt; vsftpd.pem ; \
cat $PEM2 &gt;&gt; vsftpd.pem ; \
rm -f $PEM1 $PEM2
Generating a 1024 bit RSA private key
.................................++++++
................................++++++
writing new private key to '/tmp/openssl.OH7090'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:CN　←　国家名
State or Province Name (full name) [Berkshire]:Shanghai　←　省市
Locality Name (eg, city) [Newbury]:Pudongxinqu　←　区
Organization Name (eg, company) [My Company Ltd]:Qiai　←　单位名称
Organizational Unit Name (eg, section) []:　←　空ENTER
Common Name (eg, your name or your server's hostname) []:ftp.qiais.com　←　主机名
Email Address []:user01@qiais.com
</pre>
<p>6. 连接测试<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; 从这开始为旧内容，不需要SSL的 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
 MAC电脑可以通过以下命令连接测试服务器</p>
<pre class="brush: plain; title: ; notranslate">
mac:~ sai$ ftp   ← 启动ftp
ftp&gt; open client.hanbai.jp    ← 连接ftp服务器
Connected to client.hanbai.jp.
220 Welcome to blah FTP service.
Name (client.hanbai.jp:sai): client  ←  用户名
331 Please specify the password.
Password:                            ← 密码
230 Login successful.                ← 成功登录  
Remote system type is UNIX.
Using binary mode to transfer files.
ftp&gt; 
</pre>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; 旧内容到此结束 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>为了测试SSL的连接，我们需要安装 <a href="https://filezilla-project.org/" target="_blank">FileZilla</a></p>
<p>设置连接信息如下：<br />
<a href="http://www.qiais.com/wp-content/uploads/2014/07/file.png"><img src="http://www.qiais.com/wp-content/uploads/2014/07/file-600x325.png" alt="file" width="600" height="325" class="alignnone size-medium wp-image-741" /></a></p>
<p>点击连接后会弹出证书确认窗口，点击OK就可以，</p>
<p>成功连接后的界面如下：<br />
<a href="http://www.qiais.com/wp-content/uploads/2014/07/file2.png"><img src="http://www.qiais.com/wp-content/uploads/2014/07/file2-600x410.png" alt="file2" width="600" height="410" class="alignnone size-medium wp-image-742" /></a></p>
<p>上面我们可以看到连接头部的ftpes://****@*****<br />
表明我们的通过SSL连接的FTP服务器连接成功！</p>
<p>7. 附注说明</p>
<p>   1)确保21端口开放</p>
<p>   2)500 OOPS: cannot change directory:/home/***   错误，基本是由于CentOS的安全保护程序Selinux的缘故，可以通过停止Selinux保护</p>
<pre class="brush: plain; title: ; notranslate"># setenforce 0</pre>
<p>或者直接修改配置文件，使seliunx无效</p>
<pre class="brush: plain; title: ; notranslate">
# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing　　　← 将 SELINUX=disabled 
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
</pre>
<p>如果不想停止selinux保护，也可以让sellinux允许ftp_home_dir</p>
<pre class="brush: plain; title: ; notranslate">
[root@test ~]# getenforce
Enforcing
[root@test ~]# getsebool -a | grep ftp
allow_ftpd_anon_write --&gt; off
allow_ftpd_full_access --&gt; off
allow_ftpd_use_cifs --&gt; off
allow_ftpd_use_nfs --&gt; off
ftp_home_dir --&gt; off
ftpd_connect_db --&gt; off
ftpd_use_passive_mode --&gt; off
httpd_enable_ftp_server --&gt; off
tftp_anon_write --&gt; off
[root@test ~]# setsebool -P ftp_home_dir on　　　← 通过 setsebool 命令，修改 ftp_home_dir 的 off 为 on
[root@test ~]# getsebool -a | grep ftp
allow_ftpd_anon_write --&gt; off
allow_ftpd_full_access --&gt; off
allow_ftpd_use_cifs --&gt; off
allow_ftpd_use_nfs --&gt; off
ftp_home_dir --&gt; on
ftpd_connect_db --&gt; off
ftpd_use_passive_mode --&gt; off
httpd_enable_ftp_serve
</pre>
<p>3) 只显示文件夹，没显示文件的情况<br />
  这种情况很有可能使Selinux保护的原因，我们可以先将Selinux停止再测试</p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/732/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
