开发者社区> 余二五> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

LNMP+discuzz源码安装

简介:
+关注继续查看

LNMP+discuzz源码安装

Bison安装编译mysql需要

Shell> tar zxvf bison-3.0.tar.gz

Shell> cd bison-3.0

Shell> ./configure –prefix=/usr/local/bison

Shell> make

Shell> make install

 

Cmake安装编译mysql需要

Shell> tar zxvf cmake-2.8.10.2.tar.gz

Shell> cd cmake-2.8.10.2

Shell> ./configure –prefix=/usr/local/cmake

Shell> make

Shell> make install

 

修改环境变量

Shell> echo “export PATH=$PATH:/usr/local/bison/bin:/usr/local/cmake/bin” >> /etc/profile

Shell> source /etc/profile

 

Mysql的安装

Shell> groupadd mysql

Shell> useradd –G mysql mysql

Shell> tar zxvf mysql-5.5.37.tar.gz

Shell> cd mysql-5.5.37

Shell> cmake –DCMAKE_INSTALL_PREFIX=/usr/local/mysql –DDEFAULT_CHARSET=utf8

Shell> make

Shell> make install

Shell> cd /usr/local/mysql

Shell> cp support-files/my-medium.cnf ./my.cnf

 

修改环境变量

Shell> echo “export PATH=$PATH:/usr/local/mysql/bin” >> /etc/profile

Shell> source /etc/profile

 

Mysql的初始配置及启动

Shell> chown –R mysql:mysql /usr/local/mysql

Shell> /usr/local/mysql/scripts/mysql_install_db –basedir=/usr/local/mysql –user=mysql

Shell> mysqld_safe &

Shell> mysqladmin –u root password ‘root’

 

 

Nginx安装

Shell> groupadd nginx

Shell> useradd nginx

Shell> tar zxvf ngnix-1.7.0

Shell> cd ngnix-1.7.0

Shell> ./configure –prefix=/usr/local/nginx

Shell> make

Shell> make install

Shell> chown –R nginx:nginx /usr/local/nginx

 

修改环境变量

Shell> echo “export PATH=$PATH:/usr/local/nginx/sbin”

Shell> source /etc/profile

 

启动nginx

Shell>nginx

 

测试nginx

http://localhost

wKiom1OacL-hSd4CAAFJSDaQ-ko598.jpg

 

Libiconv安装—php编译需要

Shell> tar zxvf libiconv-1.14.tar.gz

Shell> cd libiconv-1.14

Shell> ./configure –prefix=/usr/local/libiconv

Shell> vi srclib/stdio.h

wKiom1OacMnCNSORAACBTaw9Ttk812.jpg

Shell> make

Shell> make install

 

Php安装

Shell> tar zxvf php-5.5.12.tar.gz

Shell> cd php-5.5.12

Shell> ./configure –prefix=/usr/local/php –with-iconv-dir=/usr/local/libiconv –enable-fpm –with-mysql=/usr/localmysql

Shell> make

Shell> make test

Shell> make install

Shell> echo “export PATH=$PATH:/usr/local/php/bin:/usr/local/php/sbin” >>/etc/profile

Shell> source /etc/profile

 

php配置

Shell> cp php.ini-development /usr/local/php/php.ini

Shell> cd /usr/local/php

Shell> cp etc/php-fpm.conf.default etc/php-fpm.conf

Shell> vi /usr/local/php/php.ini

 wKioL1OacKjx_TFnAAAxpe9j5DU747.jpg

Shell> /usr/local/php/etc/php-fpm.conf

wKiom1OacRXRtB8YAAB5YWcMkxU799.jpg

 

启动php-fpm

Shell> /usr/local/php/sbin/php-fpm

 

查看运行端口状况

Shell> netstat –nlupt

 wKiom1OacSDCAwdPAAD58HbV7_g808.jpg

 

添加nginxphp-fpm支持

wKiom1OacTPiXkNlAABmbcwirqE756.jpg

… …

wKiom1OacT_TO4a_AADID3I3s70632.jpg

 

php测试

Shell> cd /usr/local/nginx/html

Shell> mv index.html index.html.bak

Shell> echo “<?php     phpinfo();   ?>” > index.php

 

http://localhost

wKioL1OacRvwMyTAAAHAoRBqBlk279.jpg

 

Discuzz安装配置

Shell> unzip –x Discuz_X3.1_SC_UTF-8.zip

Shell> mv Discuz_X3.1_SC_UTF-8 discuz

Shell> mv discuz/* /usr/local/nginx/html/.

Shell> cd /usr/local/nginx/html

Shell> cp –R upload.* ./.

Shell> chown –R nginx:nginx /usr/local/nginx/html/*

Shell> http://localhost

如下图:

à

wKiom1OacVWw820uAAQNxPbKpC4781.jpg

à如果出现红“x”,检查discuz文件夹权限

wKiom1OacWmB7TWPAAGeOHiVQ3Q449.jpg

3à

wKiom1OacXeTMop6AAGhOgfgMHA367.jpg

à

wKioL1OacVeTsYLAAAIxwhVbINo689.jpg

à新应用需要zlib文件库支持

wKiom1OacZPxr7vCAAO9g0iaKgc015.jpg










本文转自 chengchow 51CTO博客,原文链接:http://blog.51cto.com/chengchow/1425618,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
LNMP源码安装
wget http://down.linuxprobe.com/Tools/cmake-2.8.11.2.tar.gz wget http://down.
810 0
lnmp安装,zabbix源码安装安装教程
lnmp源码安装,zabbix源码安装,mysql基础
1623 0
lnmp 安装
lnmp  安装     32.lnmp 安装(Linux+Apache+MySQL+PHP) 32.1 apache 安装 wget http://mirrors.hust.edu.
712 0
yum lnmp
1.关闭防火墙 [root@CentOS ~]# chkconfig iptables off   2.关闭selinux vi /etc/sysconfig/selinux //将SELINUX=enforcing修改为disabled然后重启生效   3、配置CentOS 6.
642 0
+关注
文章
问答
文章排行榜
最热
最新
相关电子书
更多
CentOS Nginx PHP JAVA多语言镜像使用手册
立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手
立即下载
低代码开发师(初级)实战教程
立即下载