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

wordpress建站系统视频教程百度快快速排名

wordpress建站系统视频教程,百度快快速排名,网站提交入口大全,营销网站排行榜前十名文章目录 LNMP架构&部署Discuz论坛系统部署LNMP架构环境前期准备安装Nginx安装mariadb安装php配置nginx 部署Discuz论坛系统下载Discuz论坛系统代码包部署Discuz论坛系统配置虚拟主机安装Discuz论坛访问站点尝试注册一个账号 LNMP架构&部署Discuz论坛系统 部署LNMP架构…

文章目录

  • LNMP架构&部署Discuz论坛系统
    • 部署LNMP架构
        • 环境
        • 前期准备
        • 安装Nginx
        • 安装mariadb
        • 安装php
        • 配置nginx
    • 部署Discuz论坛系统
        • 下载Discuz论坛系统代码包
        • 部署Discuz论坛系统
        • 配置虚拟主机
        • 安装Discuz论坛
        • 访问站点
        • 尝试注册一个账号

LNMP架构&部署Discuz论坛系统

部署LNMP架构

环境
操作系统Nginx版本数据库版本PHP版本
centos-8nginx-1.22.1mariadb-10.3php-8.2.10

前期准备
//配置yum源(推荐使用阿里云源)和epel源
[root@wanf ~]# rm -rf /etc/yum.repos.d/*
[root@wanf ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
[root@wanf ~]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
[root@wanf ~]# yum clean all
[root@wanf ~]# yum makecache
[root@wanf ~]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
[root@wanf ~]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
[root@wanf ~]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
[root@wanf ~]# yum makecache //永久关闭防火墙和selinux
[root@wanf ~]# systemctl disable --now firewalld.service 
[root@wanf ~]# setenforce 0
[root@wanf ~]# sed -i 's/^SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config 
[root@wanf ~]# reboot//安装相关依赖
[root@wanf ~]# yum -y install libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libicu-devel libjpeg libjpeg-devel libpng libpng-devel openldap-devel  pcre-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel mhash mhash-devel php-mysqlnd sqlite-devel libzip libzip-devel gd-devel oniguruma make wget vim  --nobest[root@wanf ~]# yum -y install http://mirror.centos.org/centos/8-stream/PowerTools/x86_64/os/Packages/oniguruma-devel-6.8.2-2.el8.x86_64.rpm[root@wanf ~]# yum -y install gcc gcc-c++ --allowerasing
[root@wanf ~]# yum -y groups mark install 'Development Tools'
安装Nginx
//创建nginx系统用户
[root@wanf ~]# useradd -r -M -s /sbin/nologin nginx
[root@wanf ~]# id nginx 
uid=995(nginx) gid=992(nginx) groups=992(nginx)//创建日志存放目录
[root@wanf ~]# mkdir -p /var/log/nginx
[root@wanf ~]# chown -R nginx.nginx /var/log/nginx//下载nginx软件包,并安装
[root@wanf ~]# wget http://nginx.org/download/nginx-1.22.1.tar.gz -P /usr/src///编译安装
[root@wanf ~]# cd /usr/src/
[root@wanf src]# ls
debug  kernels  nginx-1.22.1.tar.gz
[root@wanf src]# tar -xf nginx-1.22.1.tar.gz 
[root@wanf src]# cd nginx-1.22.1/
[root@wanf nginx-1.22.1]# ./configure \
--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-debug \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_image_filter_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=/var/log/nginx/error.log
(配置过程省略)[root@wanf nginx-1.22.1]# make -j4 && make install
(编译安装过程省略)//nginx安装后配置
//配置环境变量
[root@wanf ~]# echo 'export PATH=/usr/local/nginx/sbin:$PATH' > /etc/profile.d/nginx.sh
[root@wanf ~]# source /etc/profile.d/nginx.sh//加入systemctl管理
[root@wanf ~]# vim /usr/lib/systemd/system/nginx.service 
[root@wanf ~]# cat /usr/lib/systemd/system/nginx.service 
[Unit]
Description=nginx server daemon
After=network.target[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecStop=/usr/local/nginx/sbin/nginx -s stop
ExecReload=/usr/local/nginx/sbin/nginx -s reload[Install]
WantedBy=multi-user.target
[root@wanf ~]# systemctl daemon-reload  //启动并设置开机自启
[root@wanf ~]# systemctl enable --now nginx.service 
[root@wanf ~]# ss -anlt
State   Recv-Q  Send-Q    Local Address:Port     Peer Address:Port  Process  
LISTEN  0       511             0.0.0.0:80            0.0.0.0:*              
LISTEN  0       128             0.0.0.0:22            0.0.0.0:*              
LISTEN  0       128                [::]:22               [::]:*              
[root@wanf ~]# 

成功访问nginx主页

在这里插入图片描述


安装mariadb
//安装mariadb
[root@wanf ~]# yum -y install mariadb mariadb-server//启动mariadb并设置开机自启
[root@wanf ~]# systemctl enable --now mariadb.service //设置密码
[root@wanf ~]# mysql
MariaDB [(none)]> set password = password('12345678');   //根据需求设置密码
Query OK, 0 rows affected (0.001 sec)MariaDB [(none)]> quit
Bye
[root@wanf ~]# 

安装php
//下载php软件包
[root@wanf ~]# wget https://www.php.net/distributions/php-8.2.10.tar.gz -P /usr/src///编译安装
[root@wanf ~]# cd /usr/src/
[root@wanf src]# tar -xf php-8.2.10.tar.gz 
[root@wanf src]# cd php-8.2.10/
[root@wanf php-8.2.10]# ./configure --prefix=/usr/local/php8  \
--with-config-file-path=/etc \
--enable-fpm \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-soap \
--with-openssl \
--enable-bcmath \
--with-iconv \
--with-bz2 \
--enable-calendar \
--with-curl \
--enable-exif  \
--enable-ftp \
--enable-gd  \
--with-jpeg \
--with-zlib-dir \
--with-freetype \
--with-gettext \
--enable-mbstring \
--enable-pdo \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-readline \
--enable-shmop \
--enable-simplexml \
--enable-sockets \
--with-zip \
--enable-mysqlnd-compression-support \
--with-pear \
--enable-pcntl \
--enable-posix
(配置过程省略)[root@wanf php-8.2.10]# make -j4 && make install
(编译安装过程省略)//安装后配置
[root@wanf php-8.2.10]# echo 'export PATH=/usr/local/php8/bin:$PATH' > /etc/profile.d/php8.sh
[root@wanf php-8.2.10]# source /etc/profile.d/php8.sh
[root@wanf php-8.2.10]# cp php.ini-production /etc/php.ini
cp: overwrite '/etc/php.ini'? y
[root@wanf php-8.2.10]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
[root@wanf php-8.2.10]# chmod +x /etc/rc.d/init.d/php-fpm
[root@wanf php-8.2.10]# cp /usr/local/php8/etc/php-fpm.conf.default /usr/local/php8/etc/php-fpm.conf
[root@wanf php-8.2.10]# cp /usr/local/php8/etc/php-fpm.d/www.conf.default /usr/local/php8/etc/php-fpm.d/www.conf[root@wanf php-8.2.10]# vim /usr/local/php8/etc/php-fpm.conf
[root@wanf php-8.2.10]# tail -4 /usr/local/php8/etc/php-fpm.conf
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 2
pm.max_spare_servers = 8 
[root@wanf php-8.2.10]# //加入systemctl管理
[root@wanf ~]# vim /usr/lib/systemd/system/php-fpm.service
[root@wanf ~]# cat /usr/lib/systemd/system/php-fpm.service
[Unit]
Description=php-fpm server daemon
After=network.targe[Service]
Type=forking
ExecStart=/etc/rc.d/init.d/php-fpm start
ExecStop=/etc/rc.d/init.d/php-fpm stop
ExecReload=/bin/kill -HUP \$MAINPID[Install]
WantedBy=multi-user.target
[root@wanf ~]# systemctl daemon-reload//启动并设置开机自启
[root@wanf ~]# systemctl enable --now php-fpm.service 
配置nginx
//创建php测试页面
[root@wanf ~]# cd /usr/local/nginx/html/
[root@wanf html]# vim index.php
[root@wanf html]# cat index.php 
<?phpphpinfo();
?>
[root@wanf html]# //修改nginx主配置文件
[root@wanf html]# vim /usr/local/nginx/conf/nginx.conf
......
server {listen       80;server_name  www.wanf.com;      //自己的域名
......location / {root   html;index  index.php index.html index.htm;    //加一个index.php}
......location ~ \.php$ {root           html;fastcgi_pass   127.0.0.1:9000;fastcgi_index  index.php;fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;include        fastcgi.conf;    //改为fastcgi.conf;}
......//重启服务
[root@wanf html]# systemctl restart nginx.service 

通过IP地址访问测试页面

在这里插入图片描述

部署完成

部署Discuz论坛系统

下载Discuz论坛系统代码包

在这里插入图片描述

Discuz论坛系统下载地址Discuz官网

//我提前下好了,然后传进主机中
[root@wanf ~]# ls
Discuz_X3.5_SC_UTF8_20231001.zip
部署Discuz论坛系统
//创建一个目录存放网站文件
[root@wanf ~]# mkdir /usr/local/nginx/html/Discuz//解压到刚刚创建的目录
[root@wanf ~]# yum -y install unzip
[root@wanf ~]# unzip Discuz_X3.5_SC_UTF8_20231001.zip -d /usr/local/nginx/html/Discuz/
[root@wanf ~]# cd /usr/local/nginx/html/
[root@wanf html]# ls
50x.html  Discuz  index.html  index.php
[root@wanf html]# cd Discuz/
[root@wanf Discuz]# ls
LICENSE  qqqun.png  readme  readme.html  upload  utility.html
[root@wanf Discuz]# cd upload/
[root@wanf upload]# ls
admin.php  connect.php      group.php   misc.php    source
api        crossdomain.xml  home.php    plugin.php  static
api.php    data             index.php   portal.php  template
archiver   favicon.ico      install     robots.txt  uc_client
config     forum.php        member.php  search.php  uc_server
[root@wanf upload]# //修改权限
[root@wanf ~]# cd /usr/local/nginx/html/Discuz/upload/
[root@wanf upload]# chown -R nginx config/
[root@wanf upload]# chown -R nginx data/
[root@wanf upload]# chown -R nginx uc_client/
[root@wanf upload]# chown -R nginx uc_server/
[root@wanf upload]# chmod -R 777 config/
[root@wanf upload]# chmod -R 777 data/
[root@wanf upload]# chmod -R 777 uc_client/
[root@wanf upload]# chmod -R 777 uc_server///创建数据库
[root@wanf ~]# mysql -uroot -p12345678 -e "create database Discuz;"

配置虚拟主机
//编辑nginx配置文件,创建一个虚拟主机,可以用域名访问
[root@wanf ~]# vim /usr/local/nginx/conf/nginx.conf
.......
server {listen       80;server_name  www.wanf1.com;     //自己的域名location / {root   html/Discuz/upload;           //改为网站目录index  index.php index.html index.htm;}error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}location ~ \.php$ {root           html/Discuz/upload;     //改为网站目录fastcgi_pass   127.0.0.1:9000;fastcgi_index  index.php;fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;include        fastcgi.conf;}}
......//重启nginx服务和php-fpm
[root@wanf ~]# systemctl restart nginx.service 
[root@wanf ~]# systemctl restart php-fpm.service 
安装Discuz论坛

第一次安装需要在域名后面接/install才可以到安装界面

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

安装完毕


访问站点

在这里插入图片描述

尝试注册一个账号

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述


http://www.tdrn.cn/news/244.html

相关文章:

  • 建设银行纪检监察网站泰安seo排名
  • 健康义乌app长沙百度推广排名优化
  • b2b外贸平台有哪些平台关键词seo优化公司
  • 哪里有做网站设计云客网平台
  • 网站上地图是怎样做的seo搜索优化公司报价
  • 企业网站建设开题报告是什么互联网推广软件
  • 邯郸移动网站建设公司网站的网络推广
  • 深圳免费网站建设服务谷歌搜索排名规则
  • 哪些网站是react做的关键少数
  • 网站公安局备案 教程常州网站建设制作
  • 网站怎么做移动的窗口佛山本地网站建设
  • 黄石本地做网站的网站优化排名易下拉系统
  • 网站登录如何做北京seo优化费用
  • 在线学习建设网站百度地图的精准定位功能
  • 珠海网站建设 旭洁科技自己如何免费做网站
  • 做网站开发考什么研百度一下百度搜索百度一下
  • 厦门网站建设2015北京百度关键词推广
  • 快速创建网站十大经典事件营销案例分析
  • 卫浴毛巾架网站建设优化大师手机版
  • 做个小网站多少钱游戏推广平台有哪些
  • 郓城县住房和城乡建设局网站成都百度推广优化创意
  • 做网站域名解析小红书软文案例
  • 手机在线建站无锡百度seo优化
  • jquery 网站根目录开封网站推广公司
  • 营销型网站的建设和运营网络推广员怎么做
  • 哈尔滨快速制作网站获客软件
  • 做钓鱼网站判刑百度网页版登录入口
  • 广元做网站的公司营销型网站的类型有哪些
  • 石家庄网站优化近三天发生的大事
  • 广西建设职业技术学院官方网站市场调查报告