分类 默认分类 下的文章

1,MySQL设置

1,因为UNAS自身带一个MySQL的,但是默认存在的root,是空密码,这里要设置root的密码

mysql> use mysql; 
mysql> update user set password=password('mynewpassword123') where user='root' and host='localhost'; 
mysql> flush privileges;

2,默认是不允许外连的,所以要改成允许外连
把bind-address改成0.0.0.0

vim /etc/mysql/mariadb.conf.d/50-server.cnf 
bind-address            = 0.0.0.0

3,添加一个nextcloud的数据库和用户:

grant all privileges on nextcloud.* to 'nextcloud'@'%' identified by 'nextcloud123456';
CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

2,修改Apache隐藏版本号

改成:

vim /etc/apache2/conf-available/security.conf
ServerTokens Prod

3,NextCloud 修复不能设置位置信息

看了下代码,最终跟到这里:
apps/weather_status/lib/Service/WeatherStatusService.php

$url = 'https://nominatim.openstreetmap.org/reverse';
改成:
$url = 'https://ghproxy.com/https://nominatim.openstreetmap.org/reverse';
有两处。

后来证明不行,格式好像也改了。。

打开注册表
HKEY_CLASSES_ROOTDirectoryBackgroundshellexContextMenuHandlersNew
右边所有键值都删掉

恢复旧版菜单排列
reg add "HKCUSoftwareClassesCLSID{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}InprocServer32" /f /ve

恢复新版菜单
reg delete "HKCUSoftwareClassesCLSID{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f

tasklist只能看到PID和进程名,但是不知道全路径。

wmic process where processid=3876 get processid,executablepath,name

杀进程

taskkill /F /IM cmd.exe /T
taskkill /PID 1234 /F
ntsd -c q -p 3876
wmic process where name="mysqld.exe" delete
wmic process where processid=1234 call terminate