Archive for the tag 'line'

Difference between the EasyApache interfaces in the browser and the command line.

The only difference is that the command line provides more flexible, powerful functionality.

For example, by running.

/usr/local/cpanel/scripts/easyapache –build

You can skip the configuration steps and build Apache immediately.

For a full list of command line arguments, run

/usr/local/cpanel/scripts/easyapache –help

The rebuild_phpconf script on your server allows you to udpate your server’s php.conf file (located at /usr/local/cpanel/bin/rebuild_phpconf). By doing this, you can change Apache’s PHP handler configuration, change the default version of PHP used by your server, and enable or disable the suEXEC feature.

Note: This script offers nearly the same functionality as the WHM Configure PHP and suEXEC feature. Users more comfortable with a graphical interface may prefer that method.

To see a list of all options and arguments for this script, type the following from the command line:

/usr/local/cpanel/bin/rebuild_phpconf –help

Using SED command line to delete line from a file.

d Delete pattern space. Start next cycle.

You can use the following one liner to remove one line (line 3) from a file.

$ sed -i 3d ~/.ssh/known_hosts

This will remove line 3 form the file ~/.ssh/known_hosts

Install the Parallels Plesk Panel Firewall module through the command line

Note: Parallels Plesk Panel Firewall module and other modules that come with Parallels Plesk Panel are located in the directory /opt/modules of Parallels Plesk Panel distribution.

You can install the Parallels Plesk Panel Firewall module to the Parallels Plesk Panel server in two ways: from the Parallels Plesk Panel interface (recommended), and from the command line.

Login as root to the server, where Parallels Plesk Panel is installed.

Run the command /plesk_installation_directory/admin/bin/modulemng –install –file=[plesk_firewall_module_filename], where ‘plesk_installation_directory’ is the directory you installed Parallels Plesk Panel to.

Example:

/usr/local/psa/admin/bin/modulemng –install –file=/opt/modules/firewall.rpm