﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-robbie-随笔分类-Linux</title><link>http://www.blogjava.net/robbie/category/31677.html</link><description /><language>zh-cn</language><lastBuildDate>Thu, 05 Apr 2012 01:49:54 GMT</lastBuildDate><pubDate>Thu, 05 Apr 2012 01:49:54 GMT</pubDate><ttl>60</ttl><item><title>Centos6.2安装Magento</title><link>http://www.blogjava.net/robbie/archive/2012/04/04/373322.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Wed, 04 Apr 2012 09:09:00 GMT</pubDate><guid>http://www.blogjava.net/robbie/archive/2012/04/04/373322.html</guid><wfw:comment>http://www.blogjava.net/robbie/comments/373322.html</wfw:comment><comments>http://www.blogjava.net/robbie/archive/2012/04/04/373322.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/robbie/comments/commentRss/373322.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/robbie/services/trackbacks/373322.html</trackback:ping><description><![CDATA[<div><strong>环境：</strong></div>
<div>&nbsp; &nbsp;&nbsp;</div>
<div>&nbsp; &nbsp; Centos6.2(安装在Vmware7.0中)</div>
<div>&nbsp; &nbsp; Magento1.6.2</div>
<div>&nbsp; &nbsp; Apache Httpd Server 2.2.15</div>
<div>&nbsp; &nbsp; MySql 5.1.61</div>
<div>&nbsp; &nbsp; PHP5.3.3<br /><br />
</div>
<div></div>
<div><strong>安装过程：</strong></div>
<div><br />
&nbsp; &nbsp; <strong>apache http、mysql、php及相关扩展安装：</strong></div>
<div>&nbsp; &nbsp; 其中apache http、Mysql、php都是利用centos的添加/删除软件功能进行安装。同时使用该功能安装"php-xml"、"php-gd"、"php-pdo"、"php-mbstring"、"php-mysql"扩展。</div>
<div></div>
<div>&nbsp; &nbsp; 使用chkconfig配置httpd和mysql为系统服务。命令如下：</div>
<div>&nbsp; &nbsp; chkconfig httpd on</div>
<div>&nbsp; &nbsp; chkconfig -add mysqld</div>
<div>&nbsp; &nbsp; chkconfig mysqld on</div>
<div>&nbsp; &nbsp; 使用chkconfig --list 可以查看所有的服务配置状态</div>
<div></div>
<div>&nbsp; &nbsp; 使用service httpd start、service mysqld start启动httpd和mysqld服务。可以通过service httpd restart重启相关服务。</div>
<div></div>
<div>&nbsp; &nbsp; 此时访问本机的http://localhost可以看到apache的欢迎界面，同时编辑index.php文件，其内容如下：</div>
<div>&nbsp; &nbsp; &lt;?php</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; phpinfo();</div>
<div>&nbsp; &nbsp; ?&gt;</div>
<div>&nbsp; &nbsp; 并将该文件置于/var/www/html目录下，访问http://localhost/index.php，此时应该不能看到php版本信息，仅能看到index.php的静态文本内容。</div>
<div></div>
<div>&nbsp; &nbsp; 修改/etc/httpd/conf/httpd.conf文件，修改如下：</div>
<div>&nbsp; &nbsp; DirectoryIndex index.html index.html.var -&gt; &nbsp;DirectoryIndex index.html index.htm index.php</div>
<div>&nbsp; &nbsp; 增加：</div>
<div>&nbsp; &nbsp; AddType application/x-httpd-php .php</div>
<div>&nbsp; &nbsp; AddDefaultCharset -&gt; AddDefaultCharset off &nbsp;(解决中文乱码问题)</div>
<div></div>
<div>&nbsp; &nbsp; 增加一段VirtualHost描述，如下（在配置文件的最后）：</div>
<div>&nbsp; &nbsp; &lt;VirtualHost *:80&gt;</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; DocumentRoot /var/www/smallfive</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; ServerName smallfive</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; ServerAlias smallfive.com *.smallfive.com</div>
<div>&nbsp; &nbsp; &lt;/VirtualHost&gt;</div>
<div></div>
<div>&nbsp; &nbsp; 此时访问http://localhost/index.php，应该一切正常<br /><br />
</div>
<div></div>
<div>&nbsp; &nbsp; <strong>设置数据库：</strong></div>
<div>&nbsp; &nbsp; 使用mysqladmin -u root password 'newpassword'设置mysql数据库的默认密码</div>
<div></div>
<div>&nbsp; &nbsp; 让数据库更安全：</div>
<div>&nbsp; &nbsp; mysql -u root -p &nbsp; &nbsp;进入mysql</div>
<div>&nbsp; &nbsp; mysql&gt; DROP DATABASE test; 　　　　　　　　　　　　　　 删除test数据库</div>
<div>&nbsp; &nbsp; mysql&gt; DELETE FROM mysql.user WHERE user = ''; 　　　 &nbsp; 删除匿名帐户</div>
<div>&nbsp; &nbsp; mysql&gt; FLUSH PRIVILEGES; 　　　　　　　　　　　　　　　 重载权限</div>
<div></div>
<div>&nbsp; &nbsp; 创建magento数据库</div>
<div>&nbsp; &nbsp; mysql&gt; CR&nbsp;&nbsp; 访问magento数据库，确保一切正常</div><div><br /><strong>&nbsp; &nbsp; 配置Magento：</strong></div><div>&nbsp; &nbsp; 解压缩magento1.6.2版本至/var/www/smallfive/magento目录</div><div>&nbsp; &nbsp; 解压命令：</div><div>&nbsp; &nbsp;EATE DATABASE magento;</div>
<div>&nbsp; &nbsp; mysql&gt; GRANT ALL PRIVILEGES ON magento.* TO 'root'@'localhost' IDENTIFIED BY 'newpassword';&nbsp;</div>
<div></div>
<div>&nbsp;&nbsp;tar zxvf magento1.6.2.tar.gz</div>
<div></div>
<div>&nbsp; &nbsp; 此时访问http://localhost/magento，可根据magento的设置进行配置<br />
</div>
<div></div>
<div>&nbsp; &nbsp; <br /><strong>&nbsp; &nbsp; 注意如下问题：</strong></div>
<div>&nbsp; &nbsp; 1、确保当前用户拥有对/var/www/smallfive/magento可读可写权限</div>
<div>&nbsp; &nbsp; 2、还需安装mcrypt库，安装这个库比较繁琐，mcrypt依赖于Libmcrypt库和mhash库，我们需要下载Libmcrypt库和mhash库安装它们，然后再编译Mcrypt。</div>
<div>&nbsp; &nbsp; 在编译之前，先做好如下准备工作：</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; a、安装phpize：yum -y install php-devel</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; b、安装C++脚本编译模块：</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yum -y install gcc gcc-g++</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yum -y install gcc gcc-c++</div>
<div>&nbsp; &nbsp; 安装mcrypt库过程，如下：</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; a、下载libmcrypt和mhash库</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Libmcrypt：http://sourceforge.net/project/showfiles.php?group_id=87941&amp;package_id=91774&amp;release_id=487459</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mhash：http://sourceforge.net/project/showfiles.php?group_id=4286&amp;package_id=4300&amp;release_id=645636</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; b、将上述两个下载后，分别解压，并执行如下命令编译：</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ./configure</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; make &amp;&amp; make install</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; c、下载php对应的源代码，解压，</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 进入php源代码的 /ext/mcrypt目录</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 执行phpize命令</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ./configure &#8211;with-php-config=/usr/bin/php-config</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; make &amp;&amp; make install</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; d、在php.ini文件中增加如下内容：</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; extension=/usr/lib/php/modules/mcrypt.so</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mcrypt.so文件路径在php-config文件中可以找到</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; e、service httpd restart<br />
</div>
<div></div>
<div>&nbsp; &nbsp; <br />&nbsp; &nbsp; end!<br />
</div>
<div></div>
<div>&nbsp; &nbsp; &nbsp;<br /><strong>&nbsp; &nbsp; 参考文章：</strong></div>
<div>&nbsp; &nbsp; http://www.eexu.com/article.asp?id=1730</div>
<div>&nbsp; &nbsp; http://www.ruiwant.com/centos-6-0%E4%B8%8Bmagento%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E6%80%BB%E7%BB%93.html</div>
<div>&nbsp; &nbsp; http://zixun.www.net.cn/qita/2344.html</div>
<div>&nbsp; &nbsp; http://os.qudong.com/Linux/2010/0210/64441.html</div>
<div></div>
<div></div>
<div></div><img src ="http://www.blogjava.net/robbie/aggbug/373322.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/robbie/" target="_blank">The Matrix</a> 2012-04-04 17:09 <a href="http://www.blogjava.net/robbie/archive/2012/04/04/373322.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Linux下Tomcat增加远程调试端口</title><link>http://www.blogjava.net/robbie/archive/2008/05/22/202195.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Thu, 22 May 2008 08:13:00 GMT</pubDate><guid>http://www.blogjava.net/robbie/archive/2008/05/22/202195.html</guid><wfw:comment>http://www.blogjava.net/robbie/comments/202195.html</wfw:comment><comments>http://www.blogjava.net/robbie/archive/2008/05/22/202195.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/robbie/comments/commentRss/202195.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/robbie/services/trackbacks/202195.html</trackback:ping><description><![CDATA[在startup.sh开始处中增加如下内容：<br />
<br />
declare -x CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8788"<br />
<br />
然后启动Tomcat即可。<br />
<br />
windows下是增加如下内容：<br />
SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8788<br />
<br />
<br />
<img src ="http://www.blogjava.net/robbie/aggbug/202195.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/robbie/" target="_blank">The Matrix</a> 2008-05-22 16:13 <a href="http://www.blogjava.net/robbie/archive/2008/05/22/202195.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ferora Linux 9中文输入法安装</title><link>http://www.blogjava.net/robbie/archive/2008/05/21/201886.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Wed, 21 May 2008 05:24:00 GMT</pubDate><guid>http://www.blogjava.net/robbie/archive/2008/05/21/201886.html</guid><wfw:comment>http://www.blogjava.net/robbie/comments/201886.html</wfw:comment><comments>http://www.blogjava.net/robbie/archive/2008/05/21/201886.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/robbie/comments/commentRss/201886.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/robbie/services/trackbacks/201886.html</trackback:ping><description><![CDATA[在终端中切换到root用户，然后执行如下命令：<br />
yum install scim scim-lang-chinese scim-pinyin -y<br />
<br />
安装完成后，注销再登录系统即可。<br />
<img src ="http://www.blogjava.net/robbie/aggbug/201886.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/robbie/" target="_blank">The Matrix</a> 2008-05-21 13:24 <a href="http://www.blogjava.net/robbie/archive/2008/05/21/201886.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>