Skip to main content

Server

FAQs/HOW-TOs related to server administration.

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable.

if you try running the following:

phpize

and get this error

$PHP_PREFIX/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

Then it's because you don't have autoconf installed.

To fix this error, do the following:

yum install autoconf

or you can install from source (if you want to use the latest version)


cd /usr/local/src/

/* find latest version of m4 here: http://ftp.gnu.org/gnu/m4/ */

chattr (in /usr/sbin)

If something refuses to run, try:

chattr -R -suSiadAc /usr/sbin

Example: if dovecot doesn't run or install/upgrade, try doing...

whoami
lsattr /usr/sbin/dovecot

Using SSH with Screen for Session Management

Customize your ~/.screenrc

source: http://magazine.redhat.com/2007/09/27/a-guide-to-gnu-screen/

New Server Checklist for directadmin (2009)

-Add all your ips in directadmin under "IP management"
(and assign 2 ips to admin)
http://xx.xxx.xxx.xxx:2222/CMD_IP_MANAGER

-Register nameserver at registrar

How to enable SpamAssassin on DirectAdmin

Source

How to change IP address on Linux server

1. IP
/etc/sysconfig/network-scripts/ifcfg-eth0

2. DNS
/etc/resolv.conf
/etc/hosts

3. Router
/etc/sysconfig/network

4. Restart the network
/etc/rc.d/init.d/network restart

How to override open_basedir settings in Plesk

Plesk will overwrite any httpd.conf settings unless you include them in...

/home/httpd/vhosts/DOMAIN/conf/vhost.conf

How to automatically sync date and time on *nix server

Here's how we do it on RHEL:

Logged in as root:

* Create file at /etc/cron.hourly/clockset
* with these two lines only:

rdate -s time-a.nist.gov > /dev/null
hwclock --systohc > /dev/null

SSL help

SSL Location:

SSH to the old server and go to /usr/share/ssl/certs/, here you find the www.domain.com.crt (SSL Certificate) and the www.domain.com.cabundle (Cabundle), You will find the key www.domain.com.key at /usr/share/ssl/private/ path.

How-to: Secure tmp directories on linux

source: www.eth0.us: How-To: Secure your temp directories

Every system needs temporary folders that any user is able to read and write BUT these directories should not be able to execute programs or scripts. Though this will only protect you from somebody running the script directly it will help with a large portion of the automated rootkits and trojans that script kiddies use. They will still be able to put the files on the system but they will be unable to execute them and create the back door. One of the biggest problems is php injection via apache in which people will have apache download and then run an exploit. Securing the temp directories is probably the single biggest thing you can do towards securing your server.

Secure Your Apache With mod_security

source: howtoforge.com

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 07/05/2006

Command line reference for Oracle, Windows, Linux and OS X

source: http://www.ss64.com