Difference between revisions of "install xpanel"

From WebHostingNeeds.com
Jump to: navigation, search
m (Test User Registration)
m (Setting Permissions)
Line 194: Line 194:
 
chmod -R 777 /usr/local/xpanel/log
 
chmod -R 777 /usr/local/xpanel/log
 
chmod -R 777 /usr/local/xpanel/named
 
chmod -R 777 /usr/local/xpanel/named
 +
chmod 755 /usr/local/xpanel/*.pl
 +
chmod 755 /usr/local/xpanel/*.sh
 +
chmod 755 /usr/local/xpanel/rc.pureftpd
 
</pre>
 
</pre>
 
  
 
== Upload Main Website ==
 
== Upload Main Website ==

Revision as of 22:22, 7 September 2013

Basic Install

  • Extract xpanel_117.tar.gz
  • Upload xpanel folder to /usr/local/xpanel


yum -y update
yum -y install lynx
yum -y install nmap 
yum -y install ncurses-devel
yum -y install automake
yum -y install autoconf
yum -y install gcc
yum -y install gmake
yum -y install patch
yum -y install make
yum -y install libcpp
yum -y install libgcc
yum -y install libstdc++
yum -y install gcc4
yum -y install gcc4-c++
yum -y install gcc4-gfortran
yum -y install dos2unix
yum -y install libtool
yum -y install gcc-c++
yum -y install gcc-c++ compat-gcc-32 compat-gcc-32-c++


Edit Config.pm

vi /usr/local/xpanel/Conf/Config.pm

Find

'domains' => '.xpanel.de, .xpanel.info, .xpanel.net, .xpanel.org, .xpanel.us',

Replace With

'domains' => '.ratedxhost.com',


Find

  # Sign-Up web site.
'web_site' => 'http://www.xpanel.com',
'cgi_bin' => 'http://www.xpanel.com/cgi-bin',

Replace with

  # Sign-Up web site.
'web_site' => 'http://www.ratedxhost.com',
'cgi_bin' => 'http://www.ratedxhost.com/cgi-bin',

Find

'mysql_admin_password' => 'Your_MySQL_PassWord_Here',

Replace Your_MySQL_PassWord_Here with your actual mysql password.


Find

'virtualhost_ip' => '123.45.67.89',

  # Your own Domain Name Servers
'name_servers' => {
	'ns1' => 'ns1.xpanel.net',
	'ns2' => 'ns2.xpanel.net',
	'IP1' => '123.45.67.88',
	'IP2' => '123.45.67.89'
},

Replace with your vhost IP and name server IPS.

Also change value for orgname, orgmail, business_email


Edit xp_httpd.conf

vi /usr/local/xpanel/Conf/xp_httpd.conf


Find

NameVirtualHost 123.45.67.89
<VirtualHost 123.45.67.89>

Replace with your vhost IP.

Find

CustomLog "|mysql -hlocalhost -uxpanel -pXPanel XPanel" mysql

Update with your mysql login.

Add following virtual host entry for the main web site

<VirtualHost 198.27.126.137:80>
ServerName ratedxhost.com
ServerAlias www.ratedxhost.com
DocumentRoot /home/ratedxhost.com/public_html
ServerAdmin [email protected]
CustomLog /var/log/httpd/ratedxhost.com.log combined
ScriptAlias /cgi-bin/ /home/ratedxhost.com/public_html/cgi-bin/
<Directory "/home/ratedxhost.com/public_html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Edit httpd.conf

vi /etc/httpd/conf/httpd.conf

Add below

Include "/usr/local/xpanel/Conf/xp_httpd.conf"


Import MySQL DB

SQL will auto create db, so don't create it manually.

mysql < XPanel.mysql


Install Perl

yum install perl-CGI perl-CGI-Session


Testing vHost

mkdir -p /home/vhosts/whn.ratedxhost.com
echo "test" > /home/vhosts/whn.ratedxhost.com/index.html
service httpd restart

Now access web site

http://whn.ratedxhost.com

If web site is working, apache name virtual host is working properly. You need wildcard dns set properly before getting this work.


Setting Permissions

chmod 777 /home/vhosts
chmod -R 777 /usr/local/xpanel/auth
chmod -R 777 /usr/local/xpanel/create
chmod -R 777 /usr/local/xpanel/delete
chmod -R 777 /usr/local/xpanel/insert
chmod -R 777 /usr/local/xpanel/templates
chmod -R 777 /usr/local/xpanel/backups
chmod -R 777 /usr/local/xpanel/log
chmod -R 777 /usr/local/xpanel/named
chmod 755 /usr/local/xpanel/*.pl
chmod 755 /usr/local/xpanel/*.sh
chmod 755 /usr/local/xpanel/rc.pureftpd

Upload Main Website

Upload xpanel cgi-bin folder to doc root of main web site.

Also upload index.html, XPanel.css, bandwidth_exceed.html, agreement.html, stat, images

Set permission for cgi-bin folder and all cgi files to 755

chmod -R 755 /home/yourdomain.com/public_html/cgi-bin


When i access

http://yourdomain.com/cgi-bin/register.cgi

I get "Internal Server Error"

To debug, do

tail -f /var/log/httpd/error_log

On refreshing page, i got error

Can't locate Geo/IP/PurePerl.pm in @INC

To fix, run

yum -y install perl-CPAN
perl -MCPAN -e "install Geo::IP::PurePerl"

This fixed the error. No apache restart required.


Admin Area

Set Admin Password

htpasswd -c  /usr/local/xpanel/htaccess/.htpasswd admin

Login to Admin area at

http://yourdomain.com/cgi-bin/xpanel_admin/xpanel_admin.cgi
User: admin


Test User Registration

When i try to register, on second page, i get error

Error opening /usr/local/share/GeoIP/GeoIP.dat at /usr/local/share/perl5/Geo/IP/PurePerl.pm line 183.

This error fixed by installing geoip

Getting FTP Working

Edit

vi /usr/local/xpanel/Conf/xp_pureftpd.conf

Set mysql user name and password.

Install pureftpd from source as per install_pureftpd_from_source

During configure use

./configure --with-mysql --with-uploadscript --with-extauth --with-quotas --with-altlog


Start pureftpd with

/usr/local/xpanel/rc.pureftpd


To start ftp on boot

vi /etc/rc.local

Add

/usr/local/xpanel/rc.pureftpd