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