Fixed my corrupt database last night

March 3, 2019 分类:树莓派,Linux

For some reason, I turned off the power switch last night, before I did it, I forgot to shut down my home servers correctly. Then, it was not a surprise the database on one of my Raspi crashed. I've been encountered this issue last time.
In order to solve this problem, Follow the hint, use "journalctl -xe" command to show related information. Modify "my.cnf", add " innodb_force_recovery > 0 " then start the database, afterward comment the " innodb_force_recovery > 0" line in again, restart the database subsequently. Done.

Use a SMB directory on Apache2

February 23, 2019 分类:树莓派,Linux

Install samba client:

apt-get install  samba-common smbclient samba-common-bin smbclient  cifs-utils

mkdir /mnt/abc
mount -t cifs //yourIP/yourShare /mnt/abc

If you need to add credentials at the mount time:


mount -t cifs //server/share /mnt/abc -o user=user,pass=password,dom=domain

If you want to dismount the share later:

umount /mnt/abc

Mount permanently:

sudo nano /etc/fstab

Add: //server/share /mnt/abc cifs guest,uid=1000,iocharset=utf8,x-systemd.automount 0 0

For more information visit:
https://wiki.ubuntu.com/MountWindowsSharesPermanentlyUbuntu forum

Access Permission(May not necessary):

chown -R $USER:$USER /mnt/abc
chmod -R 755 /mnt/abc

Apache2 on Debian based OS:

Modify apache2.conf add lines:

<Directory /mnt/abc/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted

</Directory>

Modify conf in sites-available directory:

    <VirtualHost *:80>
DocumentRoot /mnt/abc
ServerName myv.host.com
ServerAlias myv.host.com
ErrorLog logs/myvhost-error_log
CustomLog logs/myvhost-access_log combined
ServerAdmin [email protected]
<Directory /mnt/abc/>
    AllowOverride All
    Options +Indexes
</Directory>
</VirtualHost>

技嘉Brix BLPD5005使用感受

December 28, 2018 分类:树莓派

用了几天这小东西感觉还行,除了我觉得价格依然小贵。万恶的资本家,明明已经搞出了能耗比更高的东西,就是不肯下放。感觉J5005也是牙膏挤到头不得已的升级,10瓦功耗换来passmark3000(cpubenchmark.net)分的表现,低阶产品历史最高了。。HP这块入门NVME算是浪费了一半的性能,毕竟这个板子只支持pcie2.0 x2模式,但起码比SATA3是好的。见下图。
crystal

as

看电影自然没有悬念即便是局域网播放,9560AC的无线速度也不会拖后腿。玩我的世界视野开到中远,关闭抗锯齿可以畅玩,粒子效果全开偶有掉帧(Hmmm)。
打字儿看网页整机功耗6-7w,播放10G的1080p死侍2功耗为12w,玩我的世界20w。风扇声音平时是觉察不到的除非你特意去在乎~ 整体操作流畅。

这好像是目前你能花最少的钱买到性能功耗比最高的产品。如果你用它作为一个家用服务器是非常合适的,不间断开机每个月的电费大概不到5块钱(增加一块额外2.5寸机械盘的情况下)。


我的花费:

      准系统 899元  (plus会员849元)
      内存 4Gx2  320元(闲鱼,镁光DDR4 2666)    
      硬盘 259元  (jd活动 HP ex900 256G) 

特定用途下你的花费只会更少。

how to shutdown your raspberry pi

February 5, 2013 分类:树莓派

there are 4 different ways:
sudo shutdown -h now
sudo halt
sudo poweroff
sudo init 0

reboot raspberry pi got 3:
sudo reboot
shutdown -r now
shutdown -r 18:23:52 #reboot on 18:23:52定时重启在18点23分52秒关闭

raspi

January 31, 2013 分类:树莓派

树梅派做我这种无流量自娱自乐型主页真是太爽了。前两天很少见的停了次电,赶紧用上老ups。整体功耗非常低。强烈推荐