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

佛山正规网站建设报价京东优惠劵网站怎么做

佛山正规网站建设报价,京东优惠劵网站怎么做,湘潭网站建设价格,照片制作网站作者 乐维社区#xff08;forum.lwops.cn#xff09; 许远 在这个信息爆炸的时代#xff0c;拥有一个能够迅速传达信息、展示个性、并能够与世界互动的在线平台#xff0c;已成为企业和个人的基本需求。WordPress#xff0c;以其无与伦比的易用性和强大的扩展性#xff0…作者 乐维社区forum.lwops.cn 许远 在这个信息爆炸的时代拥有一个能够迅速传达信息、展示个性、并能够与世界互动的在线平台已成为企业和个人的基本需求。WordPress以其无与伦比的易用性和强大的扩展性成为了构建此类平台的首选工具。而LNMP这个由Linux、Nginx、MySQL和PHP组成的强大组合为WordPress提供了一个稳定而高效的运行环境。本文将带您走进搭建WordPress站点的奇妙旅程从0开始利用LNMP的强大功能打造一个既充满个性又能满足业务需求的在线家园。 LNMP项目实战环境说明 LLinuxCentOS7https://mirrors.aliyun.com/centos/7/isos/x86_64/ NNginx1.18.0 https://nginx.org/en/download.html MMySQL8.0.19 https://dev.mysql.com/downloads/mysql/ PPHP7.4.10 http://php.net/downloads.php Wordpress5.4.2https://cn.wordpress.org/download/#部署规划 192.168.26.201Nginx php-fpm 运行web服务 192.168.26.202运行MySQL数据库 1.1 部署数据库 在192.168.26.202主机部署MySQL服务 1.1.1 部署Mariadb数据库 1 [rootmariadb ~]# yum -y install mariadb-server 2 [rootmariadb ~]# systemctl enable --now mariadb.service1.1.2 创建wordpress数据库和用户并授权 [rootmariadb ~]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.68-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)] create database wordpress; Query OK, 1 row affected (0.00 sec) MariaDB [(none)] create user wordpress192.168.26.% identified by 123456; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)] grant all on wordpress.* to wordpress192.168.26.%; Query OK, 0 rows affected (0.00 sec) 18 MariaDB [(none)]1.1.3 验证MySQL账户权限 在WordPress服务器使用授权的MySQL账户远程登录测试权限 [rootweb ~]# mysql -uwordpress -p123456 -h192.168.26.202 Type help; or \h for help. Type \c to clear the current input statement. -------------------- | Database | -------------------- | information_schema | | test | | wordpress | -------------------- 3 rows in set (0.00 sec)1.2 部署PHP 在192.168.26.201主机部署php-fpm服务 1.2.1 编译安装 php https://www.php.net/downloads.php [rootcentos7 ~]# yum -y install gcc openssl-devel libxml2-devel bzip2-devel libmcrypt-devel sqlite-devel oniguruma-devel [rootcentos7 ~]#cd /usr/local/src [rootcentos7 src]#wget https://www.php.net/distributions/php-7.4.11.tar.xz [rootweb src]# tar xf php-7.4.11.tar.xz [rootweb src]# ls nginx-1.22.0 nginx-1.22.0.tar.gz php-7.4.11 php-7.4.11.tar.xz [rootweb src]# cd php-7.4.11/ [rootcentos7 php-7.4.11]# ./configure --prefix/usr/local/php74 --enable- mysqlnd --with-mysqlimysqlnd --with-pdo-mysqlmysqlnd --with-openssl --with-zlib --with-config-file-path/etc --with-config-file-scan-dir/etc/php.d --enable-mbstring --enable-xml --enable-sockets --enable-fpm --enable-maintainer-zts --disable-fileinfo ......config.status: creating main/php_config.h config.status: executing default commands--------------------------------------------------------------------| License: | | This software is subject to the PHP License, available in this || distribution in the file LICENSE. By continuing this installation || process, you are bound by the terms of this license agreement. || If you do not agree with the terms of this license, you must abort || the installation process at this point. |--------------------------------------------------------------------Thank you for using PHP.[rootcentos7 php-7.4.11]#make -j 8 make install1.2.2 准备PHP配置文件 #生成配置文件 [rootcentos7 php-7.4.11]#cp /usr/local/src/php-7.4.11/php.ini-production /etc/php.ini [rootweb php-7.4.11]# cd /usr/local/php74/etc/ [rootweb etc]# cp php-fpm.conf.default php-fpm.conf[rootweb etc]# pwd /usr/local/php74/etc [rootweb etc]# cd php-fpm.d/ [rootweb php-fpm.d]# cp www.conf.default www.conf[rootweb php-fpm.d]# vim www.conf [rootcentos7 php-fpm.d]#grep ^[^;] www.conf[www] user nginxgroup nginx listen 127.0.0.1:9000 pm dynamic pm.max_children 5pm.start_servers 2 pm.min_spare_servers 1 pm.max_spare_servers 3 pm.status_path /pm_status ping.path /ping1.2.3 启动并验证 php-fpm服务 [rootweb php-fpm.d]# /usr/local/php74/sbin/php-fpm -t [01-Aug-2022 19:44:33] NOTICE: configuration file /usr/local/php74/etc/php- fpm.conf test is successful [rootweb php-fpm.d]# /usr/local/php74/sbin/php-fpm [rootweb php-fpm.d]# ss -ntl State Recv-Q Send-Q Local Address:PortPeer Address:PortLISTEN 0 100 127.0.0.1:25*:*LISTEN 0 128 127.0.0.1:9000*:*LISTEN 0 128 *:22*:*LISTEN 0 100 [::1]:25[::]:* LISTEN 0 128 [::]:22[::]:*[rootweb php-fpm.d]#[rootweb php-fpm.d]# pstree -p |grep php|-php-fpm(14119)--php-fpm(14120)| -php-fpm(14121)[rootweb php-fpm.d]# ps -ef |grep phproot 14119 1 0 19:45 ? 00:00:00 php-fpm: master process(/usr/local/php74/etc/php-fpm.conf)nobody 14120 14119 0 19:45 ? 00:00:00 php-fpm: pool wwwnobody 14121 14119 0 19:45 ? 00:00:00 php-fpm: pool wwwroot 14134 35079 0 19:46 pts/2 00:00:00 grep --colorauto php1.3 部署 Nginx 在192.168.26.201主机部署nginx服务 1.3.1 编译安装 nginx 1 [rootdb1 ~]# vim install_nginx.sh#!/bin/bash安装必要的编译依赖 yum install -y gcc-c pcre-devel zlib-devel make下载Nginx源码包 wget http://nginx.org/download/nginx-1.22.0.tar.gztar zxvf nginx-1.22.0.tar.gzcd nginx-1.22.0配置编译选项这里只列出了一部分常用选项 ./configure --prefix/usr/local/nginx --with-http_ssl_module编译和安装 make make install启动Nginx /usr/local/nginx/sbin/nginx2 [rootdb1 ~]# /bin/bash install_nginx.sh3 [rootdb1 ~]# ss -ntl | grep 80LISTEN 0 128 *:80 *:* LISTEN 0 128 *:8080 *:* LISTEN 0 80 [::]:3306 [::]:* LISTEN 0 128 [::]:80 [::]:* LISTEN 0 128 [::]:8080 [::]:* 1.3.2 配置 Nginx 支持 fastcgi [rootweb ~]#vim /usr/local/nginx/conf/nginx.conf[rootweb ~]#grep -Ev #|^$ vim /usr/local/nginx/conf/nginx.confworker_processes 1;events {worker_connections 1024;}http { include mime.types; default_type application/octet-stream;sendfile on;keepalive_timeout 65; server {listen 80;server_name localhost;location / {root html;index index.php index.html index.htm;}error_page 500 502 503 504 /50x.html;location /50x.html { root html;}location ~ \.php$ {root html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}}} [rootweb ~]# /usr/local/nginx/sbin/nginx1.4 部署 WordPress 在192.168.26.201主机部署 wordpress 1.4.1 准备 WordPress 文件 [rootweb ~]# wget https://cn.wordpress.org/wordpress-6.0.1-zh_CN.tar.gz [rootweb ~]# tar xf wordpress-6.0.1-zh_CN.tar.gz [rootweb ~]#cp -r wordpress/* /usr/local/nginx/html [rootweb html]# cp wp-config-sample.php wp-config.php [rootweb html]# vim wp-config.php define( DB_NAME, wordpress ); /** Database username */ define( DB_USER, wordpress ); /** Database password */ define( DB_PASSWORD, 123456 ); /** Database hostname */ define( DB_HOST, 192.168.26.202 ); [rootweb html]# chown -R nginx.nginx .1.4.2 初始化web页面 打开浏览器访问下面链接 192.168.26.201 1.4.3 登录后台管理界面并发表文章 1.4.4 验证发表的文章 #可以看到上传的图片 [[rootweb html]# tree wp-content/uploads/ wp-content/uploads/ └── 2022 └── 08 └── 1.png 2 directories, 1 file1.4.5 配置允许上传大文件 #注意:默认只支持1M以下文件上传 ,要利用php程序上传大图片 ,还需要修改下面三项配置 ,最大上传由 三项值的最小值决定 #直接上传大于1M文件 ,会出现下面413错误 [rootcentos7 ~]#tail -f /apps/nginx/logs/access.log 10.0.0.1 - - [27/Nov/2020:12:21:16 0800] POST /wp-admin/async-upload.php HTTP/1.1 413 585 http://10.0.0.7/wp-admin/upload.php Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36 Edg/87.0.664.47 #nginx上传文件大小限制 [rootcentos7 ~]#vim /apps/nginx/conf/nginx.conf server { client_max_body_size 10m; #默认值为1M ..... #php上传文件大小限制 [rootcentos7 ~]#vim /etc/php.ini post_max_size 30M #默认值为8M upload_max_filesize 20M #默认值为2M [rootcentos7 ~]#systemctl restart nginx php-fpm以上就是本期的全部内容更多运维技巧欢迎关注乐维社区更多运维问题也欢迎到乐维社区留言提问。
http://www.w-s-a.com/news/563531/

相关文章:

  • 高端企业网站定制公司企业网站2000元
  • 成都网站建设:河北省建设工程质量监督网站
  • 四川省建设厅官网信息查询平台北京seo关键词优化外包
  • 网站建设响应式是什么意思wordpress弹窗打开网页
  • 做美工需要参考的网站漳州做网站的公司
  • 用源码建设网站关于网站开发的自我评价
  • 网站设计师图片自助建站编辑器
  • 网站建设的常用技术有哪些深圳建筑工地招工
  • 做软装找图片的网站wordpress 替代
  • 制作网站的后台公众号做视频网站会封吗
  • 广西企业建站邯郸景区网站制作
  • 开发商城网站多少钱城厢区建设局网站
  • 网站外链多的危害天水市建设局网站
  • 网站接入商学交互设计网站
  • 目前最新的网站后台架构技术综述什么网站可以做名片
  • 成都建站长沙做网站美工的公司
  • 湖南省住房与城乡建设厅网站平顶山网站关键词优化
  • 购物网站前台功能模块汕头网站设计电话
  • 网站你懂我意思正能量免费wordpress菜单底部导航代码
  • 一个主机可以建设多少个网站山东高端网站建设
  • 长沙网站建设搭建网络营销做得好的公司
  • 如何做网站的后台管理石家庄seo关键词排名
  • 给自己公司做个网站山东做外贸网站的公司
  • 张家港网站建设培训江苏省建设工程网站系统
  • html个人网站桂林建站
  • 湛江网站优化快速排名wordpress文章页面宽度
  • 自己建网站怎么弄唯品会一家专门做特卖的网站
  • 做文化传播公司网站做搜狗pc网站点
  • 免费的黄冈网站有哪些平台可以聊天呢要查询一个网站在什么公司做的推广怎么查
  • 凡客建站登录入口网站建设先进部门评选标准