当前位置: 首页 > news >正文

想做一个网站平台怎么做的关键词搜索排行榜

想做一个网站平台怎么做的,关键词搜索排行榜,最新电视剧免费观看网址,网站开发的进度表目录 实验分析 环境拓扑结构 项目需求 主机环境描述 实验步骤 一、密钥互信和主机名更改 二、DNS 三、NGINX 四、MARIADB 五、NFS 六、NTP 七、论坛服务 结果展示及痛点解答 实验分析 环境拓扑结构 项目需求 1. 172.25.250.101 主机上的 Web 服务要求提供 www.ex…

目录

实验分析

环境拓扑结构

项目需求

主机环境描述

实验步骤

一、密钥互信和主机名更改

二、DNS

三、NGINX

四、MARIADB

五、NFS

六、NTP

七、论坛服务

结果展示及痛点解答


实验分析

环境拓扑结构

项目需求

 1. 172.25.250.101 主机上的 Web 服务要求提供 www.exam.com Web站点,该站点在任何路由可达 的主机上被访问,页面内容显示为 "Hello,Welcome to www.exam.com !",并提供 content.exam.com/yum/AppStream和content.exam.com/yum/BaseOS URL 作为网络仓库供所 有主机使用。

2. 172.25.250.102 主机提供基于Chronyd 的 NTP 服务将本主机作为时间服务器,对外提供 NTP 服 务,并设置本服务器为 3 层。

3. 172.25.250.103 主机提供的MySQL 数据库服务,要求使用需求1中提供的仓库进行安装,并将数据 库密码设定为 redhat。创建名称为 bbs 的数据库提供给论坛服务使用。

4. 172.25.250.104 主机提供 NFS 服务,该服务将导出本地的 /bbs 目录作为论坛数据目录,该导出指 定只能论坛所在主机使用,并且开机自动挂载。

5. 172.25.250.105 主机提供 DNS 服务,该服务需要提供对项目中所有主机名的正向和反向解析,并 要求所有服务器的 DNS 配置为该 DNS 服务器。

6. 172.25.250.106 主机提供基于 Discuz 的论坛服务,该论坛服务使用 172.25.250.103 主机提供的数 据库 bbs,使用 172.25.250.104 主机提供的 NFS 作为论坛数据目录,并开机挂载。并使用 172.25.250.101 主机提供的网络仓库,172.25.250.102 主机提供的 NTP 服务,172.25.250.105 主 机提供的 DNS 服务。

7. 所有服务器的防火墙服务和 SELinux 服务必须开启。

8. 所有服务器提供的网络服务必须在系统重启后仍然可以正常提供服务。

9. 根据所有服务的相关代码,编写一键部署shell脚本,最基础的功能为 通过执行该脚本实现所有上面 所有需求,要求脚本必须在 servera.exam.com 主机上运行,并支持多次运行。

主机环境描述

主机名主机地址 需要提供的服务
content.exam.com172.25.250.101提供基于 httpd/nginx 的 YUM仓库服务
ntp.exam.com172.25.250.102提供基于Chronyd 的 NTP 服务
mysql.exam.com172.25.250.103提供基于 MySQL 的数据库服务
nfs.exam.com 172.25.250.104提供基于 NFS 的网络文件系统服务
dns.exam.com  172.25.250.105提供基于 NFS 的网络文件系统服务
bbs.exam.com172.25.250.106提供基于 Discuz 的论坛服务

注意:

172.25.250.101-172.25.250.105 共 5 个 IP 地址由servera.exam.com服务器进行提供。 172.25.250.106 由 serverb.exam.com 服务器进行提供。

实验步骤

一、密钥互信和主机名更改

#!/bin/bash
#密钥互信
echo "" > /etc/yum.repos.d/rpm.repo
cat > /etc/yum.repos.d/rpm.repo << EOF
[haha]
name=baseos
baseurl=/mnt/BaseOS
gpgcheck=0
[xixi]
name=appstream
baseurl=/mnt/AppStream
gpgcheck=0
EOFmount /dev/sr0 /mnt    &>  /dev/null
xs=$(ls  /mnt/GPL)  &> /dev/null
if  [ $xs == "/mnt/GPL" ]thenecho "挂载成功"elseecho "挂载失败"exit 2
fils /root/.ssh/id_rsa &> /dev/null
yz=$(echo $?)if [ $yz -eq 0 ]
thenecho "互信已经完成"
elsessh-keygen -t ed25519 -C "comment" -f /root/.ssh/id_rsa -N ''
fimkdir -p /root/.ssh &> /dev/null
chmod 700 /root/.ssh &> /dev/null
touch /root/.ssh/authorized_keys &> /dev/null
chmod 600 /root/.ssh/authorized_keys &> /dev/nullif ! command -v sshpass &> /dev/null
thenyum install -y sshpass &> /dev/null
fisshpass -p "redhat" ssh-copy-id -i /root/.ssh/id_rsa.pub root@172.25.250.106
yz1=$(echo $?)
if [ $yz1 -eq 0 ]
thenecho "连接中......."
elseecho "互信失败"exit 1
fissh root@172.25.250.106 <<'ALLEOF'
hostnamectl set-hostname serverb.exam.com
nmcli connection modify ens160 ipv4.addresses 172.25.250.106/24 ipv4.gateway 172.25.250.2 ipv4.dns 172.25.250.105 ipv4.method manual connection.autoconnect yes
nmcli connection up ens160
echo "Modified successfully"
ALLEOFls /root/.ssh/authorized_keys &> /dev/null
yz2=$(echo $?)
if [ $yz2 -eq 0 ]
thenecho "互信完成OK"
elsescp root@172.25.250.106:/root/.ssh/id_rsa.pub /root/.ssh/authorized_keys &> /dev/nullecho "密钥发送"
fihostnamectl set-hostname servera.exam.com  &> /dev/null

 注意:密钥互信的前提是两台主机可以互相登录并且之前没有做过互信,互信使用了sshpass来免密登录,所以需要提前配置仓库下载,密码是106主机上的登录密码,请自行确认密码是否有误。


二、DNS

#!/bin/bash
#dns
nmcli connection modify ens160 +ipv4.addresses 172.25.250.101/24
nmcli connection modify ens160 +ipv4.addresses 172.25.250.102/24
nmcli connection modify ens160 +ipv4.addresses 172.25.250.103/24
nmcli connection modify ens160 +ipv4.addresses 172.25.250.104/24
nmcli connection modify ens160 +ipv4.addresses 172.25.250.105/24
nmcli connection modify ens160 ipv4.dns 172.25.250.105 ipv4.method manual connection.autoconnect yesif [ $? -eq 0 ]
thenecho "网卡配置成功"elseecho "网卡配置失败"exit 2
fi
nmcli connection up ens160 &> /dev/nullpzdns=$(dig | grep SERVER: | awk -F# '{ print $1 }' | awk -F: '{ print $2 }')
if [ "$pzdns" == " 172.25.250.105" ]
thenecho "dns成功修改为172.25.250.105"
elseecho "dns修改失败"
fiecho "" > /etc/yum.repos.d/rpm.repo
cat > /etc/yum.repos.d/rpm.repo << EOF
[haha]
name=baseos
baseurl=/mnt/BaseOS
gpgcheck=0
[xixi]
name=appstream
baseurl=/mnt/AppStream
gpgcheck=0
EOFmount /dev/sr0 /mnt    &>  /dev/null
xs2=$(ls  /mnt/GPL)  &> /dev/null
if  [ $xs2 == "/mnt/GPL" ]thenecho "挂载成功"elseecho "挂载失败"exit 2
fidnf install bind -y  &> /dev/null
if [ $? -eq 0 ]
thenrpm -qa | grep bind &> /dev/nullif [ $? -eq 0 ]thenecho "bind下载成功"elseecho "bind下载不成功"fi
elseecho "bind下载失败"
fisystemctl enable named &> /dev/null
systemctl start named  &> /dev/null
if [ $? -eq 0 ]
thenBINDSTAT=$(systemctl is-active named)if [ $BINDSTAT == "active" ]thenecho "bind启动成功"elseecho "bind启动失败"fi
ficat > /etc/named.conf <<EOF
options {listen-on port 53 { 172.25.250.105; };directory       "/var/named";
};
zone "exam.com" IN {type master;file "named.exam";
};
zone "172.25.250.in-addr.arpa" IN {type master;file "named.fanxiang";
};
EOFcat > /var/named/named.exam <<EOF
\$TTL 1D
@ IN SOA @ admin.exam.com. (01D1D2D1D)IN      NS      ns.exam.com.IN      MX      10 mail.exam.com.
ns      IN      A       172.25.250.99
content IN      A       172.25.250.101
www     IN      A       172.25.250.101
ntp     IN      A       172.25.250.102
mysql   IN      A       172.25.250.103
dns     IN      A       172.25.250.105
nfs     IN      A       172.25.250.104
bbs     IN      A       172.25.250.106
EOFcat  >   /var/named/named.fanxiang  <<EOF
\$TTL   1D
@   IN   SOA    @   admin.exam.com. (11111)IN      NS      dns.exam.com.
105     IN      PTR     dns.exam.com.
101     IN      PTR     www.exam.com.
101     IN      PTR     content.exam.com.
102     IN      PTR     ntp.exam.com.
103     IN      PTR     mysql.exam.com.
104     IN      PTR     nfs.exam.com.
106     IN      PTR     bbs.exam.com.
EOFsystemctl enable named --now &> /dev/null
fhq_dns=`firewall-cmd --list-services | grep -o  dns`
if [ -z $fhq_dns ]
then
firewall-cmd --permanent --add-service=dns &> /dev/null
firewall-cmd --reload   &> /dev/null
elseecho "dns防火墙配置成功"
fisystemctl restart named &> /dev/null
if [ $? -eq 0 ]
thenecho "dns重启成功,dns配置完成"
elseecho "dns重启失败"
fi

注意:网卡配置时,查看自己的网卡名称是否为ens160,不是则更改;在DNS配置文件写入时,对于定义变量的$,在其前面要加上\防止它不能写入。


三、NGINX

#NGINX
cat > /etc/yum.repos.d/rpm.repo << EOF
[haha]
name=baseos
baseurl=/mnt/BaseOS
gpgcheck=0
[xixi]
name=appstream
baseurl=/mnt/AppStream
gpgcheck=0
EOF
mount /dev/sr0 /mnt    &>  /dev/null
xs3=$(ls  /mnt/GPL)  &> /dev/null
if  [ $xs3 == "/mnt/GPL" ]thenecho "挂载成功,本地源配置成功"elseecho "挂载失败"exit 2
fi
dnf install nginx -y &> /dev/null
if [ $? -eq 0 ]
thenrpm -qa | grep nginx &> /dev/nullif [ $? -eq 0 ]thenecho "nginx下载成功"elseecho "nginx下载不成功"fi
elseecho "nginx下载失败"
fisystemctl enable nginx &> /dev/null
systemctl start nginx &> /dev/null
if [ $? -eq 0 ]
thenNGINXSTAT=$(systemctl is-active nginx)if [ $NGINXSTAT == "active" ]thenecho "nginx启动成功"elseecho "nginx启动失败"fi
elseecho "nginx启动失败"
ficat > /etc/nginx/nginx.conf   << EOFuser nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {worker_connections 1024;
}
http {log_format  main  '\$remote_addr - \$remote_user \$time_local "\$request" ''\$status \$body_bytes_sent "\$http_referer" ''"\$http_user_agent" "\$http_x_forwarded_for"';access_log  /var/log/nginx/access.log  main;sendfile            on;tcp_nopush          on;tcp_nodelay         on;keepalive_timeout   65;types_hash_max_size 4096;include             /etc/nginx/mime.types;default_type        application/octet-stream;include /etc/nginx/conf.d/*.conf;
server {listen 172.25.250.101;server_name www.exam.com;root /www;index index.html index.htm;location / {try_files \$uri \$uri/ =404;allow all;}
location /www/ {deny all;allow all;internal;}location /www/yum/ {allow all;deny all;allow all;}
}
}
EOFecho "Hello,Welcome to www.exam.com!" > /www/index.htmlsystemctl start firewalld.service &> /dev/null
fhq_nginx=`firewall-cmd --list-services | grep -o  http`
if [ -z $fhq_nginx ]
then
firewall-cmd --permanent --add-service=http &> /dev/null
firewall-cmd --reload   &> /dev/null
echo "nginx的防火墙配置成功"
else
echo "nginx的防火墙配置成功"
fichcon_http=`ls -Zl /www/index.html | awk '{print $5}' | awk -F: '{print $3}'`
if [ "$chcon_http" = "httpd_sys_content_t" ]
thenecho "标签修改成功"
else
chcon -t httpd_sys_content_t /www/index.html
fiyum="/www/yum"
if [ -d   $yum ]
thenecho "yum文件已经存在,不需要创建了"
elsemkdir -p /www/yum &> /dev/nullecho "yum文件已经创建"
fisystemctl restart nginx &> /dev/null
NGPAGE=$(curl  -s   172.25.250.101)
if [ "$NGPAGE" == "Hello,Welcome to www.exam.com!" ]
thenecho "nginx服务完成"
elseecho "nginx服务出现错误"
fimount=`df -h | grep /dev/sr0 | awk '{print $6}'`
if [ $mount = /www/yum ]
thenecho "挂载成功"
elif [ -z $mount ]; thenumount /dev/sr0 /mnt &> /dev/nullmount /dev/sr0 /www/yum  &> /dev/null
elseumount /dev/sr0    &> /dev/nullmount /dev/sr0 /www/yum &> /dev/null
ficat > /etc/yum.repos.d/rpm.repo << EOF
[baseos]
name=baseos
baseurl=http://content.exam.com/yum/BaseOS
gpgcheck=0
[appstream]
name=appstream
baseurl=http://content.exam.com/yum/AppStream
gpgcheck=0
EOFdnf install -y vim net-tools bash-com*  &> /dev/null
if [ $? -eq 0 ]
thenecho "yum源配置成功"
elseecho "yum源配置失败"
fi

四、MARIADB

#MARIADB
echo "" > /etc/yum.repos.d/rpm.repo
cat > /etc/yum.repos.d/rpm.repo << EOF
[baseos]
name=baseos
baseurl=http://content.exam.com/yum/BaseOS
gpgcheck=0
[appstream]
name=appstream
baseurl=http://content.exam.com/yum/AppStream
gpgcheck=0
EOFmount /dev/sr0 /mnt    &>  /dev/null
xs4=$(ls  /mnt/GPL)  &> /dev/null
if  [ $xs4 == "/mnt/GPL" ]thenecho "挂载成功"elseecho "挂载失败"exit 2
fiyum install mariadb-server -y  &> /dev/null
if [ $? -eq 0 ]
thenrpm -qa | grep mariadb &> /dev/nullif [ $? -eq 0 ]thenecho "mariadb下载成功"elseecho "mariadb下载不成功"fi
elseecho "mariadb下载失败"
fisystemctl enable mariadb &> /dev/null
systemctl start mariadb  &> /dev/null
if [ $? -eq 0 ]
thenMARSTAT=$(systemctl is-active mariadb)if [ $MARSTAT == "active" ]thenecho "mariadb启动成功"elseecho "mariadb启动失败"fi
fimysql -u root -predhat  << EOF
use mysql;
grant all privileges on *.* to 'root'@'%' identified by 'redhat';
CREATE DATABASE IF NOT EXISTS bbs;
FLUSH PRIVILEGES;
\q;
EOFif ! firewall-cmd --quiet --query-port=3306/tcp
thenfirewall-cmd --permanent --add-port=3306/tcpecho "3306端口已成功添加到防火墙规则"
elseecho "3306端口已经在防火墙规则中,无需重复添加"
fiif ! firewall-cmd --quiet --query-service=mysql
thenfirewall-cmd --permanent --add-service=mysqlecho "MYSQL服务已成功添加到防火墙规则"
elseecho "MYSQL服务已经在防火墙规则中,无需重复添加"
fi
firewall-cmd --reload &>/dev/null

注意:在下载mariadb之前请确保主机没有关于mysql的服务,如果有的话可能导致mariadb无法下载和启动;由于mariadb是默认不开启远程登录的,所以需要在数据库开启远程登录


五、NFS

#NFS
echo "" > /etc/yum.repos.d/rpm.repo
cat > /etc/yum.repos.d/rpm.repo << EOF
[baseos]
name=baseos
baseurl=http://content.exam.com/yum/BaseOS
gpgcheck=0
[appstream]
name=appstream
baseurl=http://content.exam.com/yum/AppStream
gpgcheck=0
EOF
mount /dev/sr0 /mnt    &>  /dev/null
xs5=$(ls  /mnt/GPL)  &> /dev/null
if  [ $xs5 == "/mnt/GPL" ]thenecho "挂载成功"elseecho "挂载失败"exit 2
fidnf install nfs-utils -y  &> /dev/null
if [ $? -eq 0 ]
thenrpm -qa | grep nfs &> /dev/nullif [ $? -eq 0 ]thenecho "nfs下载成功"elseecho "nfs下载不成功"fi
elseecho "nfs下载失败"
fisystemctl enable nfs-server  &> /dev/null
systemctl start nfs-server
if [ $? -eq 0 ]
thenNFSSTAT=$(systemctl is-active nfs)if [ $NFSSTAT == "inactive" ]thenecho "nfs启动成功"elseecho "nfs启动失败"fi
fics="/bbs"
if [ -d   $cs ]
thenecho "nfs文件已经存在,不需要创建了"
elsemkdir /bbs &> /dev/nullecho "nfs文件已经创建"
fichmod 777 /bbs/ -R
cat > /etc/exports << EOF
/bbs 172.25.250.106(rw)
EOFsystemctl start firewalld.service &> /dev/null
fhq_nfs=`firewall-cmd --list-services | grep -o  nfs`
if [ -z $fhq_nfs ]
then
firewall-cmd --permanent --add-service=mountd  &> /dev/null
firewall-cmd --permanent --add-service=rpc-bind &> /dev/null
firewall-cmd --permanent --add-service=nfs &> /dev/null
firewall-cmd --reload   &> /dev/null
echo "nfs的防火墙配置成功"
else
echo "nfs的防火墙配置成功"
fisystemctl restart nfs-server
if [ $? -eq 0 ]
thenecho "nfs重启成功"
elseecho "nfs重启失败"
fi

六、NTP

#NTP
echo "" > /etc/yum.repos.d/rpm.repo
cat > /etc/yum.repos.d/rpm.repo << EOF
[baseos]
name=baseos
baseurl=http://content.exam.com/yum/BaseOS
gpgcheck=0
[appstream]
name=appstream
baseurl=http://content.exam.com/yum/AppStream
gpgcheck=0
EOF
mount /dev/sr0 /mnt    &>  /dev/null
xs6=$(ls  /mnt/GPL)  &> /dev/null
if  [ $xs6 == "/mnt/GPL" ]thenecho "挂载成功"elseecho "挂载失败"exit 2
firpm -qa | grep chrony &> /dev/null
if [ $? -eq 0 ]thenecho "chrony已经可以使用"elsednf install chrony -y &> /dev/nullif [ $? -eq 0 ]thenecho "chrony下载成功"elseecho "chrony下载不成功"fi
fisystemctl enable chrony &> /dev/null
systemctl start chrony  &> /dev/null
if [ $? -eq 0 ]
thenCHRONYSTAT=$(systemctl is-active named)if [ $CHRONYSTAT == "inactive" ]thenecho "chrony启动成功"elseecho "chrony启动失败"fi
fiif grep -q '^#pool 2.rhel.pool.ntp.org iburst' /etc/chrony.conf
thenecho "chrony——pool 2.rhel.pool.ntp.org iburst已被注释,无需修改"
elsesudo sed -i '/pool 2.rhel.pool.ntp.org iburst/s/^/#/' /etc/chrony.confecho "chrony——已成功注释pool 2.rhel.pool.ntp.org iburst"
fi
chrony_server="server 172.25.250.102 iburst"if grep -q "$chrony_server" /etc/chrony.conf
thenecho "chrony——server 172.25.250.102 iburst已存在,无需添加"
elsesudo sed -i '$a'"$chrony_server" /etc/chrony.confecho "chrony——server 172.25.250.102 iburst已成功添加!"
fi
chrony_allow="allow 172.25.250.0/24"if grep -q "$chrony_allow" /etc/chrony.conf
thenecho "chrony——allow 172.25.250.0/24已存在,无需添加"
elsesudo sed -i '$a'"$chrony_allow" /etc/chrony.confecho "chrony——allow 172.25.250.0/24已成功添加"
fi
chrony_stratum="local stratum 3"if grep -q "$chrony_stratum" /etc/chrony.conf
thenecho "chrony——local stratum 3已存在,无需添加"
elsesudo sed -i '$a'"$chrony_stratum" /etc/chrony.confecho "chrony——local stratum 3已成功添加"
fi
sudo sed -i '/^#log measurements statistics tracking/s/^#//' /etc/chrony.confsystemctl restart chronyd.service
if [ $? -eq 0 ]
thenecho "chrony重启成功"
elseecho "chrony重启失败"
fisystemctl enable --now cockpit.socketfhq_ntp=`firewall-cmd --list-services | grep -o  ntp`
if [ -z $fhq_ntp ]
then
firewall-cmd --permanent --add-service=ntp &> /dev/null
firewall-cmd --reload   &> /dev/null
echo "ntp的防火墙配置成功"
else
echo "ntp的防火墙配置成功"
fissh root@172.25.250.106 << ALLEOF
if grep -q '^#pool 2.rhel.pool.ntp.org iburst' /etc/chrony.conf
thenecho "chrony——pool 2.rhel.pool.ntp.org iburst已被注释,无需修改"
elsesudo sed -i '/pool 2.rhel.pool.ntp.org iburst/s/^/#/' /etc/chrony.confecho "chrony——已成功注释pool 2.rhel.pool.ntp.org iburst"
fi
chrony_server="server 172.25.250.102 iburst"
if grep -q "\$chrony_server" /etc/chrony.conf
thenecho "chrony——server 172.25.250.102 iburst已存在,无需添加"
elsesudo sed -i '\$a'"\$chrony_server" /etc/chrony.confecho "chrony——server 172.25.250.102 iburst已成功添加"
fi
sudo sed -i '/^#log measurements statistics tracking/s/^#//' /etc/chrony.conffhq_ntp1=`firewall-cmd --list-services | grep -o  ntp`
if [ -z \$fhq_ntp1 ] 
then
firewall-cmd --permanent --add-service=ntp &> /dev/null
firewall-cmd --reload   &> /dev/null
echo "ntp的防火墙配置成功"
else
echo "ntp的防火墙配置成功"
fi
ALLEOF

 

七、论坛服务

#luntan
ssh root@172.25.250.106   << ALLEOF
rm -rf /etc/yum.repos.d/*
cat << EOFA > /etc/yum.repos.d/base.repo
[BaseOS]
name=BaseOS
baseurl=/mnt/BaseOS
enabled=1
gpgcheck=0
[Appstream]
name=AppStream
baseurl=/mnt/AppStream
enabled=1
gpgcheck=0
EOFAmount /dev/sr0 /mnt & > /dev/null
dnf install chrony nfs-utils  bind bind-utils php* unzip nginx -y &> /dev/null
mkdir -p /var/www/html/bbs & > /dev/null
mount 172.25.250.104:/bbs /var/www/html/bbs  & > /dev/null
echo '172.25.250.104:/bbs /var/www/html/bbs       nfs   defaults  0 0' >> /etc/fstab
mount -a & > /dev/null
systemctl restart nfs-server  & > /dev/null
cd /var/www/html/bbs
if [ -d "upload" ]
thenecho "Discuz压缩包已解压"
elserm -rf *unzip /root/Discuz_X3.5_SC_UTF8_20230520.zipcdchmod -R 777 /var/www/html/bbs
firm -rf  /etc/nginx/conf.d/* & > /dev/nullcat > /etc/nginx/conf.d/php-fpm.conf << 'EOFA'
upstream php-fpm {server unix:/run/php-fpm/www.sock;
}
EOFAcat > /etc/nginx/conf.d/vhost.conf << 'EOFR'
server {listen 80;server_name bbs.exam.com; # 替换为你的域名root /var/www/html/bbs;       # Discuz源码目录index index.php index.html index.htm;location / {try_files \$uri \$uri/ /index.php?\$args;}
location ~ \.php$ {fastcgi_pass unix:/run/php-fpm/www.sock; fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;include fastcgi_params;}location ~ /\.ht {deny all;}
}
EOFRcat >> /etc/resolv.conf << EOFC
search localdomain
nameserver 172.25.250.105
EOFCfirewall-cmd --permanent --add-service=http &> /dev/null
if [ $? -eq 0 ]
thenecho "HTTP service added to firewall successfully."
elseecho "Failed to add HTTP service to firewall."exit 1
fifirewall-cmd --reload &> /dev/null
if [ $? -eq 0 ]
thenecho "Firewall reloaded successfully."
elseecho "Failed to reload firewall."exit 1
fisetsebool -P httpd_use_nfs 1 &> /dev/null
if [ $? -eq 0 ]
thenecho "SELinux boolean httpd_use_nfs set successfully."
elseecho "Failed to set SELinux boolean httpd_use_nfs."exit 1
fisetsebool -P httpd_can_network_connect_db 1 &> /dev/null
if [ $? -eq 0 ]
thenecho "SELinux boolean httpd_can_network_connect_db set successfully."
elseecho "Failed to set SELinux boolean httpd_can_network_connect_db."exit 1
fisystemctl restart nginx.service
ALLEOF

 注意:在远程登录时写入文件时\无法再使得$可以正常写入,于是需要将写入文件时结尾的EOFR加上单引号,来避免这种情况;请确保论坛服务的压缩包在106的主机上。


结果展示及痛点解答

一、若出现404错误则首先查看论坛的nginx服务配置是否正确,检查/etc/nginx/conf.d/目录下面的是否除了php和配置文件有其他文件。

二、若出现数据库连接拒绝访问,则检查mariadb是否支持远程登录。

三、若站点安装之后需要重新安装,由于安装锁定,则请到服务器上删除./data/install.lock,才能重新安装。

四、若在安装时关闭安装界面,则会使得安装失败并且报错,则请恢复快照或者执行三步骤。

五、若nginx由于80端口被占用无法启动,使用fuser -n tcp 80 查看占用端口,并杀死再重新启动。

六、若第一次运行出现了服务无法运行,无法启动请再次运行。

若遇到不可解决问题请留言 ......

 

http://www.yayakq.cn/news/33039/

相关文章:

  • 网站开发的技术流程如何防止网站被攻击
  • 网站开发网上宠物店管理系统国内最大的网站建设公司排名
  • 如何更换网站域名酒店 企业网站建设的思路
  • 做视频网站需要哪些证高大上网站建设公司
  • 高州网站设计seo如何优化关键词
  • 百度做的网站后台怎么更新网页设计的工作
  • 织梦做网站被告济南app网站建设
  • 网站开发实践报告做网站要几个人
  • vpn网站模板网站建设及模板使用教程
  • 网站ip指向列表WordPress minn主题破解版
  • 做网站的需要花多少钱wordpress解压后怎么安装
  • 新网登录网站后台wordpress4.6免费主题
  • 蚌埠做网站公司国际新闻最新消息今天核废水
  • 网站名称写什么网站内链规划
  • 泰安网站建设排行注销建设工程规划许可证在哪个网站
  • 比较好的手机网站促进房地产市场健康发展
  • 网站建设的整体流程有哪些建筑行业网站开发
  • 个旧网站建设网站权重怎么刷
  • 深圳最好的网站建设模板型网站
  • 线上会议软件有哪些网站品牌词如何优化
  • 可以做区块链推广的网站浙江建设监理协会网站
  • 东莞住房和建设局网站wordpress动静分离cdn
  • 网站怎么开启gzip中国互联网设计公司
  • 大型企业网站优化专业的网站制作
  • 西丽网站设计杭州网站设计网站
  • 个人网站做百度云电影链接犯法吗石家庄网站开发哪家好
  • 新农宝网站建设方案济南百度推广seo
  • 建网站用有没有代做毕业设计的网站
  • 淄博乐达网站建设吧seo建站是什么意思
  • 如何注册网站名称天河网站 建设信科网络