|
没人回复啊,
我觉得应该可以的,
apt-get能安装的应该都可以用.
我在用Armbian
和debian ubuntu一样,
和redhat不同.
- ######################################################################
- ## 1. 第一次连接
- ######################################################################
- # 固件下载地址 https://www.right.com.cn/forum/thread-788004-1-1.html
- # root 1234
- # 修改密码
- # 创建用户
- ######################################################################
- ## 2. 准备工作
- ######################################################################
- # A. 配置dash 选 NO
- dpkg-reconfigure dash;
- # B. 设置时区
- (echo 4;sleep 1;echo 9;sleep 1;echo 1;sleep 1;echo 1;)|tzselect;TZ='Asia/Shanghai';export TZ;date;
- # C. 修改主机名
- host_name="Phicomm-N1";hostname;echo $host_name > /etc/hostname;cat /etc/hostname;hostname $host_name;hostname;
- # D. 彩色终端
- sed -i '/PS1=/d' ~/.bashrc;sed -i '/umask/d' ~/.bashrc;echo 'PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]\[$(tput sgr0)\]\[\033[38;5;1m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"' >> ~/.bashrc;echo 'umask 022' >> ~/.bashrc;source ~/.bashrc;
- # E. 查看和编辑源
- nano /etc/apt/sources.list;
- # 可以修改成以下源
- deb http://mirrors.ustc.edu.cn/debian stretch main contrib non-free
- deb http://mirrors.ustc.edu.cn/debian stretch-updates main contrib non-free
- deb http://mirrors.ustc.edu.cn/debian stretch-backports main contrib non-free
- deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
- # F. 更新源,安装必要软件
- apt-get update;apt-get install -y wget curl screen unzip bzip2 psmisc;screen -S install;
- # G. 设置固定IP
- nano /etc/network/interfaces
- # 修改相应位置内容
- iface eth0 inet static
- address 192.168.2.33
- netmask 255.255.255.0
- gateway 192.168.2.1
- dns-nameservers 192.168.2.1 114.114.114.114
- # 或者指定 MAC (还是DHCP好)
- hw ether FC:7C:02:D0:61:41
- # 重启网络 (好像没用,要reboot重启)
- systemctl restart networking.service;systemctl restart network-manager;
- ######################################################################
- ## 3. Docker 及 管理工具
- ######################################################################
- # A. 安装 Docker
- curl -fsSL https://get.docker.com -o get-docker.sh;
- sh get-docker.sh --mirror Aliyun;
- # B. 配置 Docker 国内源
- nano /etc/docker/daemon.json
- # 输入自己找到的国内源
- {
- "registry-mirrors": ["https://btXXXX5o.mirror.aliyuncs.com"]
- }
- # 重载
- systemctl daemon-reload;systemctl restart docker;
- # C. 安装 docker 管理工具 portainer ,装完就可以在 http://ip:9001 里管理 docker
- docker run -d --name server_Portainer_docker_web_cp --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data -p 9001:9000 portainer/portainer
复制代码 |
|