Lunix php 配置Yii2
来源:互联网 发布:手机隐藏录像软件 编辑:程序博客网 时间:2024/06/04 00:48
How to install Yii2 on ubuntu
How to install Yii2 on ubuntu using composer
Best way to install Yii Framework is using composer. Below we will see installation steps of a php framework yii2 on ubuntu. Let’s seeHow to install yii2 on ubuntu using composer. Before composer install we need some more packages installation. In this article (How to install Yii2 on ubuntu using composer) we will explore step by step all the commands to make yii2 installation easy and need to make yii2 install. You need to just run these commands step by step via terminal.
Requirement :-
PHP >= 5.4
Some of packages installed :- curl, openssl, mcrypt etc.
Below are the steps of installing yii2 on ubuntu using composer:- first we need to install latest update and upgrade of ubuntu server. so for this run below command at your terminal.
sudo apt-get updatesudo apt-get upgrade
After update we need to install php, apche, mysql (if not already installed)
Install php mysql and apache
sudo apt-get install apache2sudo apt-get install php5sudo apt-get install mysql-serversudo apt-get install php5-mysql
Now we need to install some of require extension (json, curl, mcrypt etc.) to run and download yii2 framework. and then restart apache server to setup all extension. May be you don’t need to all extension but it’s sometimes require extension you need.
#installing json extensionsudo apt-get install php5-json#installing unzip extensionsudo apt-get install unzip#installing curl extensionsudo apt-get install curl#installing openssl extensionsudo apt-get install openssl#installing mcrypt extensionsudo apt-get install php5-mcrypt#enable mcrypt extensionsudo php5enmod mcrypt#enable mod rewrite extensionsudo a2enmod rewrite#php gd extensionsudo apt-get install php5-gd#restarting apachesudo service apache2 restart
After successfully configure all php setup and require extension we need to install composer to download yii2 from remote server. for this first command will be for download composer using curl then second one move composer to local user directory for make composer globally use.
# installing composercurl -sS https://getcomposer.org/installer | php# move composer globallysudo mv composer.phar /usr/local/bin/composer# check composer workingcomposer
Note :- If you have already installed composer and it’s a old version you can update composer via below command
# updating composercomposer self-update
Now we have composer installed successfully on our ubuntu. and then we need to install yii2 on ubuntu. I am sharing steps below with terminal command run screen-shots that how to install yii2 on ubuntu.
Now need to install Composer asset plugin first using composer. Composer asset plugin allows managing bower and npm package dependencies.
# install Composer asset plugincomposer global require "fxp/composer-asset-plugin:1.0.0"
Now run below command to install yii2. First i am going switch to my preferred destination where i want to install yii2 so i am installing at /var/www/html/ directory.
Note:- During installation Composer may ask for your Github login credentials. This is normal because Composer needs to get enough API rate-limit to retrieve the dependent package information from Github.
# changing dircd /var/www/html/# install yii2composer create-project yiisoft/yii2-app-basic basic
You can also give your location at installation time see Full command of yii2 installation is there“–prefer-dist” means location where you want to install yii.
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
Now check your preferred location you have a new directory named “basic” you can rename it. also you can rename basic to your-name at installation time like below.
composer create-project --prefer-dist yiisoft/yii2-app-basic NewName
Now you are done with how to install yii2 on ubuntu. and open url on http://localhost/basic/web/ and bam. Now you can enjoy a new php framework. you can get more about this on official site ofyii framework and see what’s new features you are getting. you will really enjoy this php framework.
Note :- If you want to install the latest development version of Yii then you need to execute below command via terminal.
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
- Lunix php 配置Yii2
- linux-php-yii2-nginx项目配置
- LUNIX LDAP的配置信息
- CentOS6系统上Yii/Yii2/Nginx/PHP-FPM配置实例
- YII2.0配置index.php入口文件至根目录
- Yii2 配置yii2-redis扩展
- yii2 - 2-2: yii2配置 - 配置数据库
- yii2 requirements.php 文件
- window搭建php+yii2
- php+lunix的exec错误提示不能捕获解决
- Lunix 下安装 Linux, Apache, MySQL and PHP for wikimedia
- Lunix java web服务器配置--suse 11 为例
- Yii2-常用应用配置
- Yii2.0 邮件配置
- yii2的gii配置
- Yii2 获取配置信息!
- Yii2 使用基本配置
- yii2-环境配置说明
- Python常用全局函数记录
- 《挑战程序设计竞赛(第2版)》编程报告
- 点乘和叉乘的区别
- Linux-2.6.38在mini6410上的移植
- 简单的链表相关练习
- Lunix php 配置Yii2
- 编程与数学
- 安装完ads之后keil不能用,编译出错No compatible library exists with a definition of startup symbol __main.
- Python解析XML
- HDU 1166 敌兵布阵 (线段树入门_纪念一下)
- python类中的特殊属性and特殊方法and特殊文件
- struts2 使用注解方式配置
- 38款 流媒体服务器开源软件
- [BZOJ2729] [HNOI2012]排队