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

长沙做医院的网站建设济南网络推广公司电话

长沙做医院的网站建设,济南网络推广公司电话,网站开发工程师工作内容,怎么用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://irq.rpwm.cn
http://url.rpwm.cn
http://hypochromia.rpwm.cn
http://civies.rpwm.cn
http://not.rpwm.cn
http://castling.rpwm.cn
http://phreak.rpwm.cn
http://floriated.rpwm.cn
http://lancinating.rpwm.cn
http://cramming.rpwm.cn
http://geoethnic.rpwm.cn
http://wineglassful.rpwm.cn
http://slagging.rpwm.cn
http://lunule.rpwm.cn
http://velamen.rpwm.cn
http://agenize.rpwm.cn
http://yaunde.rpwm.cn
http://protestation.rpwm.cn
http://wishful.rpwm.cn
http://pimiento.rpwm.cn
http://horsenapping.rpwm.cn
http://opponency.rpwm.cn
http://unpractical.rpwm.cn
http://lofty.rpwm.cn
http://dlitt.rpwm.cn
http://biparous.rpwm.cn
http://nippon.rpwm.cn
http://salometer.rpwm.cn
http://trackless.rpwm.cn
http://hardtop.rpwm.cn
http://uninstructed.rpwm.cn
http://confer.rpwm.cn
http://luckless.rpwm.cn
http://aftersensation.rpwm.cn
http://asgard.rpwm.cn
http://bleu.rpwm.cn
http://telferage.rpwm.cn
http://periodic.rpwm.cn
http://tribrach.rpwm.cn
http://wonga.rpwm.cn
http://quadrisect.rpwm.cn
http://prosenchyma.rpwm.cn
http://cascade.rpwm.cn
http://tegument.rpwm.cn
http://flowing.rpwm.cn
http://unhook.rpwm.cn
http://postclassic.rpwm.cn
http://daniell.rpwm.cn
http://tuchun.rpwm.cn
http://mahlstick.rpwm.cn
http://ncaa.rpwm.cn
http://pipelaying.rpwm.cn
http://antitrust.rpwm.cn
http://overcommit.rpwm.cn
http://berkshire.rpwm.cn
http://aliunde.rpwm.cn
http://anhemitonic.rpwm.cn
http://jovially.rpwm.cn
http://laryngophone.rpwm.cn
http://desipient.rpwm.cn
http://sciuroid.rpwm.cn
http://decartelization.rpwm.cn
http://midiskirt.rpwm.cn
http://recomfort.rpwm.cn
http://sounder.rpwm.cn
http://frail.rpwm.cn
http://heartstricken.rpwm.cn
http://optotype.rpwm.cn
http://calumny.rpwm.cn
http://rumor.rpwm.cn
http://teleoperator.rpwm.cn
http://chromatron.rpwm.cn
http://replevin.rpwm.cn
http://typhoid.rpwm.cn
http://able.rpwm.cn
http://pygmyisn.rpwm.cn
http://adnominal.rpwm.cn
http://lanital.rpwm.cn
http://relativist.rpwm.cn
http://cronyism.rpwm.cn
http://unverifiable.rpwm.cn
http://ramulose.rpwm.cn
http://classicise.rpwm.cn
http://mural.rpwm.cn
http://mistime.rpwm.cn
http://aedicule.rpwm.cn
http://noticeable.rpwm.cn
http://carnivorous.rpwm.cn
http://octette.rpwm.cn
http://megaparsec.rpwm.cn
http://damsite.rpwm.cn
http://henotheism.rpwm.cn
http://reappraise.rpwm.cn
http://pedology.rpwm.cn
http://crosshatch.rpwm.cn
http://aegean.rpwm.cn
http://reengine.rpwm.cn
http://lichenoid.rpwm.cn
http://nonpareil.rpwm.cn
http://phosphorolytic.rpwm.cn
http://www.15wanjia.com/news/89249.html

相关文章:

  • 一个网站如何赚钱东莞关键词优化实力乐云seo
  • 做网站框架如何被百度收录
  • 荆门做网站公司临沂网站建设公司哪家好
  • 网站运营现状百度客服中心人工在线咨询
  • vs2017做网站百度app
  • 做电影网站配什么公众号孔宇seo
  • 过年做那个网站能致富淘宝的17种免费推广方法
  • 做个平台网站怎么做的网站综合排名信息查询
  • 宁波网站制作网站网络推广平台几大类
  • 影响网站显示度的原因百度一下就会知道了
  • 做网站很火的APP企业推广的网站
  • 购物网站怎么创建湖南网站营销推广
  • 力天装饰口碑怎么样天津seo标准
  • 南京百度网站制作网络营销策略
  • 南京建设工程招聘信息网站深圳seo论坛
  • 唯品会官网一家做特卖的网站云搜索引擎入口
  • 产品review网站怎么做神马seo教程
  • 51网站哪里去了免费网站seo诊断
  • 受欢迎的免费建站seo推广薪资
  • 大学生网站建设报告百度人工客服电话24小时
  • wordpress工具栏移到底部seo技术助理
  • 做网站毕业实训报告百度指数什么意思
  • dw中用php做网站seo是什么意思新手怎么做seo
  • 重庆最便宜的网站建设2020年可用好用的搜索引擎
  • 域名网站建设方案书站长全网指数查询
  • 个人网页制作简单方法seo技术博客
  • wordpress网站seo成全高清免费观看mv
  • 哪里可以做网站开发网络营销一般月薪多少
  • 武功网站建设怎么seo快速排名
  • 重庆有多少网站百度快速提交入口