首页
关于
推荐
分享盘
Search
1
Oracle云服务器 ARM版包安装
2,236 阅读
2
macOS 三模式分享
316 阅读
3
启用cloudflare代理后typecho无法进入后台
225 阅读
4
python离线环境部署搭建
211 阅读
5
Oracle Linux搭建Nginx+Flask环境
159 阅读
基础技术
Python
杂七杂八
macOS
生活琐碎
日流水账
登录
Search
标签搜索
flask
nginx
supervisor
webhook
oracle linux
macos
big sur
monterey
搬砖者
累计撰写
15
篇文章
累计收到
0
条评论
首页
栏目
基础技术
Python
杂七杂八
macOS
生活琐碎
日流水账
页面
关于
推荐
分享盘
搜索到
6
篇与
的结果
2021-12-16
CentOS7 LNMP Typecho环境搭建
安装CentOS7由云平台提供,此步骤略过安装Nginxyum install nginx -y systemctl start nginx #启动nginx systemctl enable nginx #开机自动启动 测试:开启云平台80端口,直接浏览器输入IP地址,即可显示nginx初始页面安装PHPyum install php php-devel php-fpm php-gd php-mbstring php-mysql -y systemctl start php-fpm #启动php-fpm systemctl enable php-fpm #开机自动启动 若采用SQLite方式,可能还需要以下步骤yum install php-pdo -y查看php运行状况,使用情况:netstat -tln|grep 9000 #php-fpm默认使用9000端口若无netstat命令,可能需要安装工具包yum install net-tools #安装net-tools工具包安装说明: Nginx:提供nginx主程序 Php:PHP主程序含给apache使用的模块 Php-devel:PHP的发展工具,这个与PHP外挂的加速软件有关 Php-mysql:提供给PHP程序读取mysql数据库的模块 php-gd:php处理图形的扩展库,使用GD库可以处理图片或生成图片。如验证码 php-mbstring:扩展库,用于处理多字节字符串 php-fpm:使用PHP-FPM来控制PHP-CGI的FastCGI进程安装MySQL因使用SQLite,此步省略参数配置配置PHPvim /etc/php-fpm.d/www.conf #修改php-fpm配置文件,把apache改为nginx查找apache,修改user和group的执行用户为nginx配置Nginxcd /etc/nginx/ #配置目录 cp nginx.conf nginx.conf.bak #备份 vim nginx.conf #修改 修改server如下:server { listen 80; listen [::]:80; server_name _; root /usr/share/nginx/html; index index.html index.htm index.php;#添加首页 # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; # 添加参数 gzip on; gzip_min_length 1k; gzip_buffers 16 64k; gzip_http_version 1.1; gzip_comp_level 6; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; } location ~ .*\.php(\/.*)*$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 上传typecho(1.1.17)wget http://typecho.org/downloads/1.1-17.10.30-release.tar.gz #下载 tar -zxvf 1.1-17.10.30-release.tar.gz #解压 rm /usr/share/nginx/html/* -Rf #删除原有所有文件,可选 mv build/* /usr/share/nginx/html/ chown nginx:nginx /usr/share/nginx/html/ #修改文件所属,未验证 chown nginx:nginx /usr/share/nginx/html/* #修改文件所属进入首页正常即可访问
2021年12月16日
57 阅读
0 评论
0 点赞
1
2