5

I'm managing a server with CentOS 6.5 x64 installed.

In my Ubuntu server, when I run composer or Laravel's artisan php cli command, parameters are colorful.

ubuntu terminal composer

But this doesn't happen when I SSH into a CentOS server and run composer again.

centos terminal ssh composer

As you can see, the directories are colored as it should, but php-cli apps are not (Laravel's artisan command has same issue, too).

(This issue also occurs nano editor if that would help.)

Is there a way to "colorize" such commands in CentOS?

Thanks in advance,

closed as off-topic by Dennis Williamson, mdpc, dawud, Wesley, Ward Apr 27 '14 at 2:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Dennis Williamson, mdpc, dawud, Ward
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Chances are the root user isn't setup for color in .bashrc or other files. If you run composer as a different user on your CentOS server, does composer or nano give colorized output as you expect? There are other things to check if the syntax coloring in nano isn't working. – Bert Apr 24 '14 at 14:54
  • @Bert sadly, when I login from another user, it's same. – Arda Apr 25 '14 at 7:18
  • Could you please run echo $TERM both on your ubuntu machine and your server and add the results to your question? – Gerald Schneider Apr 25 '14 at 13:37
  • 8
    php-symphony requires php-posix to support color, for Centos 6.5 that should be in the php-process package yum list php-process or yum provides php-posix – Brian Apr 25 '14 at 15:46
  • @Brian that's it! Thanks, I can see colors in composer now colorful. – Arda Apr 30 '14 at 8:47