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

 
Chiến lược Seo quyết định thứ hạng cao

Chiến lược Seo quyết định thứ hạng cao

Chúng ta đã biết 4 thành tố quan trọng nhất trong thứ hạng từ khóa đó là “Tứ trụ trong Seo” bao gồm điều hướng Onpage,

Dự luật “giết chết internet” đang quay trở lại

Dự luật “giết chết internet” đang quay trở lại

Vừa thoát khỏi SOPA, cộng đồng mạng phải đối mặt với “cơn ác mộng” còn đáng sợ hơn thế.

Thị trường bất động sản du lịch những năm gần đây nở rộ khiến lĩnh vực này “khát” nhân sự, đặc biệt là nhân sự cao cấp.

Khát nhân sự Bất Động Sản du lịch đặc biệt là nhân sự cao cấp

Thị trường bất động sản du lịch những năm gần đây nở rộ khiến lĩnh vực này “khát” nhân sự, đặc biệt là nhân sự cao cấp.

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

 

Diet con trung