1、先设置SSH开机启动,前提是客户端和服务端均已安装,查看是否启动:ps -e | grep ssh
2、编辑/etc/rc.local ,在exit 0语句前加入:service sshd start 或 /etc/init.d/ssh start (顺便将apache和mysql也设置开机启动,方法都一样在exit 0语句前加入service apache2 start 和 service mysql start)。
3、安装PHP环境,命令如下:apt-get install php5 php-pear现在启动SSH、Apache以及MySQL这些服务,手动启动命令如下:service sshd start 或 /etc/init.d/ssh startservice apache2 startservice mysql startKali Linux 默认是安装了Apache和MySQL的,安装过程省略。(具体可参考http://www.laozuo.org/3423.html这篇文章),下次重启Kali,这些服务都会自动启动。
4、现在来创建数据库,使用root登录mysql,命令如下:mysql -u root -p 默认密码为空。创建数据库create database db; 然后quit退出。Web环境默认目录在var/www/html下。