xud6的笔记本

Thoughts, stories and ideas.

linux

selinux 常用命令

查看是否有被selinux阻挡 sudo cat /var/log/audit/audit.log | grep denied boolean 查看boolean状态 sudo sestatus -b sudo sestatus -b | grep -i sendmail 设置boolean sudo setsebool -P $boolean名 $1或0 常用boolean boolean名意义httpd_can_network_connect允许httpd反向代理httpd_can_sendmail允许httpd发送邮件 semanager 安装semanager sudo yum install -y policycoreutils-python Centos 8 sudo yum install -y policycoreutils-python-utils 获取系统中的可用label sudo
1 min read
MCU

CC1310 Sensor Controller 变更RTC事件时序

在delay时间后以interval的周期运行Sensor Controller的RTC事件 #include DeviceFamily_constructPath(inc/hw_aon_rtc.h) uint32_t scifOsalEnterCriticalSection(void); void scifOsalLeaveCriticalSection(uint32_t key); //delay应大于8 void SceRTCDelay(uint32_t delay,uint32_t interval){ uint32_t key, sec, subsec,startTime; /* disable hwi to make sure startTime won't become past */ key = scifOsalEnterCriticalSection(); /* read current rtc value */ sec

使用存储空间整合SSD空间

最进空余了几块不同容量的固态硬盘打算将它们合并到一个分区用来放steam,可惜Windows10控制面板默认的存储池设置很不理想,只好用powershell 确认将加入存储池的硬盘 Windows会自动将没有分区的硬盘标为可加入存储池。 Get-PhysicalDisk -CanPool $True 创建存储池,使用4k逻辑扇区,默认关闭回写缓存 "ssd" 可以替换为任意希望的名字 $pd = Get-PhysicalDisk -CanPool $True $spname = "ssd" New-StoragePool -PhysicalDisks $pd –StorageSubSystemFriendlyName "*" -FriendlyName $spname –LogicalSectorSizeDefault 4096 –WriteCacheSizeDefault 0 创建虚拟硬盘 column相当于raid0中硬盘的数量,按我有的1个512,2个256,选择2可以使用大部分的空间并增加一倍的持续速度 $vdname = "games" $column = 2
1 min read
centos

Centos 7 安装wordpress

首先安装LAMP Centos 7 安装LAMP并配置event MPM和FastCGI [/centos-7-an-zhuang-lampbing-pei-zhi-event-mpmhe-fastcgi/] 以下假设wordpress安装在/opt/wordpress下 创建安装文件夹 sudo mkdir /opt/wordpress sudo chown -R `whoami`:`whoami` /opt/wordpress 准备数据库 mysql -u root -p 输入MySQL的ROOT密码 CREATE DATABASE 数据库名; CREATE USER 用户名@localhost IDENTIFIED BY '用户密码'; GRANT ALL PRIVILEGES ON 数据库名.* TO 用户名@localhost IDENTIFIED BY '用户密码'; FLUSH PRIVILEGES;
1 min read