Web 服务搭建
[root@localhost ~]#yum install httpd -y
[root@localhost ~]#cd /var/www/htm1/
[rootalocalhost html]#echo 江停严峫 >index.html
[root@localhost html]#setenforce 0 #将 SELinux 模式设置为宽容模式,不强制执行安全策略
[root@localhost html]#getenforce #获取当前 SELinux 的强制模式状态
Permissive
[root@localhost html]#systemctl --now disable firewalld.service#关防火墙
[root@localhost html]#systemctl --now start httpd #启动httpd服务
打开 Windows 系统下的命令提示符界面 输入
curl IP地址
论坛搭建
[root@localhost~]#systemctl--now disable firewalld.service #关闭防火墙
[root@localhost ~]#setenforce 0 #关闭selinux
[root@localhost ~]#mariadb*httpd #下载软件php*
[rootalocalhost ~]yum install php*mariadb*httpd -y #将源码包放到var/www/html/解压
[root@localhost ~]#cd /var/www/html/
[root@localhost html]# unzip Discuz_x3.5_SC_UTF8_20230520.zip
[root@localhost html ]#systemctl start httpd #启动httpd服务
[root@localhost html]#cd /var/www/htm1/upload #修限权限
[root@localhost upload]# chmod 777 -R./config ./data ./uc_*
[root@localhost upload]#systemctl restart mariadb #重启mariadb服务
[root@localhost upload]#msql
MariaDB [(none)]>create database luntan;
MariaDB [(none)]>show databases;
MariaDB[(none)]>alter user root'@'localhost'identified by 'mypasswd123';
MariaDB [(none)]>exit
Bye
#win浏览器测试:http://ip 地址/upload/
网盘搭建
[root@localhost nextcloud]# mount /dev/sr0 /mnt
[root@localhost nextcloud]# systemctl stop firewalld.service
[root@localhost nextcloud]# setenforce 0
[root@localhost nextcloud]# yum install httpd
[root@localhost nextcloud]# yum install php php-fpm
[root@localhost nextcloud]# systemctl start httpd
[root@localhost html]# vim /etc/httpd/conf/httpd.conf
[root@localhost /]# cd /var/www/html/
[root@localhost html]# tar -xf latest.tar.bz2
[root@localhost html]# chown apache:apache /var/www/html/nextcloud/ -R
[root@localhost html]# yum install php-pecl-zip.x86_64 php-gd.x86_64
[root@localhost html]# yum install mariadb-server -y
[root@localhost html]# systemctl start mariadb.service
[root@localhost html]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.16-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> alter user root@localhost identified by '123';
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> create database wangpan;
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> show databases;
MariaDB [(none)]>exit
[root@localhost html]# yum install php-mysqlnd.x86_64
#win浏览器测试:http://192.168.50.130:89/nextcloud