Run env installation # Doc Ver: 1.2 # System: Debian amd64 # 1. Install # 以Debian系统安装,添加debian为用户,选择安装Mate and SSH服务。 # 2. Update system # Login with root and update system. apt update -y apt upgrade -y # 3. Install base package sudo apt install lighttpd vim nmap curl wget php-cli php-curl php-json php-cgi php-json php-mysql php-sqlite3 libfcgi php-fpm net-tools libglib2.0-bin sqlite3 sudo python3 python3-pip ppp pptp-linux xrdp tigervnc-standalone-server openssh-server -y # Redis sudo apt install redis-server redis node-redis python3-redis lua-redis php-redis lua-sql-mysql-dev libhiredis-dev -y # Python3 sudo pip3 install numpy sudo pip3 install scipy sudo pip install pyyawt openpyxl pandas pycodestyle pyflakes python-dateutil pytz setuptools six toml yapf # Database sudo apt install mariadb-server mariadb-secure-installation # Reboot and login as root. sudo apt install phpmyadmin # 4. Update user rights chmod +w /etc/sudoers vim /etc/sudoers # Change file as follow: # User privilege specification root ALL=(ALL:ALL) ALL debian ALL=(ALL:ALL) ALL #debian ALL=NOPASSWD:ALL # Allow members of group sudo to execute any command %sudo ALL=NOPASSWD:ALL #%sudo ALL=(ALL:ALL) ALL # Save and exit. chmod -w /etc/sudoers gpasswd -a debian sudo gpasswd -a debian adm # 5. Enable ifconfig ln -s /usr/sbin/ifconfig /usr/bin/ 7. 安装SA主程序 以debian登录 wget http://www.casstk.com/sa/install.sh && bash install.sh 结束后重启系统。 8. 增加自启动脚本 以debian登录 新增文件: sudo vim /etc/systemd/system/rc-local.service 编辑内容: [Unit] Description=/etc/rc.local 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 vim /etc/rc.local 内容: #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. exit 0 添加权限: sudo chmod +x /etc/rc.local 设置到系统启动: sudo systemctl enable rc-local 启动脚本: sudo systemctl start rc-local.service 检查服务状态: sudo systemctl status rc-local.service