This article is a record of the problems encounteredInstallation SectionRecommend everyone to see http://www.mr-wu.cn/aliyun-ecs-ubuntu/
Here excerpt the installation section:
install MySQL
sudo apt-get install Mysql-server
Installing Apache
sudo apt-get install apache2
Installing the PHP 5 environment
sudo apt-get install LIBAPACHE2-MOD-PHP5
sudo a2enmod php5
Restart Apache Service
sudo service apache2 restart
Next verify the PHP environment, edit a phpinfo.php file fangdao/var/www/html (This is the Ubuntu 14.04 environment)
sudo vim/var/www/html/phpinfo.php
combining PHP with MySQL
sudo apt-get install Php5-mysql
Then install composer This everybody own Baidu to find the next tutorial
During composer installation of Laravel, because this server only has 512M of memory ... Cause the following error
Exception ' Errorexception ' with Message ' Proc_open (): Fork Failed-cannot Allocate memory ' in Phar
Here's how to fix it:
execute the following command to open swap:
if=/dev/zero of=/varcount=1024/sbin/mkswap/var/swap.1/sbin/swapon/var /SWAP.1
Go back to/var/www/html/directory to perform composer update;
Because apache2 points to a Web site root directory that is/var/www/html/, you want to modify the configuration file 000-default.conf
vim/etc/apache2/sites-enabled/000-default. conf
Point the Web site root directory to/var/www/html/public/
And then modify/etc/apache2/apache2.conf's here.
<directory/var/www/> Options Indexes followsymlinks allowoverride None Require All granted</Directory>
Change the None allowoverride none to all. Save Restart Apache2
At this point the URL, if a 500 error occurs. That is because the storage
directory does not have 777 permissions.
到/var/www/html/目录 执行
chmod -R 777 Storage
Finish the call!
First time in Ubuntu configuration Apache+php+mysql Environment Run laravel5.1