A4為 210mm / 297 mm
最近需要依文件比例調整為A4畫面尺寸

1/2長之

A4為 210mm / 297 mm
最近需要依文件比例調整為A4畫面尺寸
1/2長之
開啟文字模式
systemctl set-default multi-user.target
開啟圖型模式
systemctl set-default graphical.target
程式產生器/利用EXCEL合併LINUX/或資料庫的語法,
# For interoperability with macOS vfs objects = catia fruit streams_xattr fruit:encoding = native streams_xattr:prefix = user. streams_xattr:store_stream_type = no
POSTFIX 強制開啟郵件加密的功能,解除GMAIL的未加密的安全警示.
編輯postfix 的設定檔.
vi /etc/postfix/main.cf
#加入下語法
smtpd_tls_security_level = may
smtp_tls_security_level = may
上面的語法會對對方支援加密的條件下,優先加密發送經過TLS加密的信件.但是當對方伺服器無加密功能時也不會強制退件.
Clamd-deamon + amavisd + postfix 防毒的問題出現權限不足的問題
Sep 27 04:35:52 mail amavis[18546]: (18546-05) (!)run_av (ClamAV-clamd) FAILED – unexpected , output=”/var/lib/amavis/tmp/amavis- /parts: lstat() failed: Permission denied. ERROR\n”
Sep 27 04:35:52 mail amavis[18546]: (18546-05) (!)ClamAV-clamd av-scanner FAILED: CODE(0x55cf0e68f050) unexpected , output=”/var/lib/amavis/tmp/amavis parts: lstat() failed: Permission denied. ERROR\n” at (eval 110) line 950.
Sep 27 04:35:52 mail amavis[18546]: (18546-05) (!)WARN: all primary virus scanners failed, considering backups
最近設置好的郵件防毒和出現權限的問題
sudo usermod -a -G clamav amavis
sudo usermod -a -G amavis clamav
把clamav 和amavis兩個權限互給-
sudo service postfix restart
sudo service amavis restart
sudo service clamav-daemon restart
之後重新啟動就可以解決了
draw.io 是一個非常好用的繪圖軟體.他提供了非常多常用的ICON用來設計圖,使用上非常的直覺.他也提供了離線版本:
https://github.com/jgraph/drawio-desktop/releases
這裡有持續更新的最新版本 /你可以在這裡下載到 Windows Installer, Window No Installer, Mac, Linux – deb, snap, AppImage or rpm 的幾種安裝格式.
sudo snap install drawio --edge
最近把家裡的centos 7伺服器改成了新19.04版本的,但是發現完全找不到開機執行的RC.LOCAL 檔,只好自行重建了
sudo vi /etc/systemd/system/rc-local.service
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
完成後存檔記錄.
sudo touch /etc/rc.local
sudo chmod +x /etc/rc.local
sudo vi /etc/rc.local
加入預設的啟動SHELL內容:
#!/bin/sh -e
exit 0;
sudo systemctl enable rc-local
重新啟動電腦就完成設置了.
樹苺派在2019年升級到了新的debian 10 也提供了新版本的php 使用,所以我們今天就針對php版本重新進行安裝,基本的laravel的環境.
sudo apt install php7.3 php7.3-curl php7.3-gd php7.3-imap php7.3-json php7.3-mysql php7.3-opcache php7.3-xmlrpc php7.3-xml php7.3-fpm php7.3-zip php7.3-mbstring php7.3-sqlite3 php7.3-cli php7.3-readline -y
vi /etc/php/7.3/fpm/pool.d/www.conf
#—-以下內容修改
#把 www-data 改成pi
;user = www-data
;group = www-data
user = pi
group = pi
###
;listen.owner = www-data
;listen.group = www-data
改成
listen.owner = pi
listen.group = pi
service php7.3-fpm start
systemctl enable php7.3-fpm
sudo apt-get install composer
sudo apt-get install nodejs
sudo apt-get install npm
因為laravel需要用到nodejs所以安裝這些套件
sudo apt-get install nginx
sudo vi /etc/nginx/nginx.conf
#user www-data;
user pi;
sudo vi /etc/nginx/sites-available/default
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
# fastcgi_pass unix:/run/php/php7.3-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
sudo serivce nginx start
sudo systemctl enable nginx
composer create-project laravel/laravel laravel –prefer-dist
生成的laravel目錄會放置於/home/pi/laravel
sudo vi /etc/nginx/sites-available/default
#原始內容
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
#更改為以下內容
root /home/pi/laravel/public;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
sudo serivce nginx start
打完收功
樹苺派設定固定IP的方式:
vi /etc/network/interfaces.d/eth0
#auto eth0 是啟動!!!
auto eth0
iface eth0 inet static
address 192.168.1.222
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 168.95.1.1 8.8.8.8
vi /etc/reslove.conf
nameserver 168.95.1.1
nameserver 8.8.8.8
如果要同時開立無線網路/及有線網路時要指定default gateway
sudo route add default gw 192.168.1.1