设置SSH开机启动,前提是客户端和服务端均已安装,查看是否启动:
ps -e | grep ssh
安装PHP环境,命令如下:
apt-get install php5 php-pear
然后遇到这个问题:
Package php5 have no installation candidate
用以下三行解决
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6
现在启动SSH、Apache以及MySQL这些服务,手动启动命令如下:
service sshd start 或 /etc/init.d/ssh start
然后又遇到这个问题:
Failed to start ssh.service: Unit ssh.service not found.
sudo service ssh start
然后添加ssh.service
sudo systemctl enable ssh.service
sudo systemctl start ssh.service
sudo systemctl status ssh.service