<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="canonical" href="http://blog.csdn.net/hegeng84/article/details/51912734"/> | |
<script type="text/javascript"> | |
var username = "hegeng84"; | |
var _blogger = username; | |
var blog_address = "http://blog.csdn.net/hegeng84"; | |
var static_host = "http://static.blog.csdn.net/"; | |
var currentUserName = "qq_18286859"; | |
var fileName = '51912734'; | |
var commentscount = 0; | |
var islock = false | |
window.quickReplyflag = true; | |
var totalFloor = 0; | |
var isBole = false; | |
var isDigg = false; | |
var isExpert=false; | |
</script> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<script src="http://c.csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js" type="text/javascript"></script> | |
<link rel="stylesheet" href="http://c.csdnimg.cn/public/common/libs/bootstrap/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="http://c.csdnimg.cn/public/static/css/avatar.css"> | |
<link type="text/css" rel="stylesheet" href="http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/default.css" /> | |
<link rel="stylesheet" href="http://static.blog.csdn.net/Skin/skin3-template/css/style.css?v=2017.042"> | |
<link rel="stylesheet" href="http://c.csdnimg.cn/public/common/toolbar/content_toolbar_css/content_toolbar.css?v=v5.00.37"> | |
<script type="text/javascript" src="http://static.blog.csdn.net/Skin/skin3-template/fonts/iconfont.js"></script> | |
<script src="http://csdnimg.cn/rabbit/exposure-click/main.js?v1.15.23"></script> | |
<script type="text/javascript" src="http://c.csdnimg.cn/pubfooter/js/tracking_for_recommend.js?v=0911" charset="utf-8"></script> | |
<script type="text/javascript" src="http://csdnimg.cn/pubfooter/js/tracking.js" charset="utf-8"></script> | |
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/cnick.js" charset="utf-8"></script> | |
<link rel="stylesheet" href="http://static.blog.csdn.net/code/prettify.css" /> | |
<script type="text/javascript" src="http://static.blog.csdn.net/code/prettify.js"></script> | |
<script src="http://dup.baidustatic.com/js/ds.js"></script> | |
<script type="text/javascript"> | |
// Traffic Stats of the entire Web site By baidu | |
var _hmt = _hmt || []; | |
(function() { | |
var hm = document.createElement("script"); | |
hm.src = "https://hm.baidu.com/hm.js?6bcd52f51e9b3dce32bec4a3997715ac"; | |
var s = document.getElementsByTagName("script")[0]; | |
s.parentNode.insertBefore(hm, s); | |
})(); | |
// Traffic Stats of the entire Web site By baidu end | |
</script> | |
<meta name="description" content="centos7 的LNMP环境搭建" /> | |
<meta name="keywords" content="Linux,nginx" /> | |
<meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" /> | |
<meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848"> | |
<script src="http://static.blog.csdn.net/public/switchHome/switchHome.js?v=2017.043"></script> | |
<!-- adhoc sdk --> | |
<script src=https://sdk.appadhoc.com/ab.plus.js></script> | |
<script> | |
adhoc('init', { | |
appKey: 'ADHOC_0e0bce4f-8793-4f68-89cf-34c14f2532bb', | |
defaultFlags: {isLogin: true} | |
}) | |
</script> | |
<!-- adhoc sdk end --> | |
<title>CentOS7 LNMP环境搭建 - CSDN博客</title> | |
</head> | |
<body> | |
<script id="toolbar-tpl-scriptId" prod="download" skin="black" src="http://c.csdnimg.cn/public/common/toolbar/js/content_toolbar.js?v=v5.00.37" type="text/javascript" domain="http://blog.csdn.net/"></script> | |
<div class="container clearfix"> | |
<main> | |
<article> | |
<h1 class="csdn_top">CentOS7 LNMP环境搭建</h1> | |
<div class="article_bar clearfix"> | |
<div class="artical_tag"> | |
<span class="original"> | |
转载 </span> | |
<span class="time">2016年07月14日 20:45:47</span> | |
</div> | |
<ul class="article_tags clearfix csdn-tracking-statistics" data-mod="popu_377"> | |
<li class="tit">标签:</li> | |
<!-- [startarticletags]--> | |
<li><a href="http://so.csdn.net/so/search/s.do?q=Linux&t=blog" target="_blank">Linux</a> <span>/</span></li> | |
<li><a href="http://so.csdn.net/so/search/s.do?q=nginx&t=blog" target="_blank">nginx</a> <span>/</span></li> | |
<li><a href="http://so.csdn.net/so/search/s.do?q=mysql&t=blog" target="_blank">mysql</a> <span>/</span></li> | |
<li><a href="http://so.csdn.net/so/search/s.do?q=php&t=blog" target="_blank">php</a> <span>/</span></li> | |
<!-- [endarticletags]--> | |
</ul> | |
<ul class="right_bar"> | |
<li><button class="btn-noborder"><i class="icon iconfont icon-read"></i><span class="txt">309</span></button></li> | |
<!-- <li><button class="btn-noborder but-comment-topicon"><i class="icon iconfont icon-pinglun"></i><span class="txt">--><!--</span></button></li>--> | |
<!-- <li><button class="btn-noborder btn-like"><i class="icon iconfont icon-xihuan-"></i><span class="txt">--><!--</span></button></li>--> | |
<li class="edit"> | |
<a class="btn-noborder" href="" > | |
<i class="icon iconfont icon-bianji"></i><span class="txt">编辑</span> | |
</a> | |
</li> | |
<li class="del"> | |
<a class="btn-noborder" onclick="javascript:deleteArticle(fileName);return false;"> | |
<i class="icon iconfont icon-shanchu"></i><span class="txt">删除</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
<div id="article_content" class="article_content csdn-tracking-statistics" data-mod="popu_519" data-dsm="post"> | |
<p>本文中参照了部分网络上的内容,由本人实践,并修正了很多问题和centos7的命令</p> | |
<p><br> | |
</p> | |
<p>1:查看环境:</p> | |
<pre name="code" class="plain">[root@iZ28ht3hvtpZ project]# cat /etc/redhat-release | |
CentOS Linux release 7.0.1406 (Core) | |
</pre>2:配置CentOS 7.0 第三方yum源(CentOS默认的标准源里没有nginx软件包)<pre name="code" class="plain"># wget http://www.atomicorp.com/installers/atomic | |
# sh ./atomic | |
# yum check-update | |
</pre>3:安装开发包和库文件<pre name="code" class="plain"># yum -y install ntp make openssl openssl-devel pcre pcre-devel libpng | |
# yum -y install libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel zlib zlib-devel | |
# yum -y install gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 | |
# yum -y install libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel | |
</pre>4:安装nginx<pre name="code" class="plain"># yum install nginx | |
# systemctl start nginx.service | |
</pre>5:安装mysql<pre name="code" class="plain"># wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm | |
# sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm | |
# sudo yum install mysql-server | |
# mysql -u root | |
登录时有可能报这样的错:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2),原因是/var/lib/mysql的访问权限问题。下面的命令把/var/lib/mysql的拥有者改为当前用户: | |
# sudo chown -R openscanner:openscanner /var/lib/mysql | |
mysql>use mysql; | |
mysql>update mysql.user set password = PASSWORD('123456') where user='root'; | |
#创建业务数据库 例如:www | |
mysql>CREATE DATABASE www; | |
#创建XXXX用户与密码(123456)并设置为从安装mysql服务的机器本地访问 | |
mysql > grant all on www.* to 'XXXX'@'localhost' identified by '123456'; | |
#设置openscanner用户与密码,并从任何机器都可以访问mysql | |
mysql > grant all on www.* to 'XXXX'@'%' identified by '123456'; | |
mysql > exit; | |
</pre>6:安装php<pre name="code" class="plain"># yum install php lighttpd-fastcgi php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap | |
//安装php和所需组件使PHP支持MySQL、FastCGI模式 | |
#yum install php-tidy php-common php-devel php-fpm php-mysql | |
# systemctl restart php-fpm.service | |
</pre>7:配置nginx支持php<pre name="code" class="plain"># mv /etc/nginx/nginx.conf /etc/nginx/nginx.confbak | |
//将配置文件改为备份文件 | |
# cp /etc/nginx/nginx.conf.default /etc/nginx/nginx.conf | |
//由于原配置文件要自己去写因此可以使用默认的配置文件作为配置文件 | |
//修改nginx配置文件,添加fastcgi支持 | |
//root设定为本地业务代码路径 | |
user guest; | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
gzip on; | |
server { | |
listen 80; | |
server_name localhost; | |
root /usr/local/src/project; | |
charset utf-8; | |
#access_log logs/host.access.log main; | |
location / { | |
index index.php; | |
if ( !-f $request_filename ){ | |
rewrite ^/(.+)$ /index.php?$1& last; | |
} | |
} | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} | |
} | |
</pre>8:配置php//编辑文件php.ini,在文件末尾添加cgi.fix_pathinfo = 1<pre name="code" class="plain"># vi /etc/php.ini | |
</pre>9:重启nginx | |
php-fpm<pre name="code" class="plain"># systemctl restart nginx.service | |
# systemctl restart php-fpm.service | |
</pre>10:建立info.php文件<pre name="code" class="plain"># vi /usr/local/src/project/info.php | |
<?php | |
phpinfo(); | |
?> | |
</pre> | |
<p>11:测试nginx是否解析php (外网IP:192.168.1.105)</p> | |
<p>本地浏览器输入:192.168.1.105/info.php</p> | |
<p>显示php界面 环境搭建成功</p> | |
<pre></pre> | |
</div> | |
</article> | |
<div class="readall_box csdn-tracking-statistics" data-mod="popu_376"> | |
<div class="read_more_mask"></div> | |
<a class="btn btn-large btn-gray-fred read_more_btn" target="_self">阅读全文</a> | |
</div> | |
<div class="article_copyright"> | |
</div> | |
<ul class="article_collect clearfix csdn-tracking-statistics" data-mod="popu_378"> | |
<li class="tit">本文已收录于以下专栏:</li> | |
<!-- [startarticlecolumns]--> | |
<!-- [endarticlecolumns]--> | |
</ul> | |
<div class="comment_box clearfix"> | |
<div id="comment_form"> | |
<div id="commentsbmitarear"> | |
<div class="comment_area clearfix"> | |
<div class="userimg"> | |
<a href="http://my.csdn.net/qq_18286859"> | |
<img src="http://avatar.csdn.net/9/B/5/3_qq_18286859.jpg"> | |
</a> | |
</div> | |
<form action="http://blog.csdn.net/hegeng84/comment/submit?id=51912734" method="post" onsubmit="return subform(this);" id="commentform"> | |
<textarea class="comment_content" name="comment_content" id="comment_content" placeholder="发表你的评论"></textarea> | |
<div class="bot_bar clearfix"> | |
<div id="ubbtools" class="add_code"> | |
<a href="#insertcode" code="code" target="_self"><i class="icon iconfont icon-daima"></i></a> | |
</div> | |
<input type="hidden" id="comment_replyId" name="comment_replyId"> | |
<input type="hidden" id="comment_userId" name="comment_userId" value=""> | |
<input type="hidden" id="commentId" name="commentId" value=""> | |
<input type="submit" class="btn btn-redborder" value="发表评论"> | |
<span id="tip_comment" class="tip"> | |
<div style="display: none;" class="csdn-tracking-statistics" data-mod="popu_384"><a href="#" target="_blank" class="comment_area_btn">发表评论</a></div> | |
<div id="lang_list" code="code"> | |
<a href="#html" style="width:95px;" class="long_name" target="_self">HTML/XML</a> | |
<a href="#objc" style="width:95px;" class="long_name" target="_self">objective-c</a> | |
<a href="#delphi" style="width:58px;" class="zhong_name" target="_self">Delphi</a> | |
<a href="#ruby" class="zhong_name" target="_self">Ruby</a> | |
<a href="#php" target="_self">PHP</a> | |
<a href="#csharp" class="duan_name" target="_self">C#</a> | |
<a style=" border-right: none;" href="#cpp" class="duan_name" target="_self">C++</a> | |
<a style=" border-bottom:none;width:95px;" href="#javascript" class="long_name" target="_self">JavaScript</a> | |
<a style=" border-bottom:none;width:95px;" href="#vb" class="long_name" target="_self">Visual Basic</a> | |
<a style=" border-bottom:none;" href="#python" class="zhong_name" target="_self">Python</a> | |
<a style=" border-bottom:none;" href="#java" class="zhong_name" target="_self">Java</a> | |
<a style="border-bottom:none;" href="#css" class="duan_name" target="_self">CSS</a> | |
<a style="border-bottom:none;" href="#sql" class="duan_name" target="_self">SQL</a> | |
<a style="border:none; " href="#plain" class="duan_name" target="_self">其它</a> | |
<span class="arrb"></span> | |
</div> | |
</div> | |
</form> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="comment_li_outbox"> | |
<div id="comment_list"></div> | |
</div> | |
<div class="more_comment"> | |
<div id="comment_bar" class="trackgin-ad" data-mod="popu_385"></div> | |
</div> | |
<h3 class="recommend_tit">相关文章推荐</h3> | |
<div class="recommend_list clearfix"> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/anan890624/article/details/72795069" target="_blank" strategy="BlogCommendFromBaidu_0">CentOS7快速搭建LNMP环境</a></h2> | |
<div class="summary"> | |
我发布到简书的连接 | |
CentOS7快速搭建LNMP环境 </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/anan890624" target="_blank" strategy="BlogCommendFromBaidu_0"><img src="http://avatar.csdn.net/2/C/0/3_anan890624.jpg" alt="anan890624" title="anan890624"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/anan890624">anan890624</a></li> | |
<li class="time">2017年05月28日 22:12</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>1927</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/starrykey/article/details/51693294" target="_blank" strategy="BlogCommendFromBaidu_1">CentOS7之搭建lnmp环境</a></h2> | |
<div class="summary"> | |
CentOS7之搭建lnmp环境 | |
安装lnmp环境 </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/starrykey" target="_blank" strategy="BlogCommendFromBaidu_1"><img src="http://avatar.csdn.net/5/B/1/3_starrykey.jpg" alt="starrykey" title="starrykey"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/starrykey">starrykey</a></li> | |
<li class="time">2016年06月16日 17:14</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>3009</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<script> | |
(function() { | |
var s = "_" + Math.random().toString(36).slice(2); | |
document.write('<div id="' + s + '"></div>'); | |
(window.slotbydup=window.slotbydup || []).push({ | |
id: '4765209', | |
container: s, | |
size: '808,120', | |
display: 'inlay-fix' | |
}); | |
})(); | |
</script> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/sturdygrass/article/details/51750108" target="_blank" strategy="BlogCommendFromBaidu_2">LNMP环境搭建(CentOS7+Nginx1.10.1+MySQL5.6.31+PHP5.6.22)</a></h2> | |
<div class="summary"> | |
零、准备工作 | |
安装wget:yum install wget -y | |
安装gcc及g++:yum install gcc gcc-c++ -y | |
后续所有源代码都下载到/usr/local/src目录 | |
防... </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/sturdygrass" target="_blank" strategy="BlogCommendFromBaidu_2"><img src="http://avatar.csdn.net/E/C/3/3_sturdygrass.jpg" alt="sturdygrass" title="sturdygrass"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/sturdygrass">sturdygrass</a></li> | |
<li class="time">2016年06月24日 15:31</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>3063</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/csdn_yasin/article/details/52655268" target="_blank" strategy="BlogCommendFromBaidu_3">Linux_CentOS7_lnmp环境搭建过程记录</a></h2> | |
<div class="summary"> | |
1. ifconfig命令不存在yum –y install net-tools2. 解决killall命令不存在yum install psmisc3. 安装gcc*yum –y install g... </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/csdn_yasin" target="_blank" strategy="BlogCommendFromBaidu_3"><img src="http://avatar.csdn.net/C/E/3/3_csdn_yasin.jpg" alt="csdn_yasin" title="csdn_yasin"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/csdn_yasin">csdn_yasin</a></li> | |
<li class="time">2016年09月25日 00:26</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>1731</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/sinat_21125451/article/details/50789953" target="_blank" strategy="BlogCommendFromBaidu_4">vmware的centos7下搭建lnmp环境(新手)</a></h2> | |
<div class="summary"> | |
学习了大概1周的Linux了,今天准备上网查一个搭建lnmp的教程在自己的虚拟机上搭建环境。 | |
1.安装mysql | |
1.直接执行 | |
[root@localhost ~]# yum install mar... </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/sinat_21125451" target="_blank" strategy="BlogCommendFromBaidu_4"><img src="http://avatar.csdn.net/E/6/A/3_sinat_21125451.jpg" alt="sinat_21125451" title="sinat_21125451"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/sinat_21125451">sinat_21125451</a></li> | |
<li class="time">2016年03月03日 18:07</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>1956</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<!-- 广告位:PC端-博客详情通栏7(feed流)-808*120 --> | |
<script> | |
(function() { | |
var s = "_" + Math.random().toString(36).slice(2); | |
document.write('<div id="' + s + '"></div>'); | |
(window.slotbydup=window.slotbydup || []).push({ | |
id: '4983339', | |
container: s, | |
size: '808,120', | |
display: 'inlay-fix' | |
}); | |
})(); | |
</script> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/u014359108/article/details/52595728" target="_blank" strategy="BlogCommendFromBaidu_5">centos7搭建lnmp环境</a></h2> | |
<div class="summary"> | |
安装PHP(5.6.26)先下载PHP源文件wget http://cn2.php.net/distributions/php-5.6.26.tar.gz解压:tar -zxvf php-5.6.26... </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/u014359108" target="_blank" strategy="BlogCommendFromBaidu_5"><img src="http://avatar.csdn.net/3/C/A/3_u014359108.jpg" alt="u014359108" title="u014359108"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/u014359108">u014359108</a></li> | |
<li class="time">2016年09月20日 15:31</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>2230</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/wszll_Alex/article/details/76285324" target="_blank" strategy="BlogCommendFromBaidu_6">Centos 7.3搭建LNMP环境</a></h2> | |
<div class="summary"> | |
需求:在Centos7.3下搭建LNMP环境 | |
1. 关闭防火墙和selinux打开文件selinuxvim /etc/sysconfig/selinux将文件中SELINUX=enforcing改为... </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/wszll_Alex" target="_blank" strategy="BlogCommendFromBaidu_6"><img src="http://avatar.csdn.net/9/4/2/3_wszll_alex.jpg" alt="wszll_Alex" title="wszll_Alex"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/wszll_Alex">wszll_Alex</a></li> | |
<li class="time">2017年07月28日 23:18</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>1032</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/smm188/article/details/75507025" target="_blank" strategy="BlogCommendFromCF_7">centos7下lamp环境搭建</a></h2> | |
<div class="summary"> | |
一,Apache:1,安装apache:yum -y install httpd | |
2,启动apache:systemctl start httpd.service | |
3,设置开机启动:systemc... </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/smm188" target="_blank" strategy="BlogCommendFromCF_7"><img src="http://avatar.csdn.net/8/F/2/3_smm188.jpg" alt="smm188" title="smm188"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/smm188">smm188</a></li> | |
<li class="time">2017年07月20日 12:30</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>230</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/fjnjxr/article/details/52839644" target="_blank" strategy="BlogCommendFromCF_8">centos7 安装lnmp教程</a></h2> | |
<div class="summary"> | |
此教程默认已经安装好Centos7并有网络连接,作者使用xshell连接。 | |
一、配置CentO S第三方yum源 (CentOS默认的标准源里没有nginx软件包) | |
wget http://www... </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/fjnjxr" target="_blank" strategy="BlogCommendFromCF_8"><img src="http://avatar.csdn.net/1/2/B/3_fjnjxr.jpg" alt="fjnjxr" title="fjnjxr"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/fjnjxr">fjnjxr</a></li> | |
<li class="time">2016年10月17日 18:02</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>191</span></li> | |
</ul> | |
</dd> | |
</dl> | |
<dl class="clearfix csdn-tracking-statistics" data-mod="popu_387" data-poputype="feed" data-feed-show="false" data-dsm="post"> | |
<dd> | |
<h2><a href="http://blog.csdn.net/ldx904202509/article/details/64441832" target="_blank" strategy="BlogCommendFromCsdn_9">CentOS 7 LNMP环境搭建Zabbix3.0</a></h2> | |
<div class="summary"> | |
概述:在CentOS 7 64位操作系统环境下搭建LNMP(Linux+Nginx+MySQL+PHP)来运行Zabbix监控程序 | |
预先安装: | |
yum install -y auto... </div> | |
<ul> | |
<li class="avatar_img"><a href="http://blog.csdn.net/ldx904202509" target="_blank" strategy="BlogCommendFromCsdn_9"><img src="http://avatar.csdn.net/3/4/6/3_ldx904202509.jpg" alt="ldx904202509" title="ldx904202509"></a></li> | |
<li class="user_name"><a href="http://blog.csdn.net/ldx904202509">ldx904202509</a></li> | |
<li class="time">2017年03月21日 14:58</li> | |
<li class="visited_num"><i class="icon iconfont icon-read"></i><span>230</span></li> | |
</ul> | |
</dd> | |
</dl> | |
</div> | |
</main> | |
<aside> | |
<div class="right_box user_info"> | |
<dl class="inf_bar clearfix"> | |
<dt class="csdn-tracking-statistics" data-mod="popu_381"> | |
<a href="http://blog.csdn.net/hegeng84" target="_blank"> | |
<img src="http://avatar.csdn.net/2/F/0/3_hegeng84.jpg" class="avatar_pic"> | |
</a> | |
<span class="medals" title=""> | |
</span> | |
</dt> | |
<dd> | |
<h3 class="csdn-tracking-statistics" data-mod="popu_380"><a href="http://blog.csdn.net/hegeng84" target="_blank" id="uid">hegeng84</a></h3> | |
<span class="csdn-tracking-statistics" data-mod="popu_379"><a class="btn btn-redborder-small " id="span_add_follow" target="_self">+关注</a></span> | |
</dd> | |
</dl> | |
<div class="inf_number_box clearfix"> | |
<dl> | |
<dt>原创</dt> | |
<dd>4</dd> | |
</dl> | |
<dl> | |
<dt>粉丝</dt> | |
<dd id='fan'>0</dd> | |
</dl> | |
<dl> | |
<dt>喜欢</dt> | |
<dd>0</dd> | |
</dl> | |
<dl> | |
<dt>码云</dt> | |
<dd> </dd> | |
</dl> | |
</div> | |
<div class="writings"> | |
<div class="public_signal clearfix"> | |
<h3>他的最新文章</h3> | |
<a href="http://blog.csdn.net/hegeng84" target="_blank" class="more"><span>更多文章</span></a> | |
</div> | |
<ul class="inf_list clearfix csdn-tracking-statistics" data-mod="popu_382"> | |
<li class="clearfix"> | |
<a href="http://blog.csdn.net/xys_777/article/details/50681345" target="_blank">找质数算法(Sieve of Eratosthenes筛法)</a> | |
</li> | |
<li class="clearfix"> | |
<a href="http://blog.csdn.net/xys_777/article/details/42555309" target="_blank">selenium commands</a> | |
</li> | |
<li class="clearfix"> | |
<a href="http://blog.csdn.net/xys_777/article/details/42496725" target="_blank">mongodb & mongoose 常用操作</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<div class="extension_other csdn-tracking-statistics" data-mod="popu_389"> | |
<!--u3032528--> | |
<div class="flashrecommend"> | |
<script type="text/javascript" src="http://mpb1.iteye.com/bwocoltlyzdec.js"></script> | |
</div> | |
</div> | |
<!-- [StartShowSelfColumn]--> | |
<!-- [EndShowSelfColumn]--> | |
<div class="fixRight"> | |
<div class="right_box padb0 csdn-tracking-statistics" data-mod="popu_391"> | |
<h3 class="tit"><span><em>在线课程</em></span></h3> | |
<ul class="edu_li clearfix"> | |
<!-- [starteducourses]--> | |
<li> | |
<div> | |
<a href="http://edu.csdn.net/huiyiCourse/detail/603?utm_source=blog7" target="_blank"> | |
<img src="http://img.bss.csdn.net/201711101450316277.png" alt="MVVM在美团点评酒旅移动端的最佳实践" | |
title="MVVM在美团点评酒旅移动端的最佳实践"> | |
</a> | |
</div> | |
<div> | |
<p><a href="http://edu.csdn.net/huiyiCourse/detail/603?utm_source=blog7" | |
target="_blank">MVVM在美团点评酒旅移动端的最佳实践</a></p> | |
<p>讲师:王禹华</p> | |
</div> | |
</li> | |
<li> | |
<div> | |
<a href="http://edu.csdn.net/huiyiCourse/detail/594?utm_source=blog7" target="_blank"> | |
<img src="http://img.bss.csdn.net/201711101448389242.png" alt="C语言大型软件设计的面向对象" | |
title="C语言大型软件设计的面向对象"> | |
</a> | |
</div> | |
<div> | |
<p><a href="http://edu.csdn.net/huiyiCourse/detail/594?utm_source=blog7" | |
target="_blank">C语言大型软件设计的面向对象</a></p> | |
<p>讲师:宋宝华</p> | |
</div> | |
</li> | |
<!-- [endeducourses]--> | |
</ul> | |
</div> | |
<div class="extension_other csdn-tracking-statistics bottomRcom" data-mod="popu_389" style="position:absolute;z-index:-5;opacity:0;pointer-events:none"> | |
<!--u3032528--> | |
<div class="flashrecommend"> | |
<!-- 请置于所有广告位代码之前 --> | |
<script src="http://dup.baidustatic.com/js/dm.js"></script> | |
<!-- 广告位:PC端-博客详情页右侧视窗1(feed流)-300*250 --> | |
<script> | |
(function() { | |
var s = "_" + Math.random().toString(36).slice(2); | |
document.write('<div id="' + s + '"></div>'); | |
(window.slotbydup=window.slotbydup || []).push({ | |
id: '4770930', | |
container: s, | |
size: '300,250', | |
display: 'inlay-fix' | |
}); | |
})(); | |
</script> | |
</div> | |
</div> | |
</div> | |
<div class="user-hotArticle"> | |
<h3>热门文章</h3> | |
<ul class="hotArticle-list csdn-tracking-statistics" data-mod="popu_521"> | |
<!-- [StartHotArticles]--> | |
<li> | |
<a href="http://blog.csdn.net/hegeng84/article/details/5672481">CentOS7 默认防火墙firewalld替换为iptables</a> | |
<div class="read list-left"><i class="icon iconfont icon-read"></i><span>1003</span></div> | |
</li> | |
<li> | |
<a href="http://blog.csdn.net/hegeng84/article/details/5672481">CentOS7 LNMP环境搭建</a> | |
<div class="read list-left"><i class="icon iconfont icon-read"></i><span>303</span></div> | |
</li> | |
<li> | |
<a href="http://blog.csdn.net/hegeng84/article/details/5672481">php数组指针学习笔记(一)</a> | |
<div class="read list-left"><i class="icon iconfont icon-read"></i><span>185</span></div> | |
</li> | |
<li> | |
<a href="http://blog.csdn.net/hegeng84/article/details/5672481">php安装redis扩展</a> | |
<div class="read list-left"><i class="icon iconfont icon-read"></i><span>154</span></div> | |
</li> | |
<li> | |
<a href="http://blog.csdn.net/hegeng84/article/details/5672481">挂载swap,解决内存不足的编译错误</a> | |
<div class="read list-left"><i class="icon iconfont icon-read"></i><span>103</span></div> | |
</li> | |
<!-- [EndHotArticles]--> | |
</ul> | |
</div> | |
<!-- [startcustom]--> | |
<!-- [endcustom]--> | |
</aside></div> | |
<div class="left_fixed"> | |
<div class="left_show_button"> | |
<span> | |
<i class="icon iconfont icon-youjiantou"></i> | |
</span> | |
</div> | |
<ul class="left_menu"> | |
<li> | |
<button class="left-fixed-btn btn-like csdn-tracking-statistics" data-mod="popu_373" target="_self"> | |
<span class="iconbox border_red"><i class="icon iconfont icon-dianzan"></i></span> | |
<span class="txt">0</span> | |
</button> | |
</li> | |
<li id="blog_artical_directory"> | |
<button class="left-fixed-btn left_menu_btn csdn-tracking-statistics" data-mod="popu_372" target="_self"> | |
<span class="iconbox border_black"><i class="icon iconfont icon-mulu"></i></span> | |
</button> | |
</li> | |
<li class="menu_con"> | |
<div class="list_father"> | |
<div class="arr_box"> | |
<button class="btn-noborder arr-btn scroll-down left_scroll_down"><i class="icon iconfont icon-xiajiantou"></i></button> | |
<button class="btn-noborder arr-btn scroll-up left_scroll_top"><i class="icon iconfont icon-shangjiantou"></i></button> | |
</div> | |
<div class="arr"></div> | |
<div id="csdnBlogDir"></div> | |
</div> | |
</li> | |
<!-- <li>--> | |
<!-- <button class="left-fixed-btn btn-like tracking-ad" data-mod="popu_373" target="_self">--> | |
<!-- <span class="iconbox border_red"><i class="icon iconfont icon-xihuan-"></i></span>--> | |
<!-- <span class="txt">喜欢</span>--> | |
<!-- <span class="untxt">取消喜欢</span>--> | |
<!-- </button>--> | |
<!-- </li>--> | |
<li> | |
<button class="left-fixed-btn csdn-tracking-statistics" data-mod="popu_374" id="com-quick-collect" target="_self"> | |
<span class="iconbox border_purple"><i class="icon iconfont icon-shoucang"></i></span> | |
</button> | |
</li> | |
<li> | |
<button class="left-fixed-btn btn-pinglun" > | |
<span class="iconbox border_purple"><i class="icon iconfont icon-pinglun"></i></span> | |
</button> | |
</li> | |
<li id="share_box"> | |
<button class="left-fixed-btn csdn-tracking-statistics" data-mod="popu_375" target="_self"> | |
<span class="iconbox border_orange"><i class="icon iconfont icon-fenxiang"></i></span> | |
</button> | |
<div class="bdsharebuttonbox csdn-tracking-statistics" data-mod="popu_172"> | |
<div class="outside"> | |
<span class="iconbox border_red2"><i class="icon iconfont icon-xinlang"></i></span> | |
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"> </a> | |
</div> | |
<div class="outside"> | |
<span class="iconbox border_green"><i class="icon iconfont icon-weixin"></i></span> | |
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"> </a> | |
</div> | |
<div class="outside"> | |
<span class="iconbox border_blue"><i class="icon iconfont icon-QQ"></i></span> | |
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"> </a> | |
</div> | |
</div> | |
</li> | |
</ul> | |
</div> | |
<div class="right_fixed"> | |
<div class="r_ico"> | |
<i class="icon iconfont icon-jubao"></i> | |
<span class="txt" id="reportBtn">内容举报</span> | |
</div> | |
<div class="returnTop"> | |
<i class="icon iconfont icon-fanhuidingbu"></i> | |
<span>返回顶部</span> | |
</div> | |
</div> | |
<div id="pop_win"></div> | |
<div id="popup_mask"></div> | |
<div class="pop_CA_cover" ></div> | |
<div class="pop pop_CA" > | |
<div class="CA_header"> | |
收藏助手 | |
<span class="cancel_icon" id="fapancle" ></span> | |
</div> | |
<iframe src="" id="collectIframe" frameborder="0" width="100%" height="360" scrolling="no" ></iframe> | |
</div> | |
<!--举报--> | |
<div id="report_dialog" style="top: 250px; left: 343.5px;"><div id="panel_report"> | |
<div class="panel_head">不良信息举报</div> | |
<form method="post" id="frmReport" class="panel_body"> | |
<table border="0" cellpadding="0" cellspacing="4" class="pop_table"> | |
<tbody><tr><td colspan="2">您举报文章:<a href="http://blog.csdn.net/hegeng84/article/details/51912734" target="_blank">CentOS7 LNMP环境搭建</a></td></tr> | |
<tr> | |
<th style="width:60px;">举报原因:</th> | |
<td id="panel_reporttype"> | |
<label><input type="radio" class="report_type" id="report_sex" name="report_type" value="1">色情</label> | |
<label><input type="radio" class="report_type" id="report_Politics" name="report_type" value="2">政治</label> | |
<label><input type="radio" class="report_type" id="report_copy" name="report_type" value="3">抄袭</label> | |
<label><input type="radio" class="report_type" id="report_ad" name="report_type" value="4">广告</label> | |
<label><input type="radio" class="report_type" id="report_want" name="report_type" value="5">招聘</label> | |
<label><input type="radio" class="report_type" id="report_call" name="report_type" value="6">骂人</label> | |
<br> | |
<label><input type="radio" class="report_type" id="report_other" name="report_type" value="7">其他</label> | |
<input type="text" name="report_other_content" id="report_other_content" maxlength="30" style="display: none;"> | |
</td> | |
</tr> | |
<tr id="panel_originalurl" style="display: none;"> | |
<th>原文地址:</th> | |
<td> | |
<input id="originalurl" value="http://" name="originalurl" type="text" style="width: 90%;"> | |
</td> | |
</tr> | |
<tr> | |
<th id="sp_reason">原因补充:</th> | |
<td> | |
<textarea id="report_description" style="width: 300px;" rows="3" name="report_description"></textarea> | |
<p id="sp_n" style="color:#999;margin:0px;padding:0px;">(最多只允许输入30个字)</p> | |
</td> | |
</tr> | |
<tr> | |
<td></td> | |
<td> | |
<input id="btnSubmitReport" name="submit" type="image" align="middle" class="btn_1" src="http://static.blog.csdn.net/images/btn_submit.jpg"> | |
<span style="padding-left:20px;"></span> | |
<img id="btnCloseReportDialog" src="http://static.blog.csdn.net/images/btn_cancel.jpg" align="middle"> | |
<div id="error" style="color: Red"> | |
</div> | |
</td> | |
</tr> | |
</tbody></table> | |
</form> | |
</div> | |
<script language="javascript" type="text/javascript"> | |
var isComment=0; | |
//显示隐藏地址 | |
$(function () { | |
console.log("version:phoenix"); | |
if(isComment){ | |
$("#report_description").attr("disabled",true); | |
$("#sp_n").hide(); | |
$("#sp_reason").html("评论内容:"); | |
} | |
$(".report_type").click(function () { | |
$("#panel_originalurl,#report_other_content").hide(); | |
switch ($(this).val()) { | |
case '3': | |
$("#panel_originalurl").show(); | |
$("#originalurl").focus(); | |
break; | |
case '7': | |
if(isComment){ | |
$("#report_other_content").show().focus(); | |
} | |
break; | |
} | |
}); | |
$("#frmReport").submit(function () { | |
if (!currentUserName) { | |
if (confirm("您的操作必须登录,是否登录?")) { | |
location.href = "http://passport.csdn.net/account/login?from=" + encodeURIComponent(location.href); | |
return false; | |
} | |
return false; | |
} | |
var reportType = $("input[name=report_type]:checked").val(); | |
if(!reportType){ | |
alert("请选择举报原因!"); | |
return false; | |
} | |
var otherInfo = ""; | |
switch (reportType) { | |
case '3': | |
otherInfo = $("#originalurl").val(); | |
if (otherInfo == ""||otherInfo=="http://") { | |
alert("举报抄袭必须提供原创文章地址!"); | |
$("#originalurl").focus(); | |
return false; | |
} else if(!checkeURL(otherInfo)) { | |
alert("请输入正确的原创文章地址!"); | |
$("#originalurl").focus(); | |
return false; | |
} | |
break; | |
case '7': | |
otherInfo = $("#report_other_content").val(); | |
if (isComment && !otherInfo) { | |
alert("请填写举报的具体原因!"); | |
$("#report_other_content").focus(); | |
return false; | |
} | |
if(!isComment){ | |
if(!$("#report_description").val()){ | |
alert("请填写举报的具体原因!"); | |
$("#report_description").focus(); | |
return false; | |
} | |
} | |
break; | |
} | |
if(!isComment){ | |
if($("#report_description").val().length>30){ | |
alert("举报原因最多只允许输入30个字!"); | |
return false; | |
} | |
} | |
nowTime = { | |
year: new Date().getFullYear(), | |
month: parseInt(new Date().getMonth())+1, | |
day: new Date().getDate(), | |
hours: parseInt(new Date().getHours())+1, | |
minutes: parseInt(new Date().getMinutes())+1, | |
seconds: parseInt(new Date().getSeconds())+1 | |
}; | |
var data = { | |
articleId: fileName, | |
commentId: 0, | |
reportType: reportType, | |
originalurl: $("#originalurl").val(), | |
report_other_content: $("#report_other_content").val(), | |
report_description: $("#report_description").val(), | |
currentUserName: currentUserName, | |
updatetime: nowTime.year+'/'+nowTime.month+'/'+nowTime.day+' '+ nowTime.hours+':'+nowTime.minutes+':'+seconds, | |
blogUser: username | |
}; | |
if(!isComment){//如果是举报文章 | |
data.report_other_content = data.report_description; | |
// data.report_description = "1. 神经网络这是一个常见的神经网络的图:这是一个常见的三层神经网络的基本构成,Layer L1是输入层,Layer L2是隐含层"; | |
} | |
$.post(blog_address + "/common/report?id="+fileName+"&t=2", data, function (data) { | |
if (data.result == 1){ | |
SetError("感谢您的举报,我们会尽快审核!"); | |
}else{ | |
if (data.content) alert(data.content); | |
} | |
}); | |
return false; | |
}); | |
$("#btnCloseReportDialog").click(function () { | |
CloseDiv(); | |
}); | |
}); | |
//提示后关闭方法 | |
function SetError(error) { | |
$("#btnCloseReportDialog").trigger("click"); | |
alert(error); | |
CloseDiv(); | |
} | |
//关闭方法 | |
function CloseDiv() { | |
$.removeMask(); | |
$("#report_dialog").hide(); | |
return false; | |
} | |
//验证url | |
function checkeURL(url){ | |
return /^http(s)?:\/\/([\w-]+\.)+[\w-]+/i.test(url); | |
} | |
</script> | |
</div> | |
<script src="http://c.csdnimg.cn/public/common/libs/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> | |
<script type="text/javascript" src="http://static.blog.csdn.net/public/res/bower-libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script> | |
<script type="text/javascript" src="http://passport.csdn.net/content/loginbox/login.js"></script> | |
<script type="text/javascript" src="http://static.blog.csdn.net/Skin/skin3-template/js/blog_ver.js?v=2017.042"></script> | |
<script type="text/javascript" src="http://static.blog.csdn.net/Skin/skin3-template/js/skin2017.js?v=2017.042"></script> | |
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/cnick.js"></script> | |
<script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "1", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script> | |
<script type="text/javascript" > | |
if($(".article_collect li").length==1){$(".article_collect").hide();} | |
if($(".article_tags li").length==1){$(".article_tags").hide();} | |
$(".edit a").attr("href","http://write.blog.csdn.net/postedit/"+fileName); | |
$.each($(".edu_li a"),function(){$(this).attr("href",$(this).attr("href").replace("blog7","blog9"))}); | |
new CNick('#uid').showNickname(); | |
if($("#fan").html()=="") | |
{ | |
$("#fan").html(0); | |
} | |
</script> | |
</body> | |
CentOS7 LNMP环境搭建
最新推荐文章于 2024-07-16 17:16:14 发布