在PHPstorm上安裝thinkPHP

>環境:ubuntu php7.2 phpstormphp

https://blog.csdn.net/roukmanx/article/details/85646174html

https://www.kancloud.cn/manual/thinkphp5/118006mysql

 

一.安裝
首先安裝apache二、php7.0和mysql,按順序,命令以下:sql

sudo apt-get install apache2 
 sudo /etc/init.d/apache2 restart
 sudo apt-get install php7.0
 apt-cache search libapache2-mod-php
 sudo apt-get install libapache2-mod-php7.0
 sudo apt-get install mysql-server mysql-client
 sudo apt-get install php7.0-mysql
 sudo apt-get install php7.0-gd php7.0-mbstring php7.0-xml

接着安裝composer,命令以下:thinkphp

apt-get install curl
//curl -sS https://getcomposer.org/installer | php
//mv composer.phar /usr/local/bin/composer
apt-get install composer

 

因爲在安裝過程當中,是國內訪問composer的速度比較慢,能夠參考這裏的說明使用國內鏡像,命令以下:apache

composer config -g repo.packagist composer https://packagist.phpcomposer.com


而後,安裝ThinkPHP5,命令以下:ubuntu

#這時候會提示要不要用root來作操做,能夠自行切換用戶,也能夠不理會直接回車瀏覽器

cd /var/www/html  /你的apachectl 項目目錄
//sudo composer create-project topthink/thinkphp [your-project-name]
composer create-project topthink/think=5.0.* tp5  --prefer-dist

 

最後,進一步來驗證是否正常運行,在瀏覽器中輸入地址:php7

http://localhost/tp5/public/composer

如上顯示,就安裝成功了。

二. phpstorm 經過composer 直接建立thinkphp項目  https://blog.csdn.net/wang740209668/article/details/73174920

選擇file->new>composer 按以下配置(網速太慢了)

相關文章
相關標籤/搜索