OElove marriage and dating website system platform construction
There are also many dating sites recently. I bought a set of source code from the Internet and deployed it here. If you like, you can try the following deployment. The old rules are just for learning and research. If your rights are violated, Please contact the editor to delete immediately
Look at the renderings first
System environment
system | system version | RAM | ip | Network mode |
---|---|---|---|---|
Linux | centos7.5 | 2G | 192.168.100.155 | NAT (that is, you can access the Internet) |
Don't talk nonsense, get started
lnmp environment to build and deploy
- Refer to another article of the
editor, lnmp architecture construction-based on linux system centos7.5
Pull the source code and place the website directory
链接:https://pan.baidu.com/s/1Uod6KP1U8RpwuNqtKnDpiw
提取码:5a4a
复制这段内容后打开百度网盘手机App,操作更方便哦
[root@lnmp html]# ss -antup | grep 80 #查看nginx服务是否正常开启
tcp LISTEN 0 80 *:3306 *:* users:(("mysqld",pid=1794,fd=10))
tcp LISTEN 0 128 *:80 *:* users:(("nginx",pid=1482,fd=6),("nginx",pid=1481,fd=6))
tcp LAST-ACK 1 1 192.168.100.155:35322 147.75.83.237:80
[root@lnmp html]# ss -antup | grep 9000 ##查看php服务是不是正常开启
tcp LISTEN 0 128 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 LISTEN 0 80 *: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]# ls
admincp.php api data index.php install notify oelove.zip source tpl wap.php weixin.php
To install
Enter the server ip in the browser. For example, mine is 192.168.100.155, you can enter the installation interface
php downgrade to php5.3
[root@lnmp html]# php --version #查看当前php版本为5.6
PHP 5.6.40 (cli) (built: Feb 28 2021 12:43:44)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 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 #为了安全起见,创建一个程序用户www
root@lnmp html]# yum -y install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel #安装php5.3所需要的依赖包
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.bfsu.edu.cn
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.bfsu.edu.cn
* updates: mirrors.bfsu.edu.cn
软件包 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 #安装依赖包
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
软件包 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 http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz ##/libiconv-1.14.tar.gz进行源码安装
[root@lnmp ~]# ls
anaconda-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
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
软件包 libmcrypt-devel-2.5.8-13.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@lnmp ~]# yum -y install mhash #安装mhash
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.ustc.edu.cn
* updates: mirrors.ustc.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 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 k
Downloading packages:
mhash-0.9.9.9-10.el7.x86_64.rpm | 106 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running 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
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.163.com
* updates: mirrors.huaweicloud.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 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 k
Downloading packages:
mcrypt-2.6.8-11.el7.x86_64.rpm | 85 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running 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 ~]# ls
anaconda-ks.cfg mirror nginx-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/
##编译安装php
root@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-ftp
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating sapi/fpm/php-fpm.conf
creating sapi/fpm/init.d.php-fpm
creating sapi/fpm/php-fpm.service
creating sapi/fpm/php-fpm.8
creating sapi/fpm/status.html
creating main/php_config.h
creating main/internal_functions.c
creating 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 9000
tcp LISTEN 0 128 127.0.0.1:9000 *:* users:(("php-fpm",pid=126228,fd=0),("php-fpm",pid=126227,fd=0),("php-fpm",pid=126226,fd=7))
Modify file permissions of some directories
[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/ #只给写权限就行了,小编偷懒了
Perfect database
[root@lnmp html]# systemctl restart mysqld
[root@lnmp html]# mysql -uroot -p -h192.168.100.155
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.39 Source distribution
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
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> exit
Bye
Then you can experience it, it’s late at night, and the editor should go to bed too