共有 274 篇文章
PHP Install
2019-11-06 - 2024-09-18
PHP

Ubuntu 18.04

安装PHP7并配置Nginx

安装

 1sudo apt-get install software-properties-common python-software-properties
 2sudo add-apt-repository ppa:ondrej/php
 3sudo apt-get update
 4sudo apt-get -y install php7.3
 5
 6# 安装常用扩展
 7sudo -y apt-get install php7.3-fpm php7.3-mysql php7.3-curl php7.3-json php7.3-mbstring php7.3-xml php7.3-intl
 8
 9# 安装其他扩展(按需安装)
10sudo apt-get install php7.3-gd
11sudo apt-get install php7.3-soap
12sudo apt-get install php7.3-gmp
13sudo apt-get install php7.3-odbc
14sudo apt-get install php7.3-pspell
15sudo apt-get install php7.3-bcmath
16sudo apt-get install php7.3-enchant
17sudo apt-get install php7.3-ldap
18sudo apt-get install php7.3-opcache
19sudo apt-get install php7.3-readline
20sudo apt-get install php7.3-sqlite3
21sudo apt-get install php7.3-xmlrpc
22sudo apt-get install php7.3-bz2
23sudo apt-get install php7.3-interbase
24sudo apt-get install php7.3-pgsql
25sudo apt-get install php7.3-recode
26sudo apt-get install php7.3-sybase
27sudo apt-get install php7.3-xsl
28sudo apt-get install php7.3-cgi
29sudo apt-get install php7.3-dba
30sudo apt-get install php7.3-phpdbg
31sudo apt-get install php7.3-snmp
32sudo apt-get install php7.3-tidy
33sudo apt-get install php7.3-zip

配置Nginx+PHP

 1server {
 2    listen 80;
 3    listen [::]:80;
 4 
 5    root /var/www/akvicor.com/html;
 6    index index.php index.html index.htm index.nginx-debian.html;
 7 
 8    server_name akvicor.com www.akvicor.com;
 9
10    location / {
11        try_files $uri $uri/ /index.php$is_args$args;
12    }
13
14    location ~ \.php$ {
15        try_files $uri =404;
16
17        include fastcgi.conf;
18        fastcgi_pass 127.0.0.1:9000;
19    }
20}

编译安装PHP7

下载源码

PHP

MySQL Install
2019-11-06 - 2024-09-18

Ubuntu 18.04

安装MySQL8

1sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
2sudo apt update
3sudo apt install mysql-server
4# 查看mysql是否安装成功
5mysql -u root -p
6# 查看mysql字符集,mysql8字符集默认为utf-8。
7show variables like '%char%'; 
Nginx Install
2019-11-06 - 2024-09-18

Ubuntu 18.04

搭建Nginx服务

安装

Ubuntu可以从源直接安装nginx

1sudo apt-get update
2sudo apt-get install nginx

调整防火墙,以免出现各种问题

1sudo ufw app list

获得应用程序配置文件的列表:

1可用应用程序:
2CUPS
3Nginx Full
4Nginx HTTP
5Nginx HTTPS
6OpenSSH

正如你所看到的,Nginx有三个配置文件可用:Nginx FullNginx HTTPNginx HTTPS

递归实现枚举
2019-10-08 - 2024-09-15
枚举
检测IP地址
2019-10-07 - 2024-09-18
  • 当使用国外服务器搭建网站的时候, 可能遇到一些网站屏蔽了网站IP, 因此需要检测一下是否被屏蔽
  • 当使用国外服务器搭建网站的时候经常会碰到一些 IP 因为被墙导致网站不能访问,所以可以先检测一下 IP 是否被墙。
Strange Towers of Hanoi
2019-09-30 - 2024-09-15
将汉诺塔中的3跟柱子改为4根,求盘子数为1到12时将全部盘子从第一根移动到最后一根需要移动的次数。
IntelliJ IDEA Keymap
2019-09-29 - 2024-09-18
此快捷键说明我是翻译官方的快捷键说明的,方便查看,基于PHPStorm的官方Help来翻译的,其他系列的JetBrains软件应该都是一样的道理,其中如有错误,欢迎斧正。
禁止某文件夹内运行PHP脚本、禁止访问文件或目录执行权限的设置方法
2019-09-29 - 2024-09-15
Apache禁止某文件夹内运行PHP脚本、禁止访问文件或目录执行权限的设置方法
cannot associate program with context menu action
2019-09-29 - 2024-09-18

I installed a program called GitKraken and it’s pretty nice; But one thing it does during installation is to forcefully add a context menu item to open the current folder in it.

Unfortunately, since day 1, this has been broken. I’ve tried setting the association manually and it doesn’t work. Setting an association with the program doesn’t yield any different results. Is there anything else that can be done? I’ve even tried removing it from the registry.

This is all happening on Windows 10 x64.