Cài đặt nhanh drush (and pear) trên osx 10.8

Cài đặt nhanh drush (and pear) trên osx 10.8

Cài đặt nhanh drush (and pear) trên osx 10.8I was reconfiguring my localhost, and needed to install mighty drush (aka drupal shell http://www.drush.org or http://drupal.org/project/drush) on OSX 10.8 Mountain Lion. With a few tips from internets it took only a minute, but digging for that tips took much more of course. So here is a compilation, get your terminal ready.

I assume you've already set your up php.ini, if not, then just run sudo cp /private/etc/php.ini.default /private/etc/php.ini

Most probably you don't have PEAR (http://pear.php.net) installed yet, it's easy to do. PEAR is bundled with 10.8 (and at least 10.7) but just not configured:

sudo php /usr/lib/php/install-pear-nozlib.phar
pear config-set php_ini /private/etc/php.ini
pecl config-set php_ini /private/etc/php.ini
sudo pear upgrade-all

You are now all set to install drush via PEAR:

sudo pear channel-discover pear.drush.org
sudo pear install drush/drush

Done! Fist time you need to run drush as sudo as it needs to install additional library:

sudo drush

Which might make drush cache not writable by your user. So just claim drush for yourself:

sudo chown -R [your_osx_user] ~/.drush

Later on you won't need sudo for drush. Just navigate to you drupal project folder and run it from there.

Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Khanh Hoang

Khanh Hoang - Kenn

Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Giới thiệu 5 Hurdles cần phải biết tại Drupal 8

Giới thiệu 5 Hurdles cần phải biết tại Drupal 8

This means that if you have a 5-year-old Drupal 6 site, you will find major value in upgrading directly to Drupal 8. Many other benefits can justify the cost, including an easier to administer, responsive site.

Nga lo kinh tế không chịu nổi vì dịch COVID-19

Số người nhiễm COVID-19 ở Nga chính thức vượt qua Trung Quốc trên 87.000

Theo RIA Novosti, số người nhiễm COVID-19 ở Nga chính thức vượt qua Trung Quốc hôm đầu tuần này (trên 87.000 so với gần 83.000 ở Trung Quốc), xếp thứ 9 thế giới về quy mô.

6 Tools for Windows Maintenance

6 Tools for Windows Maintenance

In windows most of us are downloading, deleting and move file from here to there, and after this your windows has so many dump files...

Công ty diệt chuột T&C

 

Diet con trung