Using CLI Commands LVM
When sizes are required in a command line argument, units can always be specified explicitly. If you do not specify a unit, then a default is assumed, usually KB or MB. LVM CLI commands do not accept fractions.
When specifying units in a command line argument, LVM is case-insensitive; specifying M or m is equivalent, for example, and powers of 2 (multiples of 1024) are used. However, when specifying the –units argument in a command, lower-case indicates that units are in multiples of 1024 while upper-case indicates that units are in multiples of 1000.
All LVM commands accept a -v argument, which can be entered multiple times to increase the output verbosity. For example, the following examples shows the default output of the lvcreate command.
lvcreate -L 50MB new_vg
lvcreate command with the -v argument.
lvcreate -v -L 50MB new_vg
How to set up the admin’s password using CLI After Installation
When Parallels Plesk Panel is installed, a random password is generated for the user ‘admin’, which replaces the old scheme when the same default password was used on all installations. This change was done to protect servers with freshly installed Panel from hacking by bots that use the default password.
After the installation is finished, you can set the admin’s password being authenticated in the Panel with credentials of the server system power user, that is “root” on Linux systems.
The admin’s password can be set up during the Panel initialization (this is the best way), or afterwards.
Issue the following command (you should have the power user privileges):
On Linux/Unix:
PSA_PASSWORD=[new_password] /usr/local/psa/bin/init_conf –set-admin-password -passwd
Reference: http://parallels.com/
How to initialize the Panel via CLI:
Issue the following command (you should have the power user privileges):
On Linux/Unix:
/usr/local/psa/bin/init_conf –init -passwd buddyHTD -email buddy@serverbuddies.com
To initialize the Panel via GUI:
1. Log in to the Panel at https://[host-name-or-IP]:8443 using the server power user credentials.
2. Specify e-mail, new password, contact info and click OK.
Swapping between php versions when using suPHP and CLI with custombuild
If you have both suPHP and CLI installed on your system, but don’t feel like renaming all of your file.php to file.php4 (for example), there is another means to chose between php versions, without requiring to touch your php files.
To force php files to use suPHP (on the assumption your default php version uses CLI) use the following:
<FilesMatch “\.php$”>
AddHandler x-httpd-php5 .php
</FilesMatch>
This last one is on the assumption that php 5 is suPHP and CLI is php4. If php4 was suPHP, then you’d use x-httpd-php4 to force .php files to use suPHP with php 4.
Source: http://directadmin.com/
How to force php files to use CLI
To force php files to use CLI (on the assumption your default php version uses suPHP) create an .htaccess file in your public_html directory, with the following:
<FilesMatch “\.php$”>
AddHandler application/x-httpd-php .php
</FilesMatch>
As of version 4.3.0, PHP supports a new SAPI type (Server Application Programming Interface) named CLI which means Command Line Interface. As the name implies, this SAPI type main focus is on developing shell (or desktop as well) applications with PHP. There are quite a few differences between the CLI SAPI and other SAPIs which are explained in this chapter. It’s worth mentioning that CLI and CGI are different SAPI’s although they do share many of the same behaviors.
The list of command line options provided by the PHP binary can be queried anytime by running PHP with the -h switch
More: http://in2.php.net/manual/en/features.commandline.php