Linux
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable.
Posted Wed, 01/27/2010 - 1:10am
if you try running the following:
phpizeand 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 autoconfor 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/ */
How to search for text inside files in Linux
Posted Mon, 01/25/2010 - 1:57pm
To search for a text pattern in files in linux, do the following:
find / -type f -print0 | xargs -0 grep -i 'your pattern'
phpMyAdmin database export "Save as file" template
Posted Wed, 11/25/2009 - 11:18am
Whenever you do a database backup using phpMyAdmin, you are presented with a default file name structure for saves, usually like so:
__DB__
which basically gives you the name of the database you just backed up. Which is ok, however, most people would also like the date and time stamp included as well...
So...
This is how it's done... replace the above with :
__DB__-%F-%T__DB__ = name of database Example: my_database
%F = Same as "%Y-%m-%d" (year-month-day) Example: 2009-11-25
%T = time stamp . (24 hour format, hour_minute_second) Example: 11_07_31
which will save a file with the naming structure similar to:
my_database-2009-11-25-11_07_31.sql
You can easily use other date/time structure, to suit your personal preference.
chmod directories only
Posted Wed, 11/25/2009 - 3:18am
To chmod only directories within the directory you're in...
find ./ -type d -exec chmod 755 {} \;To chmod only files within the directory you're in...
find . -type f -exec chmod 644 {} \;RESOLVED: mysqld won't start
Posted Sun, 06/21/2009 - 7:24pm
In case your mysqld won't work with
# service mysqld restart
or
# service mysqld start
or
# service mysqld stopdo this:
# killall mysqldfollowed by:
Linux server: Set date and time
Posted Tue, 05/19/2009 - 10:52am
Set your correct timezone:
# timeconfig* You may need to install timeconfig 'yum install tzdata'
select your timezone.. select "system clock uses UTC"
Using SSH with Screen for Session Management
Posted Wed, 01/28/2009 - 11:11am
Customize your ~/.screenrc
source: http://magazine.redhat.com/2007/09/27/a-guide-to-gnu-screen/
update server with custombuild
Posted Tue, 01/27/2009 - 4:39pm
source: http://www.directadmin.com/forum/showthread.php?t=19221
cd /usr/local/directadmin
wget http://files.directadmin.com/services/custombuild/1.2/custombuild.tar.gz
Dovecot Problems
Posted Tue, 01/27/2009 - 9:59am
We use dovecot on our servers to process email. However, with IMAP it keep freezings so here are possible solutions.
# vi /etc/dovecot.conf
change and/or uncomment :
How to enable SpamAssassin on DirectAdmin
Posted Tue, 06/03/2008 - 6:44am
How to change IP address on Linux server
Posted Mon, 06/02/2008 - 1:02am
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
Posted Fri, 05/09/2008 - 11:51am
Plesk will overwrite any httpd.conf settings unless you include them in...
/home/httpd/vhosts/DOMAIN/conf/vhost.conf
How to use install and use Iperf
Posted Wed, 04/23/2008 - 11:30pm
Install iperf
cd /usr/local/src
wget http://internap.dl.sourceforge.net/sourceforge/iperf/iperf-2.0.4.tar.gz
tar xvfz iperf-2.0.4.tar.gz
cd iperf-2.0.4
How to install ImageMagick from source
Posted Mon, 04/21/2008 - 8:14pm
Go into /usr/local/src directory
cd /usr/local/src
First, we need to get all the required libraries...
yum search ImageMagick-devel
Install ffmpeg on CentOS/RHEL i386 via rpm
Posted Thu, 04/17/2008 - 9:06pm
This actually was the only thing that worked exactly like i wanted.
install ffmpeg via ffmpeginstall.2.X series
Posted Thu, 04/17/2008 - 3:15pm
directadmin yum.conf
Posted Thu, 04/17/2008 - 1:52pm
vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
How to install ffmpeg on centos/rhel via YUM
Posted Thu, 04/17/2008 - 1:33pm
I seen where a lot of server management companies are charging big bucks for this, so this might save you some time and money.
First
How to upgrade to PHP5.x and Apache 2.X
Posted Thu, 01/18/2007 - 5:19pm
http://www.directadmin.com/forum/showthread.php?s=70864a5c335e7705f268e661e0a6d78f&threadid=14285
Linux IP management
Posted Mon, 11/13/2006 - 11:28pm
# ifconfig eth1Â 192.168.10.12 netmask 255.255.255.0
# cd /etc/sysconfig/network-scripts
Edit the NETMASK lines in the ifcfg-eth0* and in the ifcfg-eth1* files as required.
Exim with SSL POP/SMTP/IMAP (using stunnel)
Posted Thu, 09/21/2006 - 10:01pm
DirectAdmin Checklist (incase something doesn't work)
Posted Thu, 09/14/2006 - 5:56pm
If email is not being received, but you're able to log in, it may be a permission's problem
(This may occur when restoring backup accounts)
# /usr/local/directadmin/scripts/set_permissions.sh email
If you're unable to su to root, even if inputing the correct password
SSL help
Posted Thu, 09/14/2006 - 3:04pm
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.
Linux: User Commands
Posted Mon, 09/04/2006 - 6:42pm
Close Open DNS Servers
Posted Mon, 08/21/2006 - 4:08pm
Source: http://www.webhostgear.com/321.html
For those of you who check your nameservers and other DNS related issues using the popular site dnsreport you're probbaly seeing Fail Open DNS Servers. We'll show you have to fixed named to close open dns servers.
How-to: Secure tmp directories on linux
Posted Sun, 08/20/2006 - 3:12pm
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.
Securing SSH: protocol SSH2 and hiding the direct access of root
Posted Mon, 08/14/2006 - 7:33pm
RKHunter Install
Posted Mon, 08/14/2006 - 7:08pm
Source: http://forums.cpanel.net/showpost.php?p=211290&postcount=102
1. Login to your server via SSH as root.
Then Type: cd /usr/local/src/
HOW-TO: Change Exim IP Address
Posted Wed, 05/24/2006 - 10:36am
If you are in the danger of getting your main server IP block by SpamCop because you had a few anoying spamers abusing your server then you could simply change your exim mailserver IP to avoid the effect of your main IP beeing blacklisted.
Preventing DDoS Attacks
Posted Tue, 05/23/2006 - 5:09pm
source: http://www.linuxsecurity.com/content/view/121960/49/
In this article I am trying to explain what DDOS is and how it can be prevented. DDOS happens due to lack of security awareness of the network/server owners. On a daily basis we hear that a particular machine is under DDOS attack or NOC has unplugged the machine due to DDOS attack . So DDOS has become one of the common issues in this electronics world. DDOS is like a disease which doesn't have an anti-viral developed. So we should be carefull while dealing with it . Never take it lightly. In this article i am trying to explain the steps/measures which will help us defend from DDOS attack ,up to a certain extend .