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

网站登录密码忘记了怎么办上海嘉定区网站建设公司

网站登录密码忘记了怎么办,上海嘉定区网站建设公司,怎样在赶集微网站做微招聘信息,营销型手机网站制作Linux安装配置nginxphp搭建 文章目录 Linux安装配置nginxphp搭建1.nginx源码包编译环境和安装相应的依赖1.1 安装编译环境1.2 安装pcre库、zlib库和openssl库 2.安装nginx2.1 在[nginx官网](https://nginx.org/en/download.html)上获取源码包并进行下载2.2 进行解压编译 3.启动…Linux安装配置nginxphp搭建 文章目录 Linux安装配置nginxphp搭建1.nginx源码包编译环境和安装相应的依赖1.1 安装编译环境1.2 安装pcre库、zlib库和openssl库 2.安装nginx2.1 在[nginx官网](https://nginx.org/en/download.html)上获取源码包并进行下载2.2 进行解压编译 3.启动nginx服务3.1 运行nginx3.2 关闭防火墙3.3 用本地浏览器服务虚拟机地址 4.修改nginx配置文件创建新的端口页面5.安装php5.1 使用yum安装php-fpm5.2 修改php的配置文件5.3 修改nginx的配置文件5.4 创建php页面文件并查看测试 1.nginx源码包编译环境和安装相应的依赖 1.1 安装编译环境 #安装编译环境 [rootlocalhost /]# yum install -y gcc gcc-c1.2 安装pcre库、zlib库和openssl库 pcre(Perl Compatible Regular Expressions)是一个Perl库是一个用C语言编写的正则表达式的函数库是轻量级的函数库。nginx的http模块使用pcre来解析正则表达式所以需要在linux上安装pcre库 zlib是一套通用的解压缩开源库提供了内存in-memory压缩和解压函数能检测解压出来的数据完整性。nginx使用zlib对http包的内容进行gzip所以需要在linux上安装zlib库。 openssl即open secure sockets layer是一个开源的安全套接字层的密码库。包括常用的密码加解密算法、常用的密钥算法、证书管理和SSL协议。nginx不仅支持http协议还支持https即在ssl协议上传输http所以需要在linux安装openssl库。 #安装pcre库 [rootlocalhost /]# yum install -y pcre pcre-devel#安装zlib库 [rootlocalhost /]# yum install -y zlib zlib-devel#安装openssl库 [rootlocalhost /]# yum install -y openssl-devel2.安装nginx 2.1 在nginx官网上获取源码包并进行下载 [rootlocalhost /]# mkdir nginxfile [rootlocalhost /]# cd nginxfile/#下载nginx源码包 [rootlocalhost nginxfile]# wget https://nginx.org/download/nginx-1.24.0.tar.gz2.2 进行解压编译 #解压源码包 [rootlocalhost nginxfile]# tar -zxvf nginx-1.24.0.tar.gz#编译配置 [rootlocalhost nginxfile]# cd nginx-1.24.0/ [rootlocalhost nginx-1.24.0]# ./configure --with-http_ssl_module [rootlocalhost nginx-1.24.0]# ./configure --with-stream [rootlocalhost nginx-1.24.0]# ./configure#执行安装 [rootlocalhost nginx-1.24.0]# make make install3.启动nginx服务 3.1 运行nginx 进入到/usr/local/sbin的目录下执行./nginx命令 [rootlocalhost nginx-1.24.0]# cd /usr/local/nginx/sbin/ [rootlocalhost sbin]# ls nginx#执行nginx [rootlocalhost sbin]# ./nginx #查看nginx的进程开启情况 [rootlocalhost sbin]# ps -aux | grep nginx root 72876 0.0 0.0 34444 384 ? Ss 21:27 0:00 nginx: master process ./nginx nobody 72877 0.0 0.2 66624 3932 ? S 21:27 0:00 nginx: worker process root 72887 0.0 0.0 12136 1120 pts/2 R 21:28 0:00 grep --colorauto nginx3.2 关闭防火墙 关闭防火墙防止本地主机访问时被拦截 [rootlocalhost sbin]# systemctl stop firewalld.service [rootlocalhost sbin]# systemctl status firewalld.service3.3 用本地浏览器服务虚拟机地址 出现welcome to nginx页面代表nginx安装启动完成 4.修改nginx配置文件创建新的端口页面 cd到/usr/local/nginx/html的路径下创建一个新的后缀为.html的文件 [rootlocalhost html]# touch web.html#在文件中编写新的网页 [rootlocalhost html]# vim web.html !DOCTYPE html html head titleHello World/title style html { color-scheme: light dark; } body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } /style /head body h1Hello world/h1 /body /htmlcd到/usr/local/nginx/conf的目录下修改配置文件添加以下配置 [rootlocalhost conf]# vim nginx.confserver {listen 8080; #浏览器访问虚拟机的8080端口时显示该页面server_name localhost;#charset koi8-r;#access_log logs/host.access.log main;location / { root html;index web.html index.htm; #访问8080端口时定位到web.html文件}#error_page 404 /404.html;# redirect server error pages to the static page /50x.html#error_page 500 502 503 504 /50x.html;location /50x.html {root html;}#停止nginx服务 [rootlocalhost sbin]# cd /usr/local/nginx/sbin/ [rootlocalhost sbin]# ./nginx -s stop#重新启动nginx服务 [rootlocalhost sbin]# ./nginx使用本地浏览器访问8080端口查看新建页面 5.安装php 5.1 使用yum安装php-fpm #因为源码安装的方式会需要搭载很多的依赖包安装编译过程也比较的繁琐所以这里采用yum源安装途径yum仓库安装的方法比源码包安装更加的简洁快速 [rootlocalhost /]# yum -y install php-fpm #启动php-fpm服务 [rootlocalhost /]# systemctl start php-fpm [rootlocalhost /]# systemctl status php-fpm ● php-fpm.service - The PHP FastCGI Process ManagerLoaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: Active: active (running) since Tue 2023-08-08 14:29:59 CST; 22s ago5.2 修改php的配置文件 #定位到php-fpm的文件下 [rootlocalhost /]# cd /etc/php-fpm.d/#修改www.conf文件内容 [rootlocalhost php-fpm.d]# vim www.conf在www.conf文件下注释掉listen /run/php-fpm/www.sock这段内容添加listen 127.0.0.1:9000 5.3 修改nginx的配置文件 #定位到nginx/conf文件下 [rootlocalhost nginx]# cd /usr/local/nginx/conf/#修改nginx.conf文件内容 [rootlocalhost conf]# vim nginx.conf取消掉server中location ~ \.php$内容中的注释 将刚刚取消注释的location ~ \.php$的fastcgi_param SCRIPT_FILENAME内容后面的/scripts$fastcgi_script_name修改为$document_root$fastcgi_script_name 在server的第一段location /内容下的index后面添加web.php文件名用于定位到后面即将创建的php页面文件 5.4 创建php页面文件并查看测试 #定位到nginx/html文件下 [rootlocalhost nginx]# cd /usr/local/nginx/html/#创建web.php页面文件 [rootlocalhost html]# vim web.php ?php phpinfo(); ?所有的文件配置完毕后需要重启php-fpm服务和nginx #重启php-fpm服务 [rootlocalhost html]# systemctl restart php-fpm [rootlocalhost html]# systemctl status php-fpm ● php-fpm.service - The PHP FastCGI Process ManagerLoaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: Active: active (running) since Tue 2023-08-08 15:02:04 CST; 7s agoMain PID: 76438 (php-fpm)#重启nginx #定位到nginx/sbin文件路径下 [rootlocalhost html]# cd /usr/local/nginx/sbin/#停止nginx [rootlocalhost sbin]# ./nginx -s stop #重新启动nginx [rootlocalhost sbin]# ./nginx#查看开启情况 [rootlocalhost sbin]# ps -aux | grep nginx root 76473 0.0 0.0 34444 440 ? Ss 15:03 0:00 nginx: master process ./nginx nobody 76474 0.0 0.2 66564 4172 ? S 15:03 0:00 nginx: worker process root 76503 0.0 0.0 12136 1192 pts/1 R 15:04 0:00 grep --colorauto nginx在本地浏览器访问web.php页面 注意如果访问不成功可以检查一下防火墙是否关闭
http://www.laogonggong.com/news/111971.html

相关文章:

  • 哪里有永久免费建站百度一下你就知道官网下载安装
  • 什么是网站域名青青网站怎么做
  • php网站底部文件重庆旅游攻略详细安排
  • 韩都衣舍网站建设pptseo技术介绍
  • 公司网站维护工作网页设计师在哪里工作
  • 炎陵网站建设iis添加网站访问权限
  • 做网站要买什么类型云空间nginx缓存方案 WordPress
  • 焦作市住房和城乡建设局网站天翼电子商务有限公司
  • 软件开发资源网站第三方电子商务平台的特点
  • 爱站网长尾关键词挖掘网站规划html
  • 制作网站服务公司wordpress自动备份插件
  • 网站想换一个空间怎么办哪个网站做ppt赚钱
  • 商业网站的后缀一般为做的很不好的网站
  • 网站的tdk指的是什么意思如何推广产品
  • 网站开发需求分析说明局域网 wordpress
  • 移动端网站开发语言目前引流最好的app
  • 深圳平湖网站建设公司郑州软件开发公司招聘
  • 网站推广最有效的方法网页设计培训班一般多少人
  • 如何做外贸网站优化推广商务通代码是不是只要放在网站根目录下就可以了
  • 屯昌第三方建站哪家好营销资源网
  • 网站建设公司选择意见书路由器做网站教程
  • 精通网站开发书籍莱芜金点子2023最新招聘
  • 网站设计师培训图片网站建设网站目的模板
  • 北京医疗网站建设公司排名哪家公司网站建设口碑好
  • 网站做照片c 能用来做网站吗
  • 上海高端网站制作手机网站策划书
  • 做一张网站图得多少钱有名的软件开发公司有哪些
  • 企业部门网站建设案例外贸平台推广方式
  • 加强二级部门网站建设flash 好的网站
  • 建设网站的要求吗株洲市建设局官方网站