Win10支持Ubuntu Linux Bash-apache+php+mysql环境搭建
2016-04-14 17:09
781 查看
转自:http://www.shuoeasy.com/blog/post/1082.html
win10它真的像ubuntu系统那样使用吗?接下来进行Apache+php+mysql环境搭建,以证明副系统的是否有料。
为了避免碰到太多碰壁情况,这里先“偷懒”使用apt-get方式安装程序。
启动时候遇到问题:
试一下mysql
进入/var/www/html目录新建info.php文件
初步体验windows副系统还是有料的,至于微软能不能搅局linux系统就只能通过时间考验才能知道答案了。
win10它真的像ubuntu系统那样使用吗?接下来进行Apache+php+mysql环境搭建,以证明副系统的是否有料。
为了避免碰到太多碰壁情况,这里先“偷懒”使用apt-get方式安装程序。
1.更新系统
sudo apt-get update
2.安装apache
sudo apt-get install apache2
启动时候遇到问题:
root@localhost:~# service apache2 start * Starting web server apache2 * * The apache2 configtest failed. Output of config test was: mktemp: failed to create directory via template '/var/lock/apache2.XXXXXXXXXX': No such file or directory chmod: missing operand after '755' Try 'chmod --help' for more information. root@localhost:~#解决办法:
sudo mkdir /run/lock sudo service apache2 start在浏览器输入"http://localhost/"试一下apache的是否能使用:
3.安装php
sudo apt-get install php5
4.安装mysql
sudo apt-get install mysql-server mysql-client输入mysql的root密码:
试一下mysql
# 启动mysql sudo service mysql start # 连接mysql mysql -uroot -p
5.写php代码测试
进入/var/www/html目录新建info.php文件<?php phpinfo();在浏览器输入“http://localhost/info.php”
总结:
初步体验windows副系统还是有料的,至于微软能不能搅局linux系统就只能通过时间考验才能知道答案了。
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- Linux socket 初步
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- ubuntu下chrome无法同步问题解决
- 运维入门
- 运维提升
- Linux 自检和 SystemTap