09-03
0
Linux常用命令
1.sh命令
yum install -y dos2unix
dos2unix my.sh
2.tar
tar -zxvf file.tar.gz
3.文件权限
chgrp:修改文件所属用户组。
chown:修改文件拥有者。
chmod:修改文件的权限。
chown -R 账号名称 文件或目录
chown -R 账号名称:用户组名称 文件或目录
r -> 4 w -> 2 x -> 1 读写执行
chmod -R 权限值 文件或目录 #-R递归修改
[-rw-------]:权限数字为 600(6+0+0),表示只有拥有者有读写权限;
[-rwxr-xr-x]:权限数字为 755(7+5+5),表示拥有者有读、写、执行权限,而用户组和其他用户只有读和执行权限。
[-rwxrwxrwx]:权限数字为 777(7+7+7),即所有用户都有读、写、执行权限。
09-02
0
Centos7 最小安装
1.配置有线网络
安装必要的工具包括wifi和network-script
yum install -y iw wpa_supplicant
激活无线网络接口
ip link set wlp1s0 up
扫描当前环境中的无线网络
iw wlp1s0 scan|grep SSID
登录指定网络
wpa_supplicant -B -i wlp1s0 -c <(wpa_passphrase "SSID" "密码")
主动请求动态地址
dhclient wlp1s0
2.无线网脚本
#!/bin/bash
wpa_supplicant -B -i wlp1s0 -c <(wpa_passphrase "WIFI名称" "WIFI密码")
echo "----------------Initialize WiFi network"
dhclient wlp1s0
echo "----------------Automatically assign IP addresses"
09-02
0
Windows常用命令
1.删除休眠文件
Powercfg -h off
2.Win系统修复
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-image /RestoreHealth
3.清空Windows更新缓存
C:\Windows\SoftwareDistribution\Download
4.保留空间
启用系统保留空间
DISM.exe /Online /Get-ReservedStorageState
释放保留空间
DISM.exe /Online /Set-ReservedStorageState /State:Disabled
5.终端历史记录
C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine
06-22
0
TP nginx+mysql+php+redis+activemq 服务器原生搭建
TP框架 目录权限
缓存目录
chmod -R 777 /home/fastadmin/runtime
chmod -R 777 /home/fastadmin/application
chmod -R 777 /home/fastadmin/public
安装nginx
yum list installed | grep nginx
yum -y install nginx
systemctl start nginx
vi /etc/nginx/nginx.conf
systemctl restart nginx
systemctl status nginx
systemctl enable nginx
systemctl stop nginx
安装mysql
yum list installed | grep mysql
ps aux | grep mysql
cd /home && wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
rpm -ivh mysql57-community-release-el7-11.noarch.rpm
yum clean all
yum makecache
yum -y install mysql-community-server
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
systemctl start mysqld
systemctl status mysqld
systemctl enable mysqld
systemctl restart mysqld
安装php
sudo yum install -y epel-release
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install -y yum-utils
sudo yum-config-manager --enable remi-php74
sudo yum install -y php php-cli php-fpm php-common php-gd php-json php-mysqlnd php-pdo php-imagick php-zip
sudo systemctl start php-fpm
sudo systemctl enable php-fpm
yum list installed | grep php
sudo yum remove php*
安装redis
yum list installed | grep redis
ps aux | grep redis-server
cd /home && wget http://download.redis.io/releases/redis-3.2.8.tar.gz
tar xzf redis-3.2.8.tar.gz
cd redis-3.2.8 && make install
make
make install
cp /home/redis.conf /etc/
cp /home/redis.service /etc/systemd/system/redis.service
sudo vi /etc/systemd/system/redis.service
sudo systemctl daemon-reload
sudo systemctl start redis.service
sudo systemctl status redis.service
sudo systemctl enable redis.service
sudo systemctl restart redis.service
安装activemq
cd /usr/local
tar -xzvf apache-activemq-5.18.4-bin.tar.gz
cp /home/activemq.service /etc/systemd/system/
cp /home/activemq.xml /usr/local/apache-activemq-5.18.4/conf
cp /home/env /usr/local/apache-activemq-5.18.4/bin
sudo vi /etc/systemd/system/activemq.service
/usr/local/jdk/jdk-11.0.2
chmod +x /etc/systemd/system/activemq.service
systemctl start activemq.service
systemctl status activemq.service
systemctl enable activemq.service
systemctl restart activemq.service
systemctl stop activemq.service
/usr/local/apache-activemq-5.18.4/bin/activemq start
/usr/local/apache-activemq-5.18.4/bin/activemq stop
02-29
0
FastAdmin框架
add/edit 字段条件判断
$params = $this->request->post(‘row/a’);
新增功能 controtroller + mdoel + validate+view + public/assets/js +菜单规则
解决跨域问题
// check_cors_request();
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE'); //请求方法
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Control-Type, Content-Type, token, Accept, x-access-sign, x-access-time');
if (request()->isOptions()) {
exit();
}