分类 server 下的文章

php的框架Hyperf 是基于 Swoole 4.4+ 实现的高性能、高灵活性的 PHP 协程框架。
开发的话,可以用sublime的sftp,写完自动上传到开发服务器上。这样调试方便,不然win下怎么搞都流程麻烦。

- 阅读剩余部分 -

国内一般都用centos7.6,国外用Ubuntu,因为下载速度,习惯的原因,默认这样。

2025更新年最新方法:
CentOS + Nginx 自动续期SLL
https://xigk.com/blog/index.php/archives/1557/

2020年写的:
Let’s Encrypt:https://letsencrypt.org/
Let’s Encrypt is a free, automated, and open Certificate Authority.
key:wss,https,ssl

第一种方法

用 acme.sh申请来自动续期ssl证书
acme说明:https://github.com/Neilpang/acme.sh/wiki/说明
https://www.cnblogs.com/esofar/p/9291685.html

- 阅读剩余部分 -

npm慢

npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist

1)单次使用 推荐
npm install --registry=https://registry.npm.taobao.org
2)

npm config set registry https://registry.npm.taobao.org
npm config get registry

3)用cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
这样就可以使用 cnpm 命令来安装模块了: cnpm install [name]

技术不是瓶颈,因为99%的公司和项目在技术成为瓶颈之前都死了。

服务器端程序绝大部分都是IO密集型的,运算性能不是瓶颈。

1)各种语言运算性能排行榜。c/c++ > java8 > nodejs5 > php7 > luajit > lua
2)各种语言IO密集性能排行榜。c/c++ = java8 = nodejs5 = php7 = luajit = lua
3)游戏服务器是个网络密集型的应用。

99%的游戏都不需要考虑性能问题,因为根本没那么多人玩,php的优势是开发部署极快。对比仅供参考,根据自己的来。

- 阅读剩余部分 -

说啥性能问题啊 99%项目上线都没有性能问题
根本就没那么多人玩
精辟啊。

win10安装PHP和composer
1.下载php,apache: https://www.apachehaus.com/cgi-bin/download.plx
https://windows.php.net/download/ 下载zip,解压。

https://www.apachehaus.com/downloads/httpd-2.4.43-o111f-x64-vc15.zip
https://windows.php.net/downloads/releases/php-7.4.3-Win32-vc15-x64.zip

2.下载composer,https://getcomposer.org/Composer-Setup.exe,安装。
3.composer慢解决:https://developer.aliyun.com/composer

- 阅读剩余部分 -

nginx配置java端口访问
xxx就是要访问的后缀
/很重要不然找不到相对路径了。

    location /xxx/ {
        proxy_pass       http://127.0.0.1:8081/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

springboot的配置文件有以下
application.properties
application-dev.properties 开发环境
application-prod.properties 运行环境
application-test.properties 测试环境

在application.properties中配置内容
spring.profiles.active=dev
说明是项目默认使用配置文件application-dev.properties

发布项目,打包成jar包之后运行
nohup java -jar ***.jar --spring.profiles.active=prod
表示运行使用的是application-prod.properties配置文件

测试环境同理