Posts Tagged ‘terminal’

Command Line – dstat

Wednesday, August 3rd, 2011

From command line:

$ dstat -f

This will show a great report in color for your system in real time.

For more documentation:

http://dag.wieers.com/home-made/dstat/dstat.1.html

 

Command Line – sar

Wednesday, August 3rd, 2011

sar – Collect, report, or save system activity information.

From command line:

$ sar -b

This command shows the amount of traffic and you can check for spikes in traffic

Symbolic link for mysql and mysqldump on a Mac using MAMP

Friday, July 22nd, 2011

If you use MAMP, and want to use terminal, you can NOT by default just type in terminal:

$ mysql ( enter )

You have to create a symlink for it to work:

sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin/mysql

sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin/mysqldump

Setting up pear, PHING on mac OSX 10.7.2

Friday, July 22nd, 2011

These instructions are for:
Computer/OS: Mac 10.6.8

Install pear in home directory or use command line “cd” to change directory using terminal:

$ cd ~ ( hit enter )

You need to change permissions on a few folders ( maybe create them ) to allow write access:
If the folders do not exist, from command line you create them:

$ mkdir /usr/local
$ mkdir /tmp/pear
$ mkdir /usr/bin/pear

Now via command line change the permissions:

$ sudo chmod -R 777 /usr/local/
$ sudo chmod -R 777 /tmp/pear
$ sudo chmod -R 777 /usr/lib/php
$ sudo chmod -R 777 /usr/bin/pear

(The instructions came straight from http://pear.php.net/manual/en/installation.getting.php)

Now using terminal run the following:

$ wget http://pear.php.net/go-pear.phar
$ sudo php -d detect_unicode=0 go-pear.phar

make sure you change the Installation Base: ( should be option 1 ) to /usr/bin/pear
As well as #5 the PHP code directory!

Change #1 and #5 to:

1. Installation base ($prefix)            : /usr/bin/pear
5. PHP code direcotry($php_dir)           : /usr/lib/php
( *** NOTE the other numbers/options can be left alone with whatever is set during installation *** )

Symbolic link to use “pear” from command line:

$ sudo ln /usr/bin/pear/bin/pear /usr/local/bin

PHING:

From the command line:

$ pear channel-discover pear.phing.info

Now you can install phing

$ pear install phing/phing

That should be it!