Rabu, 12 Maret 2014

Install ZpanelX Web Hosting Control Panel on Ubuntu Server 12.04
================================================================

---> About Zpanel

Zpanel is free and open source web hosting control panel designed to work on platform Linux, Unix, Mac OSX and Windows OS based servers or computers. It easy to use and manage web hosting server for SOHO (Small Office Home Office) or professional servers.

ZpanelX support for unlimited resellers and  flawlessly integrates with MySQL Server, Apache2, hMailServer (on Microsoft Windows), Posfix (on Linux Distribution) and Filezilla (on Microsoft Windows) or ProFTPd (on Linux Distribution). For more detail about Zpanelx feature  you can check out @Zpanel_Feature_Page

---> Step-by-Step to Install ZpanelX 10.0.0 on Ubuntu Server 12.04

This guide will show Step-by-step to install Zpanelx 10 web hosting control panel  in ubuntu 12.04 LTS Server edition. There are two methods  to installing Zpanelx: Methods 1). Install automatically using script auto-installer . Methods 2) Install manually, direct download source Zpanelx then install and config manually. It is recommended that you only install ZPanelx 10 on a fresh installation of Ubuntu Server. On this case my IP Address : 192.168.56.2 and Hostname : preciseserver

---> Method 1 : Install automatically using script auto-installer

<-> Step 1. Login to your server  using ssh and make sure you have all the latest security updates for Ubuntu Server 12.04 by running following commands

$ sudo apt-get update

$ sudo apt-get upgrade


<-> Step 2. Download script Zpanelx10 auto-installer for Ubuntu 12.04. This script work on Ubuntu server 12.04 x64 and Ubuntu server 12.04 x86.

wget https://dl.dropbox.com/u/50880014/ZPX_ubuntu_12-04_auto_installer.v1.02.zip


<-> Step 3. Install package tofrodos  using apt-get command.

sudo apt-get install tofrodos

Tofrodos comprises one program, “fromdos” alias “todos”, which converts text files to and from these formats. Use “fromdos” to convert DOS text files to the Unix format, and “todos” to convert Unix text files to the DOS format.


<-> Step 4. Unzip ZPX_ubuntu_12-04_auto_installer.v1.02.zip then convert these script from DOS text files to the Unix format using fromdos command.

unzip ZPX_ubuntu_12-04_auto_installer.v1.02.zip

sudo fromdos ZPX_ubuntu_12-04_auto_installer.sh


<-> Step 5. Change the permission of the install script so it can be executed.

chmod +x ZPX_ubuntu_12-04_auto_installer.sh

Run the installation script to disable AppArmor daemon

sudo ./ZPX_ubuntu_12-04_auto_installer.sh

Reboot your computer

sudo init 6


<-> Step 6. After reboot, run again  installation script.

sudo ./ZPX_ubuntu_12-04_auto_installer.sh

This script ask for all of the required information (such as IP address, Hostname/domain and Mysql password)

===================================================
= Starting Auto Installer for ZPX on Ubuntu 12.04 =
===================================================
=-------------------------------------------------=
= By Xengulai (xengulai@xengulai.com) =
=-------------------------------------------------=
===================================================
Variable collection:
Enter Server Public IP Address: 192.168.56.2
Enter server name:
(this should be the reverse lookup of 192.168.56.2)
(ex. zeus.zpanelcp.com): preciseserver
Enter FQDN for ZPX (ex. panel.zpanelcp.com): preciseserver
Enter MySQL root password: reloaded
Updating Aptitude Repos: Done.
Creating initial folder structure: Done.
Downloading / Extracting ZPX From SF to Temp Directory at /opt/zpanel: Done.
Copying ZpanelX files to /etc/zpanel: Done.
Registering 'zppy' client: Done.
Installing main packages: Done.
Setting Zpanel MySQL access: Done.
Importing Zpanel Core Database: Done.
Setting up Apache configuration to work with ZPX: Done.
Setting up Network info for ZPX and Compiling Default VHOST: Done.
Configuring Postfix and Dovecot: Done.
Configuring Roundcube: Done.
Installing and Configuring ProFTPD: Done.
Installing and Configuring BIND: Done.
Compiling zsudo: Done.
Setting cron for daemon.php: Done.
Registering ZPPY Client: Done.
Removing temp files: Done.
Restarting all necessary services:
-- Apache2 Web Server Restarted Successfully
-- Postfix Server Restarted Successfully
-- Dovecot Server Restarted Successfully
-- ProFTPD Server Restarted Successfully
-- MySQL Server Restarted Successfully
-- Bind9 Server Restarted Successfully
Installing ballen/rustus zppy repo and modules:
-- gatekeeper: installed
-- system_logviewer: installed
-- kfm: installed
-- ftp_browser: installed
-- visitor_stats: installed
=====================================================================
= Installation and Configuration of ZPX on Ubuntu 12.04 is Complete =
=====================================================================
=====================================================================
= Install Log can be found at /home/precise/zpx_install.log
=====================================================================
=====================================================================
= Please REBOOT the server and open: =
= http://preciseserver/zpanel
= or =
= http://192.168.56.2/zpanel
= =
= USER: zadmin =
= PASS: password (Change on 1st login!) =
=====================================================================
=====================================================================
= This script is not written by official ZPX Support =
= Please do not ask them for official support on this =
=====================================================================
=...................................................................=
= By Xengulai (xengulai@xengulai.com) =
=...................................................................=


<-> Step 7. Download and Install post-installation patches/sql script

wget https://dl.dropbox.com/u/50880014/post-install_patches.zip

unzip post-install_patches.zip

mysql -u root -p YOUR_ROOT_MYSQL_PASSWORD < /home/precise/post-install_patches.sql

sudo cp -R /home/precise/panel/* /etc/zpanel/panel/*

==============================================================================================================

---> Methods 2: Install Zpanelx manually


<-> Step 1. Same as the first step in Method 1, Make sure you have all the latest security updates for Ubuntu Server 12.04 by running following commands

sudo apt-get update

sudo apt-get upgrade


<-> Step 2. Disable and remove ApparMor daemon, run following commands

sudo /etc/init.d/apparmor stop

sudo update-rc.d -f apparmor remove

sudo apt-get remove apparmor

sudo shutdown -r now


<->Step 3. Download Zpanelx 10 for linux. Download it using wget command

wget https://dl.dropbox.com/u/50880014/zpanelx-master.tar.gz


<-> Step 4. Extract zpanelx-master.tar.gz anywhere and run file prepare.sh

sudo tar -zxvf zpanelx-master.tar.gz

cd zpanel-master/etc/build

sudo chmod +x prepare.sh


<-> Step 5. Now copy all file and folder in the directory zpanel-master into /etc/zpanel/panel

sudo cp -R ../../* /etc/zpanel/panel/


<->Step 6. Copy configuration file for ubuntu server 12.04 into directory /etc/zpanel/configs

sudo cp -R /etc/zpanel/panel/etc/build/config_packs/ubuntu_12_04/* /etc/zpanel/configs/


<-> Step 7. Set permisson phpmyadmin configuration file (config.ic.php)

chmod 644 /etc/zpanel/panel/etc/apps/phpmyadmin/config.inc.php


<-> Step 8. Install the base packages Apache,MySQL and PHP5

sudo apt-get install apache2 mysql-server libapache2-mod-php5 libapache2-mod-bw php5-common php5-suhosin php5-cli php5-mysql php5-gd php5-mcrypt php5-curl php-pear php5-imap php5-xmlrpc php5-xsl libdb4.8 zip webalizer


<-> Step 9. Set up zpanelx database config and import zpanel database

sudo nano /etc/zpanel/panel/cnf/db.php

$host = "localhost";
$dbname = "zpanel_core";
$user = "root";
$pass = "YOUR_ROOT_MYSQL_PASSWORD";

mysql -u root -p YOUR_ROOT_MYSQL_PASSWORD < /etc/zpanel/configs/zpanel_core.sql


<-> Step 10. Configure Apache2 :

To add the ZPanel generated Apache2 config, we need to add the following line:-

edit /etc/apache2/apache2.conf

comment out:

#Include sites-enabled/

add at bottom:

Include /etc/zpanel/configs/apache/httpd.conf

Set ZPanel Network info and compile the default vhost.conf by running following commands

sudo /etc/zpanel/panel/bin/setso –set zpanel_domain CONTROLPANEL.YOURDOMAIN.COM

sudo /etc/zpanel/panel/bin/setso --set zpanel_domain preciseserver

sudo /etc/zpanel/panel/bin/setso –set server_ip YOUR_PUBLIC_IP_ADDRESS

sudo /etc/zpanel/panel/bin/setso --set server_ip 192.168.56.2

sudo php /etc/zpanel/panel/bin/daemon.php


<-> Step 11. Install and configure postfix-dovecot

sudo apt-get install postfix postfix-mysql dovecot-mysql dovecot-imapd dovecot-pop3d dovecot-common libsasl2-modules-sql libsasl2-modules

sudo mkdir -p /var/zpanel/vmail

sudo chmod -R 777 /var/zpanel/vmail

sudo chmod -R g+s /var/zpanel/vmail

sudo groupadd -g 5000 vmail

sudo useradd -m -g vmail -u 5000 -d /var/zpanel/vmail -s /bin/bash vmail

sudo chown -R vmail.vmail /var/zpanel/vmail

mysql -u root -p YOUR_ROOT_MYSQL_PASSWORD < /etc/zpanel/configs/postfix/zpanel_postfix.sql

# Config Postfix Master.cf

echo "# Dovecot LDA" >> /etc/postfix/master.cf

echo "dovecot unix - n n - - pipe" >> /etc/postfix/master.cf

echo ' flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/deliver -d ${recipient}' >> /etc/postfix/master.cf

Edit the following file and add mysql root and password, you can use nano editor

    sudo nano /etc/zpanel/configs/postfix/conf/dovecot-sql.conf
    sudo nano/etc/zpanel/configs/postfix/conf/mysql_relay_domains_maps.cf
    sudo nano /etc/zpanel/configs/postfix/conf/mysql_virtual_alias_maps.cf
    sudo nano /etc/zpanel/configs/postfix/conf/mysql_virtual_domains_maps.cf
    sudo nano /etc/zpanel/configs/postfix/conf/mysql_virtual_mailbox_limit_maps.cf
    sudo nano /etc/zpanel/configs/postfix/conf/mysql_virtual_mailbox_maps.cf
    sudo nano /etc/zpanel/configs/postfix/conf/mysql_virtual_transport.cf

sudo mv /etc/postfix/main.cf /etc/postfix/main.old

sudo ln /etc/zpanel/configs/postfix/conf/main.cf /etc/postfix/main.cf

sudo mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.old

sudo ln -s /etc/zpanel/configs/dovecot2/dovecot.conf /etc/dovecot/dovecot.conf

Edit file /etc/zpanel/configs/postfix/conf/main.cf

myhostname = YOUR_DOMAIN
mydomain   = YOUR_DOMAIN

Reboot your computer


<-> Step 12. Configure roundcube

mysql -u root -p YOUR_ROOT_MYSQL_PASSWORD < /etc/zpanel/configs/roundcube/zpanel_roundcube.sql

edit file /etc/zpanel/panel/etc/apps/webmail/config/db.inc.php

nano /etc/zpanel/panel/etc/apps/webmail/config/db.inc.php

Edit this line

$rcmail_config['db_dsnw'] = 'mysql://root:YOUR_ROOT_MYSQL_PASSWORD@localhost/zpanel_roundcube';


<-> Step 13. Install and configure FTP server ProFTPD

sudo apt-get install proftpd-mod-mysql (When asked what mode, choose 'stand-alone')

mysql -uroot -pYOUR_ROOT_MYSQL_PASSWORD < /etc/zpanel/configs/proftpd/zpanel_proftpd.sql

sudo groupadd -g 2001 ftpgroup

sudo useradd -u 2001 -s /bin/false -d /bin/null -c "proftpd user" -g ftpgroup ftpuser

Edit /etc/zpanel/configs/proftpd/proftpd-mysql.conf, replace with your credentials:

You can use your MySQL root account if you wish or create a new restricted user account as you wish!

SQLConnectInfo zpanel_proftpd@localhost root your_root_password

sudo mv /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf.backup

sudo touch /etc/proftpd.conf

sudo echo "include /etc/zpanel/configs/proftpd/proftpd-mysql.conf" >> /etc/proftpd/proftpd.conf

sudo touch /var/zpanel/logs/proftpd

sudo chmod -R 644 /var/zpanel/logs/proftpd


<-> Step 14. Install and Configure BIND DNS server

sudo apt-get install bind9 bind9utils

sudo mkdir /var/zpanel/logs/bind

sudo touch /var/zpanel/logs/bind/bind.log

sudo chmod -R 777 /var/zpanel/logs/bind/bind.log

sudo echo "include \"/etc/zpanel/configs/bind/etc/log.conf\";" >> /etc/bind/named.conf

sudo echo "include \"/etc/zpanel/configs/bind/etc/named.conf\";" >> /etc/bind/named.conf

sudo ln -s /usr/sbin/named-checkconf /usr/bin/named-checkconf

sudo ln -s /usr/sbin/named-checkzone /usr/bin/named-checkzone

sudo ln -s /usr/sbin/named-compilezone /usr/bin/named-compilezone


<-> Step 15. Configure Zpanel Zsudo

Must be owned by root with 4777 permissions, or zsudo will not work!

sudo cc -o /etc/zpanel/panel/bin/zsudo /etc/zpanel/configs/bin/zsudo.c

sudo chown root /etc/zpanel/panel/bin/zsudo

sudo chmod +s /etc/zpanel/panel/bin/zsudo


<-> Step 16. Configure the CRON job for the zdaemon

sudo touch /etc/cron.d/zdaemon

sudo echo "*/5 * * * * root /usr/bin/php -q /etc/zpanel/panel/bin/daemon.php >> /dev/null 2>&1" >> /etc/cron.d/zdaemon

sudo chmod 644 /etc/cron.d/zdaemon


<-> Step 17. Registering the zppy client

sudo ln -s /etc/zpanel/panel/bin/zppy /usr/bin/zppy


<-> Step 18. Reboot your computer, if your already turn on. access zpanel from computer on your network



reff :







***** 
http://ubuntuserverguide.com/2012/11/how-to-install-zpanelx-web-hosting-control-panel-on-ubuntu-server-12-04.html
*****

3 komentar:

  1. love the post!!!
    Thank you for your intelligent post and for helping others become more aware. You made more sense than others who speak within this same area of expertise and I am really glad I found your blog-website. I’ve joined your social networks and will keep an eye out for future great posts as well. Additionally, I have shared your site in my social networks as well. Thank you again!
    Russia Dedicated Server

    BalasHapus
  2. Webcare360 Provides you safe and secure cheap Offshore Hosting Best offshore hosting and DMCA ignore Hosting with 99.9% Up time Guarantee, with Ddos protection.

    BalasHapus
  3. dmcaignoredhosting.com is a leading offshore web hosting company. Providing Quality Web Hosting Since 2014 to 1200+ Happy Clients.

    BalasHapus