enable Cron on chkserv


Create a crond file under the chkservd.d directory where all the services files are placed:
# pico /etc/chkserv.d/crond
Add the following and save the file:
service[crond]=x,x,x,/etc/init.d/crond restart,crond,root
Now you need to edit the chkservd configuration file and enable the crond service for monitoring
# pico /etc/chkserv.d/chkservd.conf
add the following line at the end of the file
crond:1
Now, save the file and restart the chkservd service for the new changes to take affect:
# /scripts/restartsrv chkservd
In order to verify if chkservd auto-restarts the crond service if found offline, stop the service manually
# service crond stop
and watch the logs
# tail -f /var/log/chkservd.log
You will notice that the crond service is restarted automatically within 5 minutes.

Dokumentasi untuk Stop Sync RAID

Dokumentasi untuk Stop Sync RAID
ini dulu
mdadm --manage /dev/md1 --fail /dev/sdb2
baru ini
mdadm --manage /dev/md1 --remove /dev/sdb2

mengaktifkan kembali
mdadm -a /dev/md1 /dev/sdb2

chkserv configuration

chkservd is a service running on all cPanel®
servers which monitors the state of processes.
● chkserv.d can be controlled using the
command:
– /etc/init.d/chkservd (start|stop|restart)
– /usr/local/etc/rc.d/chkservd.sh (start|stop|restart)
● The chkservd perl script is located at /
usr/local/cpanel/libexec/chkservd

You can add and remove services to be monitored
from chkservd by the files in /
etc/chkserv.d/
● You must also add the service to the chkservd.
conf with the following syntax:
service:1
● Each service has a indiviual file inside of /
etc/chkserv.d/ with the following syntax:
– #SERVICE = PORT, SEND, RESPONSE, RESTART
COMMANDYou can add and remove services to be monitored
from chkservd by the files in /
etc/chkserv.d/
● You must also add the service to the chkservd.
conf with the following syntax:
service:1
● Each service has a indiviual file inside of /
etc/chkserv.d/ with the following syntax:
– #SERVICE = PORT, SEND, RESPONSE, RESTART
COMMAND

Postgre Cpanel::AdminBin::adminrun(postgres) set error in context postgres

Recently with a cPanel server, we had this issue of not being able to create postgresql database even after the postgresql package is installed and database server is running. Fixing of one issue lead to another there by needing to fix all the errors.

    Cpanel::AdminBin::adminrun(postgres) set error in context postgres

    [2010-01-16 12:24:18 -0500] warn [postgres::listdbs] Encountered error in postgres::listdbs: Error from postgres wrapper: PostgreSQL has not been configured by the administrator. Unable to locate pgpass file.

This was fixed by doing these,

Login to WHM => SQL Services => Postgres Config => Click on “Install Config”.
Login to WHM => SQL Services => Postgres Config => “Set a Postgresql password also”

No error in cPanel after doing above. However that followed by an issue of created DBs not being appeared in the List DB page of Postgresql databases. Went to shell. Logged in as root . Switched to postgres. “su – postgres” . Ran the command “psql” and then

-bash-3.2$ psql
Welcome to psql 8.1.18, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

postgres=# \l

List of databases

Name | Owner | Encoding

-----------+----------+----------

postgres | postgres | UTF8

template0 | postgres | UTF8

template1 | postgres | UTF8

(3 rows)

postgres=# \q

No DB was created. Checked the logs /usr/local/cpanel/logs/error_log and it had entries likeERROR: role “username” does not exist which meant, no roles to create the database.

cd /var/cpanel/users && for x in *; do su -c "createuser -S -D -R $x" postgres; done

Linux Disk utilities

 

fdisk /dev/hda
(= "fixed disk". As root.) Linux hard drive partitioning utility (DOS has a utility with the same name). In the example above, I specified that I would like to partition the first harddrive on the first IDE interface, hence "hda". If I were you, i would backup any important data before using fdisk on any partition. I do not not know anybody who likes fdisk (either Linux or DOS edition)--I prefer easier to use cfdisk, see next command.

cfdisk /dev/hda
(as root) Hard drive partitioning utility, menu-based. Easier to use then the plain-vanilla fdisk (see the previous command). Physical drives can contain primary partitions (max 4 per disk), and logical partitions (no restriction on number). A primary partition can be bootable. Logical partitions must be contained within "extended partitions"; extended partitions are not usable by themselves, they are just a container for logical partitions. When partitioning a disk, I typically: (1) create a primary partition (2) make the primary partition bootable (3) create an extended partition, (4) create logical partition(s) within the extended partition.

Mengganti Halaman administrator Joomla

  1. Pertama kali, Jika menggunakan Joomla 1.0 silakan download file  JSecure Authentication atau jika menggunakan Joomla 1.5.x silakan download file plgSystemJSecure-1.0.9 .
  2. Masuklah ke halaman login administrator
  3. JIka menggunakan Joomla 1.0.x, pilih menu Module > Installer.

Script untuk melihat load pada server

#script gabungan hafidz

echo "Mw tampilan brp baris -script Hafidz ver 0.1-";

#read input
#a="$input"