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

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环境

[[email protected] ~]# systemctl stop firewalld     ###关火墙

[[email protected] ~]# getenforce      ###关selinux

Disabled


    2.Apache环境

[[email protected] ~]# yum install httpd

[[email protected] ~]# systemctl start httpd

[[email protected] ~]# systemctl enable httpd

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

[[email protected] ~]# cd /var/www/html/

[[email protected] html]# ls                      ###将安装包放置在此处

Discuz_X3.2_SC_UTF8.zip  index.html

[[email protected] html]# unzip Discuz_X3.2_SC_UTF8.zip   ###解压

[[email protected] html]# mv upload/ bbs   ###重命名

[[email protected] bbs]# vim /etc/httpd/conf/httpd.conf 

<IfModule dir_module>

DirectoryIndex index.php index.html

</IfModule>

[[email protected] bbs]# systemctl restart httpd

    3.php环境

[[email protected] bbs]# yum install php php-mysql -y

[[email protected] bbs]# pwd

/var/www/html/bbs

[[email protected] bbs]# cd config/

[[email protected] config]# cp -p config_ucenter_default.php config_ucenter.php 

[[email protected] config]# cp -p config_global_default.php config_global.php 

[[email protected] config]# chmod 777 -R  /var/www/html/bbs/

    4.mysql环境

[[email protected] config]# yum install mariadb mariadb-server -y

[[email protected] config]# systemctl start mariadb

[[email protected] config]# systemctl enable mariadb

[[email protected] 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!

[[email protected] config]# systemctl restart mariadb.service 

[[email protected] config]# mysql -uroot -p

Enter password: 

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

Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]>  CREATE USER [email protected] identified by ‘willis‘;   #新建用户

Query OK, 0 rows affected (0.00 sec)

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

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit

Bye

[[email protected] config]# mysql -uwillis -pwillis    #测试新建的用户

MariaDB [(none)]> quit

Bye

[[email protected] config]# systemctl restart httpd.service 

[[email protected] config]# systemctl restart mariadb.service 

LAMP论坛搭建环境完成


    5. 安装测试:










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

时间: 2024-10-16 13:43:40

实战LAMP架构+Discuz搭建bbs论坛的相关文章

实战从源码编译LAMP架构+Discuz搭建bbs论坛

实验环境:RHEL6.5  server1.example.com 172.25.254.1 实验环境:RHEL6.5 实验内容:1.MYSQL源码编译                 2.NGINX源码编译                 3.PHP源码编译                 4.搭建论坛 安装包:cmake-2.8.12.2-4.el6.x86_64.rpm               mysql-boost-5.7.11.tar.gz              gd-deve

4-源码方式基于LAMP架构搭建BBS论坛或者博客

目录 一.项目简介 二.环境准备 三.编译安装MySQL 四.编译安装Apache 五.编译安装PHP 六.后续配置 七.启动相关服务 八.源码编译软件经验总结 九.部署web应用 排错1: 排错2: 排错3: 大功告成! 课程目标 使用源码方式基于LAMP架构搭建BBS论坛或者博客 本文成功搭建2个网站,一个个人博客,一个是web界面管理mysql数据库的应用 请耐心阅读,细心操作,你也会成功! 思考:yum工具搭建lamp环境和源码包搭建的区别 rpm版本 安装方便,升级.卸载都很灵活,很难

LAMP架构网站搭建

Linux+Apache+Mysql/MariaDB+Perl/PHP/Python一组常用来搭建动态网站或者服务器的开源软件,本身都是各自独立的程序,但是因为常被放在一起使用,拥有了越来越高的兼容度,共同组成了一个强大的Web应用程序平台. 随着开源潮流的蓬勃发展,开放源代码的LAMP已经与J2EE和.Net商业软件形成三足鼎立之势,并且该软件开发的项目在软件方面的投资成本较低,因此受到整个IT界的关注. 目前LAMP架构是大多数中小企业最青睐的PHP架构选择,也是众多Linux SA喜欢选择

部署LAMP平台和搭建Discue论坛

部署LAMP平台和搭建Discue论坛 1.          实验需求: 1)     搭建Apache环境 2) 构建PHP运行环境 3) 搭建MySQL 数据库 4) 搭建Discue 论坛 2.          实验环境: Linux服务器系统版本:Red Hat Enterprise Linux 6.5  IP:192.168.10.20 WIN7系统客户机: IP: 192.168.10.1 3.      实验步骤: 基本安装操作: 上一章我们已经搭建了Apache软件和MySQ

LNMP环境搭建BBS论坛及伪静态

我们在mysql备份 LNMP环境中的数据库迁移为独立的服务器的基础上搭建BBS论坛:  [[email protected] ~]# mysql -uroot -p123456 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.5.32 MySQL Community Server (GPL) Copyright (c) 2000, 2

初建LAMP架构、搭建论坛

一.LAMP简介 目前最为成熟的一-种企业网站应用模式,可提供动态Web站点应用及开发环境1.构成组件●Linux. Apache. MySQL.PHP/Perl/Python2.LAMP的优势●成本低廉●可定制.易于开发●方便易用.安全和稳定 二.Apache介绍 三.编译安装httpd服务器 1.编译安装的优点●具有较大的自由度,功能可定制●可及时获得最新的软件版本●普遍适用于大多数Linux版本,便于移植使用2.获得Apache服务器的源码包●参考地址: htp://ttpd.apache

在lamp架构下搭建discuz论坛

成功在虚拟机中建立一个discuz论坛需要多个软件支持的,主要包括apache.MySQL.PHP.这几个软件的安装在我以前的文章中有过介绍,可以到我之前的文章中去了解 编译安装apache 编译安装MySQL数据库 编译安装PHP 搭建前准备 一台Linux虚拟机(Red Hat Enterprise 6.5) 安装好apache.MySQL.PHP等支持软件 准备discuz软件包 开始搭建论坛 进入MySQL数据库,创建名为BBS的数据库 CREATE DATABASE bbs; 把bbs

LAMP架构,搭建discuz论坛

一丶准备好基础环境1.配置好yum源并挂载2.关闭防火墙并配置本地域名二丶安装软件包PS:此处有提示没有php-devel包,可以继续安装,因为有其他包代替了三丶启动服务并查看状态PS:为了防止安装失败可以使用:systemctl restart httpd & & systemctl restart mariadb 前面安装失败时后面不会安装.四丶测试服务1.将welcome.conf移除2.编写index.php3.打开网页五丶先将之前编写的index.php移除上传discuz论坛包

centos 7.4 源码安装最新版本的lamp架构及搭建phpMyadmin

所需的压缩包,如下图: 1.安装apache服务[[email protected] ~]# tar xf apr-1.6.2.tar.gz -C /opt/ //apache插件[[email protected] ~]# tar xf apr-util-1.6.0.tar.gz -C /opt/[[email protected] ~]# yum install -y bzip2 //.tar.gz格式是默认的压缩文件格式[[email protected] ~]# tar xf httpd