在macos上利用vmware fusion安装Ubuntu

时间:2021-07-18 13:22:59

1. 安装vmware fusion

http://www.vmware.com/products/fusion

  下载以后,可以在网上找注册码,最好下载最新的,这里下载的是7的版本

2. 下载ubuntu

  http://www.ubuntu.com/download/desktop

我们下载的是ubuntu 14.04 LTS

3. 升级apt-get

  sudo apt -get update

  sudo apt -get upgrade

4. 安装

  a.安装nginx       sudo apt-get install nginx

  b. 安装php            php sudo apt - get install php5 - fpm

c. 编辑nginx default

sudo apt-get install vim sudo vim / etc / nginx / sites - enabled / default

    location ~ \.php$ {

		# With php5-fpm:
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
重启启动 sudo service nginx reload
如果启动有问题,那么需要去

    查看nginx的错误日志 vim /var/log/nginx/error.log

    卸载nginx apt-get purge nginx nginx-common nginx-full

d. 安装php5

sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-xcache

重新启动php   重新启动fpm sudo service php5-fpm restart

e.  安装phpmyadmin

     sudo apt-get install phpmyadmin

     sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html

    sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html