实战LAMP架构+Discuz搭建bbs论坛

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介:

LAMP架构:Lnux+Apache+Mysql+Php

实验环境:RHEL7.0 server1.example.com 172.25.254.6

实验内容:1.Linux环境配置

                    2.Apache环境

                    3.php环境

                    4.Mysql环境

                    5.论坛搭建测试

论坛安装包:Discuz_X3.2_SC_UTF8.zip


    1.Linux环境

[root@server1 ~]# systemctl stop firewalld     ###关火墙

[root@server1 ~]# getenforce      ###关selinux

Disabled


    2.Apache环境

[root@server1 ~]# yum install httpd

[root@server1 ~]# systemctl start httpd

[root@server1 ~]# systemctl enable httpd

ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'

[root@server1 ~]# cd /var/www/html/

[root@server1 html]# ls                      ###将安装包放置在此处

Discuz_X3.2_SC_UTF8.zip  index.html

[root@server1 html]# unzip Discuz_X3.2_SC_UTF8.zip   ###解压

[root@server1 html]# mv upload/ bbs   ###重命名

[root@server1 bbs]# vim /etc/httpd/conf/httpd.conf  

          <IfModule dir_module>

          DirectoryIndex index.php index.html

          </IfModule>

[root@server1 bbs]# systemctl restart httpd


    3.php环境

[root@server1 bbs]# yum install php php-mysql -y

[root@server1 bbs]# pwd

/var/www/html/bbs

[root@server1 bbs]# cd config/

[root@server1 config]# cp -p config_ucenter_default.php config_ucenter.php 

[root@server1 config]# cp -p config_global_default.php config_global.php 

[root@server1 config]# chmod 777 -R  /var/www/html/bbs/


    4.mysql环境

[root@server1 config]# yum install mariadb mariadb-server -y

[root@server1 config]# systemctl start mariadb

[root@server1 config]# systemctl enable mariadb

[root@server1 config]# mysql_secure_installation 

/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB

      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current

password for the root user.  If you've just installed MariaDB, and

you haven't set the root password yet, the password will be blank,

so you should just press enter here.

Enter current password for root (enter for none):      ###回车

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB

root user without the proper authorisation.

Set root password? [Y/n]          ###回车

New password:                 ##输入要设置的数据库密码

Re-enter new password:    ##再次输入密码

Password updated successfully!

Reloading privilege tables..

 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB without having to have a user account created for

them.  This is intended only for testing, and to make the installation

go a bit smoother.  You should remove them before moving into a

production environment

Remove anonymous users? [Y/n]    ###回车

 ... Success!

ormally, root should only be allowed to connect from 'localhost'.  This

ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]      ##回车

 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can

access.  This is also intended only for testing, and should be removed

before moving into a production environment.

Remove test database and access to it? [Y/n]     ###回车

 - Dropping test database...

 ... Success!

 - Removing privileges on test database...

 ... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n]     ###回车

 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

[root@server1 config]# systemctl restart mariadb.service 

[root@server1 config]# mysql -uroot -p

Enter password: 

MariaDB [(none)]>  CREATE DATABASE discuz;         #新建数据库

Query OK, 1 row affected (0.00 sec) 


MariaDB [(none)]>  CREATE USER willis@localhost identified by 'willis';   #新建用户

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]>  GRANT ALL on discuz.* to willis@localhost;      #用户授权  

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]> quit

Bye

[root@server1 config]# mysql -uwillis -pwillis    #测试新建的用户

MariaDB [(none)]> quit

Bye

[root@server1 config]# systemctl restart httpd.service 

[root@server1 config]# systemctl restart mariadb.service 

      

LAMP论坛搭建环境完成


    5. 安装测试:

wKiom1fU1x_QrbLPAAIpkIhWdvg769.png


wKioL1fU1x7QJIH_AAENl3BOg8w779.png


wKiom1fU1x3Auo6sAACuBlzIQBs987.png



wKioL1fU1xyy_PM1AAD7X0cTDsw427.png

 wKiom1fU1xuhGlvRAAAR0pJMYro903.png



 好了,安装完成,来看看什么样子吧。

wKiom1fU1xvjSEWzAAE7ITyYv_M734.png


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

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
打赏
0
0
0
0
69
分享
相关文章
RocketMQ实战—3.基于RocketMQ升级订单系统架构
本文主要介绍了基于MQ实现订单系统核心流程的异步化改造、基于MQ实现订单系统和第三方系统的解耦、基于MQ实现将订单数据同步给大数据团队、秒杀系统的技术难点以及秒杀商详页的架构设计和基于MQ实现秒杀系统的异步化架构。
RocketMQ实战—3.基于RocketMQ升级订单系统架构
百万级URL重定向工程:大规模网站架构设计与性能优化实战
本文深入探讨了大规模重定向系统的核心挑战与解决方案,涵盖技术瓶颈分析、分布式架构设计、十亿级URL处理策略、全球化部署方案及全链路监控体系。通过数学建模与性能优化,提出三层架构模型,并结合一致性哈希分片算法实现高效路由。同时,对比不同架构的吞吐量与容灾能力,分享某电商平台实践案例,展示性能显著提升。最后展望重定向即服务(RaaS)未来趋势,包括AI动态路由、量子安全跳转和边缘智能等关键技术,为企业提供扩展性强、稳定性高的系统设计参考。
73 25
从理论到落地:MCP 实战解锁 AI 应用架构新范式 | 免费领取 78 页完整 PPT
本文旨在从 MCP 的技术原理、降低 MCP Server 构建复杂度、提升 Server 运行稳定性等方面出发,分享我们的一些实践心得。
106 14
301重定向进阶实战:从性能优化到未来架构演进
本文探讨了百万级流量动态重定向的架构设计与优化方案,结合全球电商平台迁移案例,展示基于Nginx+Lua的动态规则引擎及流量分级策略。同时,深入分析性能优化与安全加固技术,如零延迟跳转、智能熔断机制,并提出混合云环境下的跨平台解决方案。此外,针对SEO数据继承与流量恢复提供三维权重映射模型和自动化监测工具链。最后,展望边缘计算、区块链及量子安全等下一代重定向技术,为企业构建面向未来的体系提供参考。
63 7
Python 高级编程与实战:深入理解设计模式与软件架构
本文深入探讨了Python中的设计模式与软件架构,涵盖单例、工厂、观察者模式及MVC、微服务架构,并通过实战项目如插件系统和Web应用帮助读者掌握这些技术。文章提供了代码示例,便于理解和实践。最后推荐了进一步学习的资源,助力提升Python编程技能。
Python 高级编程与实战:构建微服务架构
本文深入探讨了 Python 中的微服务架构,介绍了 Flask、FastAPI 和 Nameko 三个常用框架,并通过实战项目帮助读者掌握这些技术。每个框架都提供了构建微服务的示例代码,包括简单的 API 接口实现。通过学习本文,读者将能够使用 Python 构建高效、独立的微服务。
布谷直播系统源码开发实战:从架构设计到性能优化
作为山东布谷科技的一名技术研发人员,我参与了多个直播系统平台从0到1的开发和搭建,也见证了直播行业从萌芽到爆发的全过程。今天,我想从研发角度,分享一些直播系统软件开发的经验和心得,希望能对大家有所帮助。
后端服务架构的微服务化转型
本文旨在探讨后端服务从单体架构向微服务架构转型的过程,分析微服务架构的优势和面临的挑战。文章首先介绍单体架构的局限性,然后详细阐述微服务架构的核心概念及其在现代软件开发中的应用。通过对比两种架构,指出微服务化转型的必要性和实施策略。最后,讨论了微服务架构实施过程中可能遇到的问题及解决方案。
云原生时代的应用架构演进:从微服务到 Serverless 的阿里云实践
云原生技术正重塑企业数字化转型路径。阿里云作为亚太领先云服务商,提供完整云原生产品矩阵:容器服务ACK优化启动速度与镜像分发效率;MSE微服务引擎保障高可用性;ASM服务网格降低资源消耗;函数计算FC突破冷启动瓶颈;SAE重新定义PaaS边界;PolarDB数据库实现存储计算分离;DataWorks简化数据湖构建;Flink实时计算助力风控系统。这些技术已在多行业落地,推动效率提升与商业模式创新,助力企业在数字化浪潮中占据先机。
84 12
云计算的未来:云原生架构与微服务的革命####
【10月更文挑战第21天】 随着企业数字化转型的加速,云原生技术正迅速成为IT行业的新宠。本文深入探讨了云原生架构的核心理念、关键技术如容器化和微服务的优势,以及如何通过这些技术实现高效、灵活且可扩展的现代应用开发。我们将揭示云原生如何重塑软件开发流程,提升业务敏捷性,并探索其对企业IT架构的深远影响。 ####
122 3