165 lines
No EOL
8.7 KiB
HTML
165 lines
No EOL
8.7 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="tool" content="leanote-desktop-app">
|
||
<title>php7安装配置</title>
|
||
<style>
|
||
|
||
*{font-family:"lucida grande","lucida sans unicode",lucida,helvetica,"Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;}
|
||
|
||
body {
|
||
margin: 0;
|
||
}
|
||
|
||
/*公用文字样式*/
|
||
h1{font-size:30px}h2{font-size:24px}h3{font-size:18px}h4{font-size:14px}
|
||
.note-container{
|
||
width:850px;
|
||
margin:auto;
|
||
padding: 10px 20px;
|
||
box-shadow: 1px 1px 10px #eee;
|
||
}
|
||
#title {
|
||
margin: 0;
|
||
}
|
||
table {
|
||
margin-bottom: 16px;
|
||
border-collapse: collapse;
|
||
}
|
||
table th, table td {
|
||
padding: 6px 13px;
|
||
border: 1px solid #ddd;
|
||
}
|
||
table th {
|
||
font-weight: bold;
|
||
}
|
||
|
||
table tr {
|
||
background-color: none;
|
||
border-top: 1px solid #ccc;
|
||
}
|
||
table tr:nth-child(2n) {
|
||
background-color: rgb(247, 247, 249);
|
||
}
|
||
.mce-item-table, .mce-item-table td, .mce-item-table th, .mce-item-table caption {
|
||
border: 1px solid #ddd;
|
||
border-collapse: collapse;
|
||
padding: 6px 13px;
|
||
}
|
||
blockquote {
|
||
border-left-width:10px;
|
||
background-color:rgba(128,128,128,0.05);
|
||
border-top-right-radius:5px;
|
||
border-bottom-right-radius:5px;
|
||
padding:15px 20px;
|
||
border-left:5px solid rgba(128,128,128,0.075);
|
||
}
|
||
blockquote p {
|
||
margin-bottom:1.1em;
|
||
font-size:1em;
|
||
line-height:1.45
|
||
}
|
||
blockquote ul:last-child,blockquote ol:last-child {
|
||
margin-bottom:0
|
||
}
|
||
pre {
|
||
padding: 18px;
|
||
background-color: #f7f7f9;
|
||
border: 1px solid #e1e1e8;
|
||
border-radius: 3px;
|
||
display: block;
|
||
}
|
||
code {
|
||
padding: 2px 4px;
|
||
font-size: 90%;
|
||
color: #c7254e;
|
||
white-space: nowrap;
|
||
background-color: #f9f2f4;
|
||
border-radius: 4px;
|
||
}
|
||
.footnote {
|
||
vertical-align: top;
|
||
position: relative;
|
||
top: -0.5em;
|
||
font-size: .8em;
|
||
}
|
||
|
||
hr {
|
||
margin:2em 0
|
||
}
|
||
img {
|
||
max-width:100%
|
||
}
|
||
pre {
|
||
word-break:break-word
|
||
}
|
||
p,pre,pre.prettyprint,blockquote {
|
||
margin:0 0 1.1em
|
||
}
|
||
hr {
|
||
margin:2em 0
|
||
}
|
||
img {
|
||
max-width:100%
|
||
}
|
||
.sequence-diagram,.flow-chart {
|
||
text-align:center;
|
||
margin-bottom:1.1em
|
||
}
|
||
.sequence-diagram text,.flow-chart text {
|
||
font-size:15px !important;
|
||
font-family:"Source Sans Pro",sans-serif !important
|
||
}
|
||
.sequence-diagram [fill="#ffffff"],.flow-chart [fill="#ffffff"] {
|
||
fill:#f6f6f6
|
||
}
|
||
.sequence-diagram [stroke="#000000"],.flow-chart [stroke="#000000"] {
|
||
stroke:#3f3f3f
|
||
}
|
||
.sequence-diagram text[stroke="#000000"],.flow-chart text[stroke="#000000"] {
|
||
stroke:none
|
||
}
|
||
.sequence-diagram [fill="#000"],.flow-chart [fill="#000"],.sequence-diagram [fill="#000000"],.flow-chart [fill="#000000"],.sequence-diagram [fill="black"],.flow-chart [fill="black"] {
|
||
fill:#3f3f3f
|
||
}
|
||
ul,ol {
|
||
margin-bottom:1.1em
|
||
}
|
||
ul ul,ol ul,ul ol,ol ol {
|
||
margin-bottom:1.1em
|
||
}
|
||
kbd {
|
||
padding:.1em .6em;
|
||
border:1px solid rgba(63,63,63,0.25);
|
||
-webkit-box-shadow:0 1px 0 rgba(63,63,63,0.25);
|
||
box-shadow:0 1px 0 rgba(63,63,63,0.25);
|
||
font-size:.7em;
|
||
font-family:sans-serif;
|
||
background-color:#fff;
|
||
color:#333;
|
||
border-radius:3px;
|
||
display:inline-block;
|
||
margin:0 .1em;
|
||
white-space:nowrap
|
||
}
|
||
.toc ul {
|
||
list-style-type:none;
|
||
margin-bottom:15px
|
||
}
|
||
</style>
|
||
<!-- 该css供自定义样式 -->
|
||
<link href="../leanote-html.css" rel="stylesheet">
|
||
</head>
|
||
|
||
<body>
|
||
|
||
<div class="note-container">
|
||
<h1 class="title" id="leanote-title">php7安装配置</h1>
|
||
<div class="content-html" id="leanote-content"><p>php 7</p><p>yum install epel-release -y<br>yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers mysql-devel perl-CPAN gd-devel gd iconv libmcrypt</p><p><br data-mce-bogus="1"></p><p>echo "usr/local/lib" >> /etc/ld.so.conf</p><p>ldconfig</p><p><br data-mce-bogus="1"></p><p>wget -c <a href="http://cn.php.net/distributions/php-7.1.8.tar.xz">http://cn.php.net/distributions/php-7.1.8.tar.xz</a></p><p><br data-mce-bogus="1"></p><p> ./configure --prefix=/usr/local/webserver7/php --with-config-file-path=/usr/local/webserver7/php/etc --enable-mysqlnd --with-pdo-mysql --with-mysqli=/usr/bin/mysql_config --with-iconv=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --enable-opcache --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --without-pear --with-fpm-user=www --with-fpm-group=www</p><p><br data-mce-bogus="1"></p><p>make && make install </p><p><br data-mce-bogus="1"></p><p>安装rabbitmq</p><p><a href="https://github.com/alanxz/rabbitmq-c/releases/download/v0.7.1/rabbitmq-c-0.7.1.tar.gz">https://github.com/alanxz/rabbitmq-c/releases/download/v0.7.1/rabbitmq-c-0.7.1.tar.gz</a></p><p>tar xf rabbitmq-c-0.7.1.tar.gz<br>autoreconf -i --force<br>./configure --prefix=/usr/local/rabbitmq-c && make && make install</p><p><br data-mce-bogus="1"></p><p>安装amqp</p><p>/usr/local/webserver7/php/bin/phpize && ./configure --with-php-config=/usr/local/webserver7/php/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c</p><p><br data-mce-bogus="1"></p><p>安装mongo扩展</p><div> wget https://pecl.php.net/get/mongo-1.6.14.tgz<br> tar xf mongo-1.6.14.tgz && cd mongo-1.6.14<br> /usr/local/webserver7/php/bin/phpize<br> ./configure --with-php-config=/usr/local/webserver7/php/bin/php-config </div><div> make && make instal</div><div><br data-mce-bogus="1"></div><div>安装redis扩展</div><div> wget https://pecl.php.net/get/redis-3.1.3.tgz<br> tar xf redis-3.1.3.tgz <br> cd redis-3.1.3<br> /usr/local/webserver7/php/bin/phpize<br>./configure --with-php-config=/usr/local/webserver7/php/bin/php-config<br> make<br> make install</div><div><br data-mce-bogus="1"></div><div>安装yaf扩展</div><div><div>yaf3 以上只支持 php7<br>php6 使用 yaf2 版本<br><br> php7 编译 yaf<br>#http://pecl.php.net/get/yaf-3.0.tgz<br># tar xf yaf-3.0.tgz <br># cd yaf-3.0/<br># /usr/local/webserver7/php/bin/phpize <br>#./configure --with-php-config=/usr/local/webserver7/php/bin/php-config <br>#make && make install</div><div><br></div><div>安装swoole 扩展<br> <br> # git clone https://github.com/swoole/swoole-src.git<br> # cd swoole-src/<br> # /usr/local/webserver7/php/bin/phpize<br> # ./configure --with-php-config=/usr/local/webserver7/php/bin/php-config <br> #make && make install</div><div> <br></div><div><div>配置文件里加入扩展模块<br><br> <br> #cp /usr/src/php-7.18/php.ini-production /usr/local/webserver7/php/etc/php.ini<br> # 在php.ini 加入以下内容<br> extension=amqp.so<br> extension=difeye.so<br> extension=msgpack.so<br> extension=redis.so<br> extension=swoole.so<br> extension=yaf.so</div><div> <br></div><div>[opcache]</div><div><p>zend_extension=opcache.so</p><p>opcache.enable=1</p><p> <br></p><div>查看扩展</div><div> /usr/local/webserver7/php/bin/php -m</div></div><div> <br></div><div> <br></div></div></div><p><br data-mce-bogus="1"></p><p><br></p></div>
|
||
</div>
|
||
|
||
<!-- 该js供其它处理 -->
|
||
<script src="../leanote-html.js"></script>
|
||
</body>
|
||
</html> |