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

沈阳市网站设计公司大全威海建设局网站

沈阳市网站设计公司大全,威海建设局网站,seo论坛的网址,wordpress html模式文章目录 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源 [rootwanf ~]# rm -rf /etc/yum.repos.d/* [rootwanf ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo [rootwanf ~]# sed -i -e /mirrors.cloud.aliyuncs.com/d -e /mirrors.aliyuncs.com/d /etc/yum.repos.d/CentOS-Base.repo [rootwanf ~]# yum clean all [rootwanf ~]# yum makecache [rootwanf ~]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm [rootwanf ~]# sed -i s|^#baseurlhttps://download.example/pub|baseurlhttps://mirrors.aliyun.com| /etc/yum.repos.d/epel* [rootwanf ~]# sed -i s|^metalink|#metalink| /etc/yum.repos.d/epel* [rootwanf ~]# yum makecache //永久关闭防火墙和selinux [rootwanf ~]# systemctl disable --now firewalld.service [rootwanf ~]# setenforce 0 [rootwanf ~]# sed -i s/^SELINUXenforcing/SELINUXdisabled/g /etc/selinux/config [rootwanf ~]# reboot//安装相关依赖 [rootwanf ~]# 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[rootwanf ~]# 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[rootwanf ~]# yum -y install gcc gcc-c --allowerasing [rootwanf ~]# yum -y groups mark install Development Tools安装Nginx //创建nginx系统用户 [rootwanf ~]# useradd -r -M -s /sbin/nologin nginx [rootwanf ~]# id nginx uid995(nginx) gid992(nginx) groups992(nginx)//创建日志存放目录 [rootwanf ~]# mkdir -p /var/log/nginx [rootwanf ~]# chown -R nginx.nginx /var/log/nginx//下载nginx软件包并安装 [rootwanf ~]# wget http://nginx.org/download/nginx-1.22.1.tar.gz -P /usr/src///编译安装 [rootwanf ~]# cd /usr/src/ [rootwanf src]# ls debug kernels nginx-1.22.1.tar.gz [rootwanf src]# tar -xf nginx-1.22.1.tar.gz [rootwanf src]# cd nginx-1.22.1/ [rootwanf nginx-1.22.1]# ./configure \ --prefix/usr/local/nginx \ --usernginx \ --groupnginx \ --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 配置过程省略[rootwanf nginx-1.22.1]# make -j4 make install 编译安装过程省略//nginx安装后配置 //配置环境变量 [rootwanf ~]# echo export PATH/usr/local/nginx/sbin:$PATH /etc/profile.d/nginx.sh [rootwanf ~]# source /etc/profile.d/nginx.sh//加入systemctl管理 [rootwanf ~]# vim /usr/lib/systemd/system/nginx.service [rootwanf ~]# cat /usr/lib/systemd/system/nginx.service [Unit] Descriptionnginx server daemon Afternetwork.target[Service] Typeforking ExecStart/usr/local/nginx/sbin/nginx ExecStop/usr/local/nginx/sbin/nginx -s stop ExecReload/usr/local/nginx/sbin/nginx -s reload[Install] WantedBymulti-user.target [rootwanf ~]# systemctl daemon-reload //启动并设置开机自启 [rootwanf ~]# systemctl enable --now nginx.service [rootwanf ~]# 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 [::]:* [rootwanf ~]# 成功访问nginx主页 安装mariadb //安装mariadb [rootwanf ~]# yum -y install mariadb mariadb-server//启动mariadb并设置开机自启 [rootwanf ~]# systemctl enable --now mariadb.service //设置密码 [rootwanf ~]# mysql MariaDB [(none)] set password password(12345678); //根据需求设置密码 Query OK, 0 rows affected (0.001 sec)MariaDB [(none)] quit Bye [rootwanf ~]# 安装php //下载php软件包 [rootwanf ~]# wget https://www.php.net/distributions/php-8.2.10.tar.gz -P /usr/src///编译安装 [rootwanf ~]# cd /usr/src/ [rootwanf src]# tar -xf php-8.2.10.tar.gz [rootwanf src]# cd php-8.2.10/ [rootwanf 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-mysqlimysqlnd \ --with-pdo-mysqlmysqlnd \ --with-readline \ --enable-shmop \ --enable-simplexml \ --enable-sockets \ --with-zip \ --enable-mysqlnd-compression-support \ --with-pear \ --enable-pcntl \ --enable-posix 配置过程省略[rootwanf php-8.2.10]# make -j4 make install 编译安装过程省略//安装后配置 [rootwanf php-8.2.10]# echo export PATH/usr/local/php8/bin:$PATH /etc/profile.d/php8.sh [rootwanf php-8.2.10]# source /etc/profile.d/php8.sh [rootwanf php-8.2.10]# cp php.ini-production /etc/php.ini cp: overwrite /etc/php.ini? y [rootwanf php-8.2.10]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm [rootwanf php-8.2.10]# chmod x /etc/rc.d/init.d/php-fpm [rootwanf php-8.2.10]# cp /usr/local/php8/etc/php-fpm.conf.default /usr/local/php8/etc/php-fpm.conf [rootwanf php-8.2.10]# cp /usr/local/php8/etc/php-fpm.d/www.conf.default /usr/local/php8/etc/php-fpm.d/www.conf[rootwanf php-8.2.10]# vim /usr/local/php8/etc/php-fpm.conf [rootwanf 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 [rootwanf php-8.2.10]# //加入systemctl管理 [rootwanf ~]# vim /usr/lib/systemd/system/php-fpm.service [rootwanf ~]# cat /usr/lib/systemd/system/php-fpm.service [Unit] Descriptionphp-fpm server daemon Afternetwork.targe[Service] Typeforking ExecStart/etc/rc.d/init.d/php-fpm start ExecStop/etc/rc.d/init.d/php-fpm stop ExecReload/bin/kill -HUP \$MAINPID[Install] WantedBymulti-user.target [rootwanf ~]# systemctl daemon-reload//启动并设置开机自启 [rootwanf ~]# systemctl enable --now php-fpm.service 配置nginx //创建php测试页面 [rootwanf ~]# cd /usr/local/nginx/html/ [rootwanf html]# vim index.php [rootwanf html]# cat index.php ?phpphpinfo(); ? [rootwanf html]# //修改nginx主配置文件 [rootwanf 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;} ......//重启服务 [rootwanf html]# systemctl restart nginx.service 通过IP地址访问测试页面 部署完成 部署Discuz论坛系统 下载Discuz论坛系统代码包 Discuz论坛系统下载地址Discuz官网 //我提前下好了然后传进主机中 [rootwanf ~]# ls Discuz_X3.5_SC_UTF8_20231001.zip部署Discuz论坛系统 //创建一个目录存放网站文件 [rootwanf ~]# mkdir /usr/local/nginx/html/Discuz//解压到刚刚创建的目录 [rootwanf ~]# yum -y install unzip [rootwanf ~]# unzip Discuz_X3.5_SC_UTF8_20231001.zip -d /usr/local/nginx/html/Discuz/ [rootwanf ~]# cd /usr/local/nginx/html/ [rootwanf html]# ls 50x.html Discuz index.html index.php [rootwanf html]# cd Discuz/ [rootwanf Discuz]# ls LICENSE qqqun.png readme readme.html upload utility.html [rootwanf Discuz]# cd upload/ [rootwanf 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 [rootwanf upload]# //修改权限 [rootwanf ~]# cd /usr/local/nginx/html/Discuz/upload/ [rootwanf upload]# chown -R nginx config/ [rootwanf upload]# chown -R nginx data/ [rootwanf upload]# chown -R nginx uc_client/ [rootwanf upload]# chown -R nginx uc_server/ [rootwanf upload]# chmod -R 777 config/ [rootwanf upload]# chmod -R 777 data/ [rootwanf upload]# chmod -R 777 uc_client/ [rootwanf upload]# chmod -R 777 uc_server///创建数据库 [rootwanf ~]# mysql -uroot -p12345678 -e create database Discuz;配置虚拟主机 //编辑nginx配置文件创建一个虚拟主机可以用域名访问 [rootwanf ~]# 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 [rootwanf ~]# systemctl restart nginx.service [rootwanf ~]# systemctl restart php-fpm.service 安装Discuz论坛 第一次安装需要在域名后面接/install才可以到安装界面 安装完毕 访问站点 尝试注册一个账号
http://www.w-s-a.com/news/355405/

相关文章:

  • 做化妆品的一些网站企业网站建设与营运计划书
  • 重庆速代网络科技seo整站优化服务教程
  • 成都比较好的装修设计公司seo3的空间构型
  • 开发商建设审批网站成都创意设计公司
  • 百度快照比网站上线时间早wordpress新建阅读量字段
  • 国家工程建设标准化协会网站网站开发工具有
  • 上海网站建设集中公关公司组织架构图
  • wordpress副标题的作用百度网站标题优化
  • 大连哪家公司做网站比较好wordpress 判断用户组
  • 网站空间1g多少钱东莞公司高端网站建设
  • 网站服务器出错是什么意思做餐饮酒店网站
  • 房地产网站建设策划方案网站建设教程简笔画
  • 3d室内设计软件wordpress本地优化加速版
  • 南京高新区规划建设局网站石家庄哪里做网站比较好
  • 免费培训课程网站优化的方式
  • 做网站要固定电话在家自己做网站
  • 招聘网站开发视频新手如何做网站维护
  • flash 网站欣赏国外做的比较好的网站有哪些
  • 推广一个网站需要什么官网首页设计
  • 淘宝建设网站的理由企业官网建设哪家好
  • 青岛网站推wordpress主题切换
  • 天元建设集团有限公司资质郑州网站seo推广
  • 免费网站后台管理系统模板下载百度网盘app下载安装
  • 开封网站建设培训郑州高端网站建设哪家好
  • 东莞哪家做网站很有名的公司即墨专业医院网站制作公司
  • 做面食网站china cd wordpress
  • 门户网站 营销优秀建筑模型案例作品
  • 训做网站的心得体会范文中山市 有限公司网站建设
  • 服装电子商务网站建设过程与实现两学一做学习教育网站
  • 住房和城建设网站怎么用源码建站