300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 项目部署之 OElove 婚恋交友网站系统平台搭建(含php源码)

项目部署之 OElove 婚恋交友网站系统平台搭建(含php源码)

时间:2022-08-27 07:18:06

相关推荐

项目部署之 OElove 婚恋交友网站系统平台搭建(含php源码)

OElove 婚恋交友网站系统平台搭建

最近相亲的网站也是不少,小编在这里从网上购买了一套源码,进行部署,有喜欢的可以尝试以下部署,老规矩,搭建这个平台只是为了学习和研究,如果侵犯到了你的权益,请联系小编马上删除

先看效果图

系统环境

废话不说,开始操作

lnmp环境搭建部署

参照小编的另一个文章

lnmp架构搭建-基于linux系统centos7.5

拉取源码,并放置网站目录

链接:/s/1Uod6KP1U8RpwuNqtKnDpiw 提取码:5a4a 复制这段内容后打开百度网盘手机App,操作更方便哦

[root@lnmp html]# ss -antup | grep 80 #查看nginx服务是否正常开启tcp LISTEN080 *:3306 *:* users:(("mysqld",pid=1794,fd=10))tcp LISTEN0128 *:80*:* users:(("nginx",pid=1482,fd=6),("nginx",pid=1481,fd=6))tcp LAST-ACK 11192.168.100.155:35322 147.75.83.237:80 [root@lnmp html]# ss -antup | grep 9000 ##查看php服务是不是正常开启tcp LISTEN0128 127.0.0.1:9000 *:* users:(("php-fpm",pid=1486,fd=0),("php-fpm",pid=1485,fd=0),("php-fpm",pid=1484,fd=7))[root@lnmp html]# ss -antup | grep 3306 #查看mysql服务是不是正常开启tcp LISTEN080 *:3306 *:* users:(("mysqld",pid=1794,fd=10))[root@lnmp ~]# cd /usr/local/nginx/html/ #网页根目录[root@lnmp html]# ls #查看源码oelove.zip[root@lnmp html]# yum -y install unzip #安装解压工具[root@lnmp html]# unzip oelove.zip #解压源码[root@lnmp html]# lsadmincp.php api data index.php install notify oelove.zip source tpl wap.php weixin.php

进行安装

在浏览器中输入服务器ip。例如我的是192.168.100.155,就可以进入到安装界面

php降版本到php5.3

[root@lnmp html]# php --version #查看当前php版本为5.6PHP 5.6.40 (cli) (built: Feb 28 12:43:44) Copyright (c) 1997- The PHP GroupZend Engine v2.6.0, Copyright (c) 1998- Zend Technologies[root@lnmp html] systemctl stop php-fpm[root@lnmp html]# mv /usr/local/php /usr/local/php.bak[root@lnmp html]# useradd -s /sbin/nologin -M www #为了安全起见,创建一个程序用户wwwroot@lnmp html]# yum -y install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel #安装php5.3所需要的依赖包已加载插件:fastestmirrorLoading mirror speeds from cached hostfile* base: mirrors.* epel: mirrors.* extras: mirrors.* updates: mirrors.软件包 zlib-devel-1.2.7-19.el7_9.x86_64 已安装并且是最新版本软件包 libxml2-devel-2.9.1-6.el7.5.x86_64 已安装并且是最新版本软件包 libjpeg-turbo-devel-1.2.90-8.el7.x86_64 已安装并且是最新版本软件包 libjpeg-turbo-devel-1.2.90-8.el7.x86_64 已安装并且是最新版本没有可用软件包 libiconv-devel。 ###可以发现这里有哥libiconv包没法安装,不要紧的一会我们进行编译安装无须任何处理[root@lnmp html]# yum -y install freetype-devel libpng-devel gd libcurl-devel libxslt-devel #安装依赖包已加载插件:fastestmirrorLoading mirror speeds from cached hostfile* base: * epel: mirrors.* extras: * updates: 软件包 freetype-devel-2.8-14.el7_9.1.x86_64 已安装并且是最新版本软件包 2:libpng-devel-1.5.13-8.el7.x86_64 已安装并且是最新版本软件包 libcurl-devel-7.29.0-59.el7_9.1.x86_64 已安装并且是最新版本正在解决依赖关系--> 正在检查事务---> 软件包 gd.x86_64.0.2.0.35-27.el7_9 将被 安装--> 正在处理依赖关系 libfontconfig.so.1()(64bit),它被软件包 gd-2.0.35-27.el7_9.x86_64 需要--> 正在处理依赖关系 libXpm.so.4()(64bit),它被软件包 gd-2.0.35-27.el7_9.x86_64 需要****************省略**************已安装:gd.x86_64 0:2.0.35-27.el7_9 libxslt-devel.x86_64 0:1.1.28-6.el7作为依赖被安装:dejavu-fonts-common.noarch 0:2.33-6.el7 dejavu-sans-fonts.noarch 0:2.33-6.el7 fontconfig.x86_64 0:2.13.0-4.3.el7 fontpackages-filesystem.noarch 0:1.44-8.el7 libX11.x86_64 0:1.6.7-3.el7_9 libX11-common.noarch 0:1.6.7-3.el7_9 libXau.x86_64 0:1.0.8-2.1.el7 libXpm.x86_64 0:3.5.12-1.el7 libgcrypt-devel.x86_64 0:1.5.3-14.el7 libgpg-error-devel.x86_64 0:1.12-3.el7 libxcb.x86_64 0:1.13-1.el7 作为依赖被升级:libxslt.x86_64 0:1.1.28-6.el7 完毕![root@lnmp ~]# wget /pub/gnu/libiconv/libiconv-1.14.tar.gz ##/libiconv-1.14.tar.gz进行源码安装[root@lnmp ~]# lsanaconda-ks.cfg libiconv-1.14.tar.gz mirror mysql-5.6.39.tar.gz nginx-1.16.1.tar.gz php-5.6.40.tar.gz wget-log[root@lnmp ~]# tar xf libiconv-1.14.tar.gz -C /usr/src/[root@lnmp ~]# cd /usr/src/libiconv-1.14/[root@lnmp libiconv-1.14]# ./configure --prefix=/usr/local/libiconv && make && make install[root@lnmp ~]# yum -y install libmcrypt-devel #安装ibmcrypt-devel已加载插件:fastestmirrorLoading mirror speeds from cached hostfile* base: * epel: mirrors.* extras: * updates: 软件包 libmcrypt-devel-2.5.8-13.el7.x86_64 已安装并且是最新版本无须任何处理[root@lnmp ~]# yum -y install mhash #安装mhash已加载插件:fastestmirrorLoading mirror speeds from cached hostfile* base: mirrors.* epel: mirrors.* extras: mirrors.* updates: mirrors.正在解决依赖关系--> 正在检查事务---> 软件包 mhash.x86_64.0.0.9.9.9-10.el7 将被 安装--> 解决依赖关系完成依赖关系解决=================================================================================================================================================Package架构 版本 源大小=================================================================================================================================================正在安装:mhash x86_64 0.9.9.9-10.el7 epel 106 k事务概要=================================================================================================================================================安装 1 软件包总下载量:106 k安装大小:210 kDownloading packages:mhash-0.9.9.9-10.el7.x86_64.rpm | 106 kB 00:00:00Running transaction checkRunning transaction testTransaction test succeededRunning transaction正在安装 : mhash-0.9.9.9-10.el7.x86_64 1/1 验证中: mhash-0.9.9.9-10.el7.x86_64 1/1 已安装:mhash.x86_64 0:0.9.9.9-10.el7 完毕![root@lnmp ~]# yum -y install mcrypt #安装mcrypt已加载插件:fastestmirrorLoading mirror speeds from cached hostfile* base: * epel: mirrors.* extras: * updates: 正在解决依赖关系--> 正在检查事务---> 软件包 mcrypt.x86_64.0.2.6.8-11.el7 将被 安装--> 解决依赖关系完成依赖关系解决=================================================================================================================================================Package架构 版本 源大小=================================================================================================================================================正在安装:mcrypt x86_64 2.6.8-11.el7 epel 85 k事务概要=================================================================================================================================================安装 1 软件包总下载量:85 k安装大小:223 kDownloading packages:mcrypt-2.6.8-11.el7.x86_64.rpm | 85 kB 00:00:00Running transaction checkRunning transaction testTransaction test succeededRunning transaction正在安装 : mcrypt-2.6.8-11.el7.x86_64 1/1 验证中: mcrypt-2.6.8-11.el7.x86_64 1/1 已安装:mcrypt.x86_64 0:2.6.8-11.el7完毕!#这里需要注意的是我们的wget下php-5.3.28的包,由于网速太慢了,这里还没有找到一个好的位置供大家下载,大家可以百度找下这个包。[root@lnmp ~]# lsanaconda-ks.cfg mirrornginx-1.16.1.tar.gz libiconv-1.14.tar.gz mysql-5.6.39.tar.gz php-5.3.28.tar.gz php-5.6.40.tar.gz wget-log[root@lnmp ~]# tar xvf php-5.3.28.tar.gz -C /usr/src/[root@lnmp ~]# cd /usr/src/php-5.3.28/##编译安装phproot@lnmp php-5.3.28]# ./configure --prefix=/usr/local/php5.3.28 --with-mysql=/usr/local/mysql --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-zend-multibyte --enable-static --with-xsl --with-fpm-user=www --with-fpm-group=www --enable-ftpcreating scripts/man1/php-config.1creating sapi/cli/php.1creating sapi/fpm/php-fpm.confcreating sapi/fpm/init.d.php-fpmcreating sapi/fpm/php-fpm.servicecreating sapi/fpm/php-fpm.8creating sapi/fpm/status.htmlcreating main/php_config.hcreating main/reating main/internal_functions_cli.c+--------------------------------------------------------------------+| License: || This software is subject to the PHP License, available in this|| distribution in the file LICENSE. By continuing this installation || process, you are bound by the terms of this license agreement.|| If you do not agree with the terms of this license, you must abort || the installation process at this point. |+--------------------------------------------------------------------+Thank you for using PHP.[root@lnmp php-5.3.28]# ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/ [root@lnmp php-5.3.28]# touch ext/phar/phar.phar[root@lnmp php-5.3.28]# make[root@lnmp php-5.3.28]# make install[root@lnmp php-5.3.28]# cp php.ini-production /usr/local/php/lib/php.ini[root@lnmp php-5.3.28]# cd /usr/local/php/etc/[root@lnmp etc]# cp php-fpm.conf.default php-fpm.conf[root@lnmp etc]# /usr/local/php/sbin/php-fpm[root@lnmp etc]# ss -antup | grep 9000tcp LISTEN0128 127.0.0.1:9000 *:* users:(("php-fpm",pid=126228,fd=0),("php-fpm",pid=126227,fd=0),("php-fpm",pid=126226,fd=7))

修改部分目录文件权限

[root@lnmp etc]# cd /usr/local/nginx/html/[root@lnmp html]# mkdir tpl/_compiled/ tpl/_caches/ #这两个目录在源码中是没有的,没有怎么办,那就创造她[root@lnmp html]# chmod 777 -R data/ source/conf/ source/plugin/ tpl/ install/data/ #只给写权限就行了,小编偷懒了

完善数据库

[root@lnmp html]# systemctl restart mysqld[root@lnmp html]# mysql -uroot -p -h192.168.100.155Enter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.6.39 Source distributionCopyright (c) 2000, , Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || test|+--------------------+4 rows in set (0.00 sec)mysql> create database love;Query OK, 1 row affected (0.00 sec)mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || love|| mysql || performance_schema || test|+--------------------+5 rows in set (0.00 sec)mysql> mysql> exitBye

接下来就可以体验吧,夜深了,小编也该睡了

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。