永济市住房保障和城乡建设管理局网站做网站推广书范法吗

张小明 2026/3/12 8:13:41
永济市住房保障和城乡建设管理局网站,做网站推广书范法吗,百度拍照搜索,深圳网站建设公司首选文章目录基于动态页面的web架构1、为什么需要LNMP架构2、LNMP、LNMT3、简单安装LNMP架构3.1、部署nginx服务3.2、安装php1、使用第三方扩展 epel 源安装 php7.12、安装扩展源#xff08;epel-release-7、webtatic-release#xff09;3、配置第三方源#xff0c;使用 Remi 仓…文章目录基于动态页面的web架构1、为什么需要LNMP架构2、LNMP、LNMT3、简单安装LNMP架构3.1、部署nginx服务3.2、安装php1、使用第三方扩展 epel 源安装 php7.12、安装扩展源epel-release-7、webtatic-release3、配置第三方源使用 Remi 仓库4、安装php7.1版本5 、替换php-fpm运行的用户和组启动服务3.3、部署mysql 5.7.363.2.1、安装mysql1、使用仓库进行安装、启动服务卸载所有mysql-community相关包导入MySQL 5.7/8.0通用的最新GPG密钥2022版可选若上述密钥仍不匹配导入MySQL 5.7专属的旧密钥重新安装mysql-community-server会自动安装依赖包2、修改密码3.4、验证LNMP架构是否部署成功1、编写Nginx的配置文件连接PHP2、创建站点目录文件、完成授权3、完成主机映射可以通过域名访问**验证一通过Nginx是否可以正常访问PHP资源****验证二PHP是否正常连接数据库**基于动态页面的web架构1、为什么需要LNMP架构因为nginx模块少轻量级只能解析静态的网页为了解决nginx访问动态网页的问题需要通过架构去解决2、LNMP、LNMTLlinux系统的平台也可以是wN前端web服务 Nginx 也可以是A ApacheM后端数据库 mysqlP语言 用于连接前端和后端的角色 PHP Perl PythonLlinux系统的平台也可以是wN负载均衡 代理M后端数据库 mysqlTTomcat Java中间件web服务3、简单安装LNMP架构3.1、部署nginx服务yum安装 nginx1.14 php7.1 mysql5.71、使用官方yum源进行安装Nginx[rootweb01 yum.repos.d]# cat nginx.repo[nginx]namenginx repobaseurlhttp://nginx.org/packages/centos/7/$basearch/gpgcheck0enabled1[rootweb01 ~]# yum -y install nginx2、创建程序用户[rootweb01 ~]# groupadd www -g 666[rootweb01 ~]# useradd www -u 666 -g 666 -s /sbin/nologin -M3、修改配置文件[rootweb01 nginx]# sed -i /^user/c user www; /etc/nginx/nginx.conf[rootweb01 nginx]# cat /etc/nginx/nginx.conf |head -10user www;worker_processes auto;error_log /var/log/nginx/error.log notice;pid /var/run/nginx.pid;events{worker_connections1024;4、启动并且自启动[rootweb01 nginx]# systemctl start nginx[rootweb01 nginx]# systemctl enable nginx3.2、安装php1、使用第三方扩展 epel 源安装 php7.11、使用第三方扩展 epel 源安装 php7.1#1.移除旧版php[rootweb01 nginx]# yum remove php-mysql-5.4 php php-fpm php-common -y2、安装扩展源epel-release-7、webtatic-release# 下载epel-release-7-14.noarch.rpm归档版本稳定可用wgethttps://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm# 安装该rpm包rpm-Uvh epel-release-7-14.noarch.rpm 注意webtatic 仓库已经停止维护对 CentOS7的支持也已终止建议尽量避免使用rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm3、配置第三方源使用 Remi 仓库安装Remi-release-7rpm-Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm 安装yum-utils提供yum-config-manager工具 yuminstall-y yum-utils 启用Remi的PHP7.4仓库根据需要替换为5.6/7.2/8.0等 yum-config-manager --enable remi-php74 清理缓存[rootweb01 nginx]# yum clean all[rootweb01 nginx]# yum makecache4、安装php7.1版本[rootweb01 nginx]# yum -y install php71w php71w-cli php71w-common php71w-devel php71w-embedded php71w-gd php71w-mcrypt php71w-mbstring php71w-pdo php71w-xml php71w-fpm php71w-mysqlnd php71w-opcache php71w-pecl-memcached php71w-pecl-redis php71w-pecl-mongodb5 、替换php-fpm运行的用户和组启动服务[rootweb01 php-fpm.d]# sed -i /^user/c user www /etc/php-fpm.d/www.conf[rootweb01 php-fpm.d]# sed -i /^group/c group www /etc/php-fpm.d/www.conf[rootweb01 php-fpm.d]# systemctl start php-fpm[rootweb01 php-fpm.d]# systemctl enable php-fpmCreated symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.3.3、部署mysql 5.7.36动态网站根据用户输入的信息在后端数据库中进行查询之后组合的一个页面静态网站固定的页面所见即所得现在的网页大部分都是动静结合一般网页的首页都是静态的动态数据用户的信息 网页的内容一般存放在数据库中静态数据固定的文件图片、音频、视频、文本一般存放在磁盘中一般以5.6为分割5.6已经稳定了但是安全性还是不太好5.7之后已经完善了3.2.1、安装mysql1、使用仓库进行安装、启动服务1、安装Mysql5.7# 下载并安装MySQL社区版仓库包适用于EL7/CentOS7[rootweb01 ~]# rpm -ivh https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm默认情况下上述仓库包会启用 MySQL8.0仓库禁用5.7仓库因此需要手动调整# 安装yum-utils提供yum-config-manager工具若已安装可跳过[rootweb01 ~]# yum install -y yum-utils# 禁用MySQL 8.0仓库[rootweb01 ~]# yum-config-manager --disable mysql80-community# 启用MySQL 5.7仓库[rootweb01 ~]# yum-config-manager --enable mysql57-community# 安装MySQL 5.7社区版服务器[rootweb01 ~]# yum install -y mysql-community-server[rootweb01 ~]# systemctl start mysqld[rootweb01 ~]# systemctl enable mysqld安装过程中如果报错key失败可以操作以下命令卸载所有mysql-community相关包yum remove -y mysql-community-*导入MySQL 5.7/8.0通用的最新GPG密钥2022版rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022可选若上述密钥仍不匹配导入MySQL 5.7专属的旧密钥rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql57重新安装mysql-community-server会自动安装依赖包yum install -y mysql-community-server2、修改密码修改密码[rootweb01 ~]# grep temporary password /var/log/mysqld.log2025-12-17T02:02:36.996806Z1[Note]A temporary password is generatedforrootlocalhost:#Elkj2gp0efb[rootweb01 ~]# mysql -uroot -p$(awk /temporary password/{print $NF} /var/log/mysqld.log)mysql:[Warning]Using a password on thecommandline interface can be insecure. Welcome to the MySQL monitor. Commands end with;or\g. Your MySQL connectionidis3Server version:5.7.44 Copyright(c)2000,2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Typehelp;or\hforhelp. Type\ctoclearthe current input statement. mysqlALTERUSERrootlocalhostIDENTIFIED BYJy123.com;Query OK,0rows affected(0.01sec)3.4、验证LNMP架构是否部署成功1、Nginx 是否能正常解析 php 动态请求2、php 程序能否正常连接数据库1、编写Nginx的配置文件连接PHP[rootweb01 ~]# cat /etc/nginx/conf.d/www.confserver{server_name www.jy.com;root /code/www;index index.php index.html;client_max_body_size 20M;location ~\.php${# 定义php页面的路径如果跟默认的root一样可以不写root /code/www;# 定义php-fpm的访问方式fastcgi_pass127.0.0.1:9000;# 定义php的索引文件名跟站点默认index要匹配fastcgi_index index.php;# 定义fastcgi的解析路径fastcgi_param SCRIPT_FILENAME$document_root$fastcgi_script_name;include fastcgi_params;}}#注释如果我们将root定义在location里面那么每一个location里面都需要写路径2、创建站点目录文件、完成授权[rootweb01 ~]# mkdir -p /code/www[rootweb01 ~]# echo ?php phpinfo(); ? /code/www/index.php[rootweb01 ~]# echo Hello World /code/www/index.html授权 更改目录的所有者为nginx或设置通用权限[rootweb01 ~]# chown -R www.www /code/www# 设置目录和文件的权限目录755文件644安全且满足访问需求[rootweb01 ~]# chmod -R 755 /code/www[rootweb01 ~]# chmod 644 /code/www/index.php /code/www/index.html# 重新设置SELinux上下文递归应用到/code/wwwchcon -R -t httpd_sys_content_t /code/www# 可选永久生效避免重启后失效semanage fcontext -a -t httpd_sys_content_t/code/www(/.*)?restorecon -R /code/www3、完成主机映射可以通过域名访问物理主机映射文件 C:\Windows\System32\drivers\etc验证一通过Nginx是否可以正常访问PHP资源验证二PHP是否正常连接数据库编写配置文件[rootweb01 ~]# cat /code/www/mysqli.php?php$servernamelocalhost;$usernameroot;$passwordTf123.com;// 创建连接$connmysqli_connect($servername,$username,$password);// 检测连接if(!$conn){die(Connection failed: .mysqli_connect_error());}echo连接成功;?
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

网站建设 上海网站建设把自己做的网页变成网站

点击文末阅读原文免费下载ITIL流程设计体系文档8个最近走访几家正在推进ITIL 4的企业,发现一个普遍现象:预算充足,但钱总是花不到点子上。一家制造业集团的CIO苦笑着告诉我,他们去年投入200万做ITIL 4改造,结果大部分预…

张小明 2026/3/5 5:46:26 网站建设

联系我们网站模板win11优化大师

LangFlow:用可视化与自定义组件重塑 LLM 应用开发 在大模型时代,构建一个能理解用户意图、调用工具、检索知识并生成专业回复的 AI 智能体,早已不再是“写几行 prompt 调 API”那么简单。LangChain 的出现让这类复杂系统成为可能&#xff0c…

张小明 2026/3/5 5:46:27 网站建设

网站建设空间域名是什么厦门满山红网站建设

撰文:Michael Nadeau,The Defi Report编译:Glendon,Techub News在本轮市场周期里,表现最为亮眼的其实并非传统意义上的代币,而是加密股票。其中,Robinhood 的表现最为强劲。该股票在不到两年内上…

张小明 2026/3/5 5:46:27 网站建设

快速提高网站权重医院网站建设招标公告

D2DX作为专为《暗黑破坏神II》设计的现代化增强工具,通过DirectX 11技术彻底解决了这款经典游戏在现代PC上的兼容性问题。无论你是重温旧梦的老玩家还是初次体验的新手,D2DX都能提供前所未有的流畅度和视觉享受,让这款2000年的经典作品在2024…

张小明 2026/3/5 5:46:29 网站建设

合肥品牌网站建设网站开发价格估算

文章目录一、 实验效果展示二、 硬件准备与接线1. 实验材料2. 数码管引脚定义解析3. 接线原理4. 接线示意图三、 代码编写四、 核心知识拓展:共阳极 vs 共阴极1. 内部结构的区别2. 触发逻辑(电平)的不同五、 代码优化:从“流水账”…

张小明 2026/3/5 5:46:30 网站建设