创建用户
1.开启个人用户主页功能
[root@bogon 130]# vim /etc/httpd/conf.d/userdir.conf
UserDir disabled //开启
UserDir public_html
2. 用户主目录权限
创建用户
[root@bogon 130]# useradd tom
创建主目录和默认主页
[root@bogon 130]# cd /home/tom/
[root@bogon tom]# mkdir public_html
[root@bogon tom]# echo this is userdir > public_html/index.html
[root@bogon tom]# ll -d /home/tom/
设置权限
[root@bogon tom]# chmod o+rx /home/tom/ -R
重启服务
[root@bogon tom]# systemctl restart httpd
设置用户密码
[root@bogon tom]# htpasswd -c /etc/httpd/users tom
搭建论坛
安装的目录
[root@bogon 128]# cd /www/128/
[root@bogon 128]# yum install lrzsz
[root@bogon 128]# rz
复制包
[root@bogon 128]# unzip Discuz_X3.4_SC_UTF8_0101.zip
[root@bogon 128]# yum install mariadb-server -y
[root@bogon 128]# systemctl restart mariadb
初始化密码:redhat
[root@bogon 128]# mysql_secure_installation
登录
[root@bogon 128]# mysql -uroot -predhat
显示数据库
show databases;
创建数据库
MariaDB [(none)]> create database luntan;
退出
MariaDB [luntan]> exit
安装php
root@bogon 128]# yum install php* -y
重启服务
[root@bogon 128]# systemctl restart mariadb.service
查看路径
[root@bogon dir_SC_UTF8]# ll
[root@bogon dir_SC_UTF8]# cd dir_SC_UTF8/
浏览器加载地址
进入目录下
[root@bogon dir_SC_UTF8]# cd upload/
[root@bogon dir_SC_UTF8]# ll
修改权限
[root@bogon upload]# chmod 777 uc_* config/ data/ -R
http://192.168.1.128/dir_SC_UTF8/upload/