好友
阅读权限10
听众
最后登录1970-1-1
|
本帖最后由 bloodfog 于 2018-5-2 17:04 编辑
最近翻出了落灰很久的Cubieboard一代,闲着没事儿做个家用迅雷下载小主机(静音低功耗适合常年开机)
一、烧录Debian系统下载debian-server-cb-card0-hdmi-v1.1.img.7z镜像 镜像下载地址 https://pan.baidu.com/s/1bppHqwf#list/path=%2FCubie_Download_CN%2FBoard%2FCubieBoard1%2FCubieBoard1-20120909%2FImage%2FDebian-server&parentPath=%2F 用Win32DiskImager.exe把debian-server-cb-card0-hdmi-v1.1.img镜像烧录到CLASS10 16G TF卡
二、安装SAMBA和迅雷Xware服务sudo apt-get update
sudo apt-get install locales #解决中文乱码
sudo apt-get install w3m wget unzip zip -y#修改SSH端口
nano /etc/ssh/sshd_config
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
sudo modprobe ip_tables#关闭防火墙
sudo apt-get install -y selinux-utils
sudo apt-get install -y setools
/usr/sbin/setenforce 0
#检查是否已经 成功 关闭服务:
getenforce#挂载NTFS磁盘,NTFS挂载缺点Linux无法修改目录访问权限,默认root 777
sudo apt-get install ntfs-3g -y
fdisk -l #查看分区信息
ls -l /dev/disk/by-uuid/ #查看各个分区对应的uuid
mkdir /mnt/thunder
/dev/sda1 /mnt/thunder ntfs-3g default 0 0 #/dev/sda1磁盘,迅雷下载到U盘或移动硬盘,此方法挂载重新插拔U盘盘符容易变化报错
UUID=7428554A28550D0C /mnt/thunder ntfs-3g default 0 0 #/dev/sda1磁盘UUID号,建议使用UUID号挂载磁盘 1、安装SAMBAsudo apt-get install samba samba-client samba-common -y 2、修改配置文件cd /etc/samba/
mv smb.conf smb.bak.conf
nano /etc/samba/smb.conf[global]
workgroup = WORKGROUP
server string = RainMan Samba Server %v
netbios name = RainManSamba
security = user
map to guest = Bad User
passdb backend = tdbsam[RAINMAN]
comment = project development directory
path = /home/thunder/TDDOWNLOAD
valid users = rmsam
write list = rmsam
printable = no
create mask = 0755
directory mask = 0755 3、建立共享目录配置权限mkdir /home/thunder
mkdir /home/thunder/TDDOWNLOAD
groupadd rmsam
useradd rmsam -g rmsam -s /sbin/nologin
smbpasswd -a rmsamchown -R rmsam:rmsam /home/thunder/
chmod -R 755 /home/thunder/ 4、迅雷安装mkdir /home/thunderinstall
cd /home/thunderinstall
wget http://phpwebhome.com/download/Xware_cubieboard.zip
unzip /home/thunderinstall/Xware_cubieboard.zip -d /home/thunderinstall
chmod -R 777 /home/thunderinstall
ln -s /lib/arm-linux-gnueabihf/ld-linux.so.3 /lib/ld-linux.so.3
./portal
获取绑定码
THE ACTIVE CODE IS: pmwjqh
http://yuancheng.xunlei.com/ 登陆添加设备绑定开机自动挂载硬盘
nano /etc/fstab
/home/thunder /mnt/thunder none bind 0 0设置随机启动
sudo nano /etc/init.d/rc.local
/home/thunderinstall/portal #添加随机启动http://192.168.1.121:9000/getsysinfo 查看状态 三、安装Nginx+PHP5+Mysqlsudo apt-get install nginx php-fpm php5-fpm php5-cli php5-curl php5-gd php5-mcrypt php5-cgi -y
sudo apt-get php5-mysql -y
sudo apt-get mysql-server -ynano /etc/nginx/sites-available/default #修改配置文件location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "open_basedir=$document_root:/tmp/";
include fastcgi_params;
}service php5-fpm reload
service nginx reload
service php5-fpm restart
service nginx restart
|
免费评分
-
查看全部评分
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|