Posts Tagged ‘Linux’

Not able to connect to FTP in Plesk

January 13th, 2009

If your FTP connection through Plesk fails, there are a few things you can check first.

1. Log into the server via SSH (if you are using windows, you will need a SSH client. I use Putty

2. Make sure you access su (root access).

Now that you are logged in, type te following;

ftp localhost

If you get the message of;

Connected to localhost(127.0.0.1).
220 ProFTPD 1.3.0 Server(ProFTPD)[127.0.0.1]
Name(localhost:user):

Then the ftp server is working correctly. However if you do not get that, but instead get this;

ftp:connect:Connection refused

Then there is an issue on the server. So to look into this further we need to make sure that the ftp service is running. Since this is Plesk, it will be running Proftpd and it will be running out of the Xinetd service. To verif y this, type the following;

service xinetd status

You should get the following;

xinetd (pid 23532) is running…

Now type;

lsof -i tcp:21

You should get;

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME xinetd 23532 root 5u IPv4 55265282 TCP *:ftp (LISTEN)

If you do, please try to run the FTP localhost command again.

Ftp localhost

If you get a message that states that service is not available, likely the problem is with the hostname isn’t set correctly.

To check the hostname, you simply need to type hostname at the server command line. It will return the hostname.  To change this, you will want to log into plesk and goto Server>Server Preferences and change it here. You will also want to type hostname and the name at the command line. As an example, if I wanted to change it on my server, I would type;

Hostname myservername.com

The name will then take affect. Once you have done this, restart Xinetd.

Lastly, if all else fails, you can review the log files for the service by using the following commands;

less /var/log/messages | grep proftp
less /var/log/messages | grep xinetd

Updating Cpanel to Perl 5.8.8

January 7th, 2009

You may notice that if you attempt an easyapache update in Cpanel that you run into the following issue;

Premature end of script headers: /usr/local/cpanel/whostmgr/docroot/cgi/
easyapache.pl: Please check   /  usr /  local /  cpanel /  logs /  error_log  for the exact error.

This indicates that you have either a bad install or an out of date instance of Perl. You can correct this by doing the following;
SSH into the vps  / server and do the following;

cd /

wget http://layer1.cpanel.net/perl588installer.tar.gz

tar -xvzf perl588installer.tar.gz

cd ./perl588installer

./install

cd /

rm -rf ./perl588installer

rm ./perl588installer.tar.gz

rm -f /home/*/.cpanel-datastore/_usr_bin_perl_-v

All done!

Trouble installing Fantastico on a Cpanel server / vps.

January 6th, 2009

Recently I came across a ticket at work regarding getting Fantastico installed on a Linux Vps. The issue was that whenever you ran the install script, it fetched the files and then it stated Fantastico was installed. However, if you went to the Fantastico admin section, it simply asked you again to install Fantastico again. If you attempted to do this again, the cycle would repeat.
What I found out was that Perl was outdated as wellas Wget, so it wasn’t installed the files correctly and it wasn’t grabbing them either. So I did the following;

1. Upgrade perl to 5.8.8

2. Updated wget – http://www.keithdmitchell.com/2009/01/upgrading-wget-for-linux-servers/

3. Removed all instances of Fantastico from  /usr/local/cpanel/3rdparty/

4. Ran  rm -rf /usr/local/cpanel/base/frontend/*/fantastico

Once I did this, I ran the fastastico install again and it completed successfully.

You might have other experiences, but this helped get Fantastico working for me.

Upgrading wget for Linux Servers

January 6th, 2009

For 32-bit Linux Servers:

cd /root
rpm -qa wget
wget ftp://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/wget-1.10.2-3.2.1.i386.rpm
chattr -ia /usr/bin/wget
rpm -e wget
rpm -ivh –force wget-1.10.2-3.2.1.i386.rpm
rpm -qa wget

For 64-bit Linux Servers:

cd /root
rpm -qa wget
wget http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/x86_64/os/Fedora/wget-1.10.2-15.fc7.x86_64.rpm
chattr -ia /usr/bin/wget
rpm -e wget
rpm -ivh –force wget-1.10.2-15.fc7.x86_64.rpm
rpm -qa wget

Installing Zend Optimzer onto a linux server

December 30th, 2008

New Page 1

To install Zend onto a Linux server, its not as complex as it may seem and

its actually pretty easy. To do so, you will first need to SSH onto the linux

server. Once you do this, simply type the following to access the root

directory;

cd /root

Now that you are in the root directly, if you type the following, it will

pull the Zend files over to the servers. This is an install hosted on this blog;

wget

http://keithdmitchell.com/downloads/zend/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

Now that you have this, you are ready to install Zend.

Since the file is in the root directly, you will need to type the following

to start;

tar xvfx ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

Once that is done, you will need to goto the directly that the files are now

located, so type;

cd  ZendOptimizer-3.3.3-linux-glibc23-i386

Once you have changed directory, Make sure the install.sh file has been

created. To do this type this command:

ls -la

If you see the files, you are now ready to follow-up on the install. To start

the install process, type  the following;

./install.sh

This will start the install process and prompt you using a setup wizard. Make

you sure read and accept the license agreement (otherwise you will not be able

to install zend).

By default, zend will install to /usr/local/zend or

/usr/local/zend/etc. When it asks you if you are using a webserver,

enter yes, as you are using apache web server.

It will ask for your location of the php.ini file on your server. Depending
on

your OS and if you are running a control panel, it will end up being a different

location.

.

If you aren’t sure, then quit the install and type;

locate php.ini

This will attempt to locate the php.ini file for you. Zend will

attempt to locate it on the install process, but if it can’t, then you will need

to find the file.

Next it will ask if you are using Apache web server. Answer yes

as you are.

It will then ask for the apache control utility directory, Zend will locate
this for you.

Zend will then install, verify the install and then ask to restart the
webserver,

which you will need it to do.

Once this is done, the Zend optimizer is installed.

Congrats! You have now installed  Zend Optimizer v3.3.3.  If

you have a php test page, this will also now show;

Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies