技术标签: Linux linux mysql Discuz 数据库 redhat9
目录
[root@redhat9 aaa]# yum install -y php*
[root@redhat9 aaa]# yum install -y mariadb-server
链接:https://pan.baidu.com/s/1CJDiVh-QuezT0aRLWd5YxQ
提取码:axzs
[root@redhat9 aaa]# unzip Discuz_X3.5_SC_UTF8_20230316.zip
#/aaa目录是我用于存放Discuz的目录
[root@redhat9 aaa]# ll
总用量 11620
#解压后内容
-rw-r--r--. 1 root root 11766137 3月 25 11:40 Discuz_X3.5_SC_UTF8_20230316.zip
-rw-r--r--. 1 root root 4 3月 25 11:42 index.html
-rw-r--r--. 1 root root 8181 3月 17 09:42 LICENSE
-rw-r--r--. 1 root root 33294 12月 21 03:42 qqqun.png
drwxr-xr-x. 2 root root 124 3月 17 09:52 readme
-rw-r--r--. 1 root root 70226 3月 16 19:54 readme.html
drwxrwxrwx. 12 root root 4096 3月 17 09:52 upload
-rw-r--r--. 1 root root 140 2月 12 15:13 utility.html
[root@redhat9 ~]# systemctl start mariadb
[root@redhat9 ~]# mysql_secure_installation
简单参考信息
[root@redhat9 ~]# mysql_secure_installation
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
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none): #输入根的当前密码
OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Switch to unix_socket authentication [Y/n] #切换到unix_socket身份验证
Enabled successfully!
Reloading privilege tables..
... Success!
You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] #是否更改根用户密码
New password:
Re-enter new password:
Sorry, you can't use an empty password here.
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!
Normally, 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] #是否禁止远程root登录
... 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@redhat9 ~]# mysql -uroot -p123
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.003 sec)
MariaDB [(none)]> create database luntan;
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| luntan |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.000 sec)
MariaDB [(none)]> use luntan;
Database changed
MariaDB [(none)]> exit
Bye
[root@redhat9 ~]# systemctl restart mariadb.service
将/etc/httpd/conf.d/下的自己的配置文件改到你解压Discuz压缩包的目录,并在这个目录下新建一个index.html文件并写入内容,更改完成后重启服务
[root@redhat9 ~]# vim /etc/httpd/conf.d/work.conf
<VirtualHost 192.168.2.135>
servername www.openlab.com
documentroot /aaa
<Directory /aaa>
allowoverride none
require all granted
</Directory>
</VirtualHost>
[root@redhat9 ~]# cd /aaa
[root@redhat9 aaa]# ll
total 11620
-rw-r--r-- 1 root root 11766137 Mar 25 11:40 Discuz_X3.5_SC_UTF8_20230316.zip
-rw-r--r-- 1 root root 555 Mar 26 19:52 index.html #自己新建
-rw-r--r-- 1 root root 8181 Mar 17 09:42 LICENSE
-rw-r--r-- 1 root root 33294 Dec 21 03:42 qqqun.png
drwxr-xr-x 2 root root 124 Mar 17 09:52 readme
-rw-r--r-- 1 root root 70226 Mar 16 19:54 readme.html
drwxrwxrwx 12 root root 4096 Mar 17 09:52 upload #主要是要访问这个目录
-rw-r--r-- 1 root root 140 Feb 12 15:13 utility.html
[root@redhat9 aaa]# vim /aaa/index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.openlab{
font-size: 66px;
color: red;
text-align: center;
text-decoration: none;
}
</style>
</head>
<body>
<div class="openlab"><a href="http://192.168.2.135/upload">点击进入论坛!!!</div>
</body>
</html>
[root@redhat9 aaa]# systemctl restart httpd
[root@redhat9 aaa]# cd upload/
[root@redhat9 upload]# ll
total 72
-rw-r--r-- 1 root root 2869 Mar 17 09:52 admin.php
drwxr-xr-x 10 root root 149 Mar 17 09:52 api
-rw-r--r-- 1 root root 727 Mar 17 09:52 api.php
drwxr-xr-x 2 root root 23 Mar 17 09:52 archiver
drwxr-xr-x 2 root root 90 Mar 17 09:52 config
-rw-r--r-- 1 root root 1040 Mar 17 09:52 connect.php
-rw-r--r-- 1 root root 106 Mar 17 09:52 crossdomain.xml
drwxr-xr-x 12 root root 178 Mar 17 09:52 data
-rw-r--r-- 1 root root 5558 Mar 17 09:42 favicon.ico
-rw-r--r-- 1 root root 2357 Mar 17 09:52 forum.php
-rw-r--r-- 1 root root 906 Mar 17 09:52 group.php
-rw-r--r-- 1 root root 1325 Mar 17 09:52 home.php
-rw-r--r-- 1 root root 6912 Mar 17 09:52 index.php
drwxr-xr-x 5 root root 64 Mar 17 09:52 install
-rw-r--r-- 1 root root 998 Mar 17 09:52 member.php
-rw-r--r-- 1 root root 2410 Mar 17 09:52 misc.php
-rw-r--r-- 1 root root 1790 Mar 17 09:52 plugin.php
-rw-r--r-- 1 root root 1086 Mar 17 09:52 portal.php
-rw-r--r-- 1 root root 639 Mar 17 09:52 robots.txt
-rw-r--r-- 1 root root 1755 Mar 17 09:52 search.php
drwxr-xr-x 10 root root 168 Mar 17 09:52 source
drwxr-xr-x 7 root root 86 Mar 17 09:52 static
drwxr-xr-x 3 root root 38 Mar 17 09:52 template
drwxr-xr-x 8 root root 146 Mar 17 09:52 uc_client
drwxr-xr-x 13 root root 4096 Mar 17 09:52 uc_server
[root@redhat9 upload]# chmod +777 -R config/ data/ uc*
全新安装
填写好你自己的信息
之后就可以以管理员身份登录或者注册新用户了
下载mailx和postfix
[root@localhost ~]# yum install -y postfix
[root@localhost ~]# yum install -y mailx
[root@localhost ~]# systemctl start postfix
直接使用echo 配合mail进行发送
echo 内容 | mail -s 主题 用户,邮件一般放在/var/spool/mail
部分参数:
-a 添加附件
-b 邮件的秘密抄送列表,后面跟邮箱地址,邮箱地址使用逗号隔开
-c 邮件的抄送列表
-s 邮件的主题,也就是这封邮件的标题
[root@localhost ~]# echo nihao | mail -s "nihao" sulibao@localhost
[root@localhost ~]# cd /var/spool/mail/
[root@localhost mail]# ll
total 8
-rw-------. 1 root root 1704 Apr 5 16:45 root
-rw-rw----. 1 rpc mail 0 Apr 5 13:33 rpc
-rw-rw----. 1 sulibao mail 846 Apr 5 16:47 sulibao
[root@localhost mail]# cat sulibao
From [email protected] Wed Apr 5 16:47:42 2023
Return-Path: <[email protected]>
Received: from localhost.localdomain (localhost [127.0.0.1])
by localhost.localdomain (8.15.2/8.15.2) with ESMTPS id 3358lgOR039176
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT)
for <[email protected]>; Wed, 5 Apr 2023 16:47:42 +0800
Received: (from root@localhost)
by localhost.localdomain (8.15.2/8.15.2/Submit) id 3358lgpM039175
for sulibao; Wed, 5 Apr 2023 16:47:42 +0800
From: root <[email protected]>
Message-Id: <[email protected]>
Date: Wed, 05 Apr 2023 16:47:42 +0800
To: [email protected]
Subject: nihao
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
nihao
[root@localhost ~]# vim /etc/mail.rc
#最后添加配置文件
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb
set smtp=smtps://smtp.163.com:465
set smtp-auth=login
set [email protected]
set smtp-auth-password=xxxxxx
set [email protected]
#开启ssl
#set ssl-verify=ignore
#输入证书目录,下方为centos系统证书默认位置,也自行生成证书并指定
#set nss-config-dir=/etc/pki/nssdb
# 下方填入你配置的第三方smtp服务器的地址及端口,如果使用的是云服务器,安全组需要开放465端口(入口和出口)
#set smtp=smtps://smtp.163.com:465 #填写官方网址
# 认证方式
#set smtp-auth=login
# 下方输入用于发送邮件的邮箱账号
#set smtp-auth-user=
# 下方输入上方邮箱的客户端授权码
#set smtp-auth-password=
# 设置发信人邮箱和昵称
#set from=
后将授权码写上即可
-a指定附件
[root@localhost mail]# echo hello | mail -a /aaa/ade.txt -s "hello" [email protected]
[root@localhost ~]# cat /aaa/ade.txt
666
[root@localhost ~]# echo hello | mail -a /aaa/ade.txt -s "hello" [email protected]
[root@localhost ~]# echo hello | mail -a /aaa/ade.txt -s "hello" [email protected]
文章浏览阅读1.6k次。安装配置gi、安装数据库软件、dbca建库见下:http://blog.csdn.net/kadwf123/article/details/784299611、检查集群节点及状态:[root@rac2 ~]# olsnodes -srac1 Activerac2 Activerac3 Activerac4 Active[root@rac2 ~]_12c查看crs状态
文章浏览阅读1.3w次,点赞45次,收藏99次。我个人用的是anaconda3的一个python集成环境,自带jupyter notebook,但在我打开jupyter notebook界面后,却找不到对应的虚拟环境,原来是jupyter notebook只是通用于下载anaconda时自带的环境,其他环境要想使用必须手动下载一些库:1.首先进入到自己创建的虚拟环境(pytorch是虚拟环境的名字)activate pytorch2.在该环境下下载这个库conda install ipykernelconda install nb__jupyter没有pytorch环境
文章浏览阅读5.2k次,点赞19次,收藏28次。选择scoop纯属意外,也是无奈,因为电脑用户被锁了管理员权限,所有exe安装程序都无法安装,只可以用绿色软件,最后被我发现scoop,省去了到处下载XXX绿色版的烦恼,当然scoop里需要管理员权限的软件也跟我无缘了(譬如everything)。推荐添加dorado这个bucket镜像,里面很多中文软件,但是部分国外的软件下载地址在github,可能无法下载。以上两个是官方bucket的国内镜像,所有软件建议优先从这里下载。上面可以看到很多bucket以及软件数。如果官网登陆不了可以试一下以下方式。_scoop-cn
文章浏览阅读4.5k次,点赞2次,收藏3次。首先要有一个color-picker组件 <el-color-picker v-model="headcolor"></el-color-picker>在data里面data() { return {headcolor: ’ #278add ’ //这里可以选择一个默认的颜色} }然后在你想要改变颜色的地方用v-bind绑定就好了,例如:这里的:sty..._vue el-color-picker
文章浏览阅读640次。基于芯片日益增长的问题,所以内核开发者们引入了新的方法,就是在内核中只保留函数,而数据则不包含,由用户(应用程序员)自己把数据按照规定的格式编写,并放在约定的地方,为了不占用过多的内存,还要求数据以根精简的方式编写。boot启动时,传参给内核,告诉内核设备树文件和kernel的位置,内核启动时根据地址去找到设备树文件,再利用专用的编译器去反编译dtb文件,将dtb还原成数据结构,以供驱动的函数去调用。firmware是三星的一个固件的设备信息,因为找不到固件,所以内核启动不成功。_exynos 4412 刷机
文章浏览阅读2w次,点赞24次,收藏42次。Linux系统配置jdkLinux学习教程,Linux入门教程(超详细)_linux配置jdk
文章浏览阅读3.3k次,点赞5次,收藏19次。xlabel('\delta');ylabel('AUC');具体符号的对照表参照下图:_matlab微米怎么输入
文章浏览阅读119次。顺序读写指的是按照文件中数据的顺序进行读取或写入。对于文本文件,可以使用fgets、fputs、fscanf、fprintf等函数进行顺序读写。在C语言中,对文件的操作通常涉及文件的打开、读写以及关闭。文件的打开使用fopen函数,而关闭则使用fclose函数。在C语言中,可以使用fread和fwrite函数进行二进制读写。 Biaoge 于2024-03-09 23:51发布 阅读量:7 ️文章类型:【 C语言程序设计 】在C语言中,用于打开文件的函数是____,用于关闭文件的函数是____。
文章浏览阅读3.4k次,点赞2次,收藏13次。跟随鼠标移动的粒子以grid(SOP)为partical(SOP)的资源模板,调整后连接【Geo组合+point spirit(MAT)】,在连接【feedback组合】适当调整。影响粒子动态的节点【metaball(SOP)+force(SOP)】添加mouse in(CHOP)鼠标位置到metaball的坐标,实现鼠标影响。..._touchdesigner怎么让一个模型跟着鼠标移动
文章浏览阅读178次。项目运行环境配置:Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。项目技术:Springboot + mybatis + Maven +mysql5.7或8.0+html+css+js等等组成,B/S模式 + Maven管理等等。环境需要1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。_基于java技术的停车场管理系统实现与设计
文章浏览阅读3.5k次。前言对于MediaPlayer播放器的源码分析内容相对来说比较多,会从Java-&amp;gt;Jni-&amp;gt;C/C++慢慢分析,后面会慢慢更新。另外,博客只作为自己学习记录的一种方式,对于其他的不过多的评论。MediaPlayerDemopublic class MainActivity extends AppCompatActivity implements SurfaceHolder.Cal..._android多媒体播放源码分析 时序图
文章浏览阅读2.4k次,点赞41次,收藏13次。java 数据结构与算法 ——快速排序法_快速排序法