How To Install Zpanel
How To Install Zpanel
How To Install
1.1. What ZPanel Installs & Versions
ZPanel installs the following packages on your server that are pre-configured to work
exclusively with ZPanel:
NOTE: NONE of these (or similar) services can exist on your server BEFORE installing
ZPanel! ZPanel installs EVERYTHING you need to get up and running!
NOTE2: ZPanel DOES NOT use or work with Nginx! You can try if you want, but we do
not support it!
All OS:
Ubuntu, CentOS:
Dovecot - 2.0.9
Postfix - 2.6.6
proFTPd - 1.3.3g
Windows:
hMail Server (Windows) - 5.3.3-B1879 *
FileZilla Server (Windows) - 0.9.4.1 beta *
Fresh install of the OS with minimal options. (The installers will install everything you
need to run a server!)
The following modules MUST NOT be installed on your server:
MySql
Apache
Bind
Dovecot (Ubuntu, CentOS)
Postfix (Ubuntu, CentOS)
proFTPd (Ubuntu, CentOS)
hMail Server (Windows)
FileZilla Server (Windows)
IIS (Windows)
These modules have been created by some Members of the ZPanel community and was
pushed in the forum to share.
They are not supported by ZPanel team and you may use them at your own risk.
Always read carefully their documentation (from the post linked to in the forum)
before installing. These modules may have multiple steps to install and may interact
each others.
Thank you to all module developers and maintainers.
How to install a module
List of all modules
See also http://modules.zpanelcp.com. It is the public module repository that would take
precedence over the list above as soon as all author would have registered their modules
in it..
20 & 21 : FTP
25 (TCP) : SMTP
53 (TCP & UDP) : DNS
80 (TCP & UDP) : HTTP
110 : POP3
143 : IMAP
Optional:
If you have already setup (or will setup soon) SSL, you have to open also:
443 : HTTPS
All clients applications (browser, ftp, game, mail, etc.) that want to query a server works
the same way:
1) How the client find you server IP from its name (IP from name) -> handled by DNS
server.
Requests can be sent only to an IP. When a client knows only the domain name of the
server, it have to find the IP corresponding.
It sends the target domain (or sub domain) name to a DNS server --> DNS server
responds the IP --> Client receive the IP.
For this step, nothing about target port or service is mentionned ; the DNS server does
not know anything about them.
2) How a server know for which service is a request -> handled by port affectation
The client send a request to the IP + Port --> inside the server at IP, the service that listen
the Port tries to handle the request from what it is supposed to contain.
For this step, only the IP is used, the target domain name is not involved. The request
may contain a domain name, like with HTTP, but it is INSIDE the request and has
nothing to do about how the request is transported. It is not the same OSI layer.
Some ports have standardized number : 80 for website, 21 for ftp, 25565 for minecraft
server, etc., but you can define another port number, until the client knows it.
The most often, both client and server application enable to change used port through a
config file. Changing port number from "standard" is also an easy protection against
hacks when you are sharing a service only with people whom you can tell the port
number to use.
3) How a service knows for which virtual host the request is -> handled by the
protocol.
This apply only if the service handles multiple "virtual hosts". It may also use a domain
name (usually the same than point 1) but here it have absolutely not any relation with
DNS. Some examples:
for websites (http, https), the request header sent by the browser contains the
domain name to serve. It is stripped by the web server (ie apache) to select the
"virtual host"
for ftp, ssh, the user name is used to select the user directory ("virtual directory")
for minecraft, a server handle only one world, there are not any "virtual host"
(virtual worlds).
Some servers (like Apache) can listen multiple ports to handle multiple vitual hosts
selected from port rather than from domain name, but it is not often used (example : used
on Synology NAS, each virtual host is acceeded by NasIP:Port).
When a service does not handle multiple virtual hosts, it would be possible to launch
many instances of the same service on single server, each working with a separate setup
and listening a separate port. It would work, but would also multiply the load of the
server and the amount of RAM used.
=> DNS server have ONLY to respond to requests "What is IP for a domain name"
and it is responding only an IP. (For the scope of this tuto. A DNS server have also to
synchronize to redondant servers, to maintain name caching and many other functions to
work properly, but it is another story)
=> Domain name is used for both IP query and Virtual Host selection but these are
two independant processes.
It is MANDATORY to setup BOTH DNS nameserver AND web service for each new
domain or sub-domain handled by the server.
- DNS nameserver is setup by registrar panel or ZPanel DNS Manager module,
depending of configuration choosen (see Choosing between... ),
- Web service is setup by ZPanel Domains or Sub-Domains module.
Note about TTL (Time To Live):
TTL is the period in seconds during which each DNS server around the world will
maintain its own copies of your records in its cache. After a first DNS request, all node of
the internet will not read again your domain nameserver until its cache expired.
Set it shorter (ie 1 hour) if you plan to change some DNS settings, set it longer (usualy a 4
to 48 hours) to lighten the load of all nemeserver and proxies around the world, and to
speedup your domain access time.
After a changing some settup of a domain, you can follow the propagation in the world
DNS servers on that page http://www.whatsmydns.net
WARNING :
each change done to a nameserver needs time to be propagated to all nameservers
are mandatory)
Your registrar may implement protections against config errors, provide multiple
Warning :
To be compliant with IANA name server requirements, you MUST have at least 2
redondant name-servers with two differents IPs. (see below for more info)
If you own only one server, you cannot build a compliant name server and you will do it
at your own risk.
ZPanel does not advise or approve building uncompliant nameservers.
go to Domain>DNS Manager and select your root domain from the drop down box,
then click on "Select". If there is "No records were found ..." create the default
records with the button "Create Records". The default records are now created for
that domain.
tab "NS": 2 nameserver records @ pointing at ns1.yourdomain.tld and
ns2.yourdomain.tld
tab "A": 4 records, all pointing at your hosts IP for @, mail, ns1 and ns2
tab "CNAME": 2 records ftp and www, all pointing to your hosts IP using @
tab "MX: 1 record (priorty 10) pointing at mail.yourdomain.tld
If your server uses IPv6 instead of IPv4, you have to replace the IPv4 records in tab "A"
by using the same records (except IPv6 value) in tab "AAAA" and to remove "A"
records.
(NOTE: you are strongly advised to create an spf record manually, see also Online tools
to check anything, "To setup and test SPF record").
The mandatory records to act as nameservers are the two ns1 and ns2 "A" (or "AAAA")
records, plus both "NS" records.
Ensure that port 53 is open on your server, else Bind will never receive any request!
You can check it with Port forwarding tester
DNS3: c.dns.gandi.net
(this list was gathered from gandi.net registrar manager. ZPanel has no special
agreement with Gandi).
Enter the page or form that enable you to change this list content and replace the server
list by your nameservers URLs :
ns1.yourdomain.tld
ns2.yourdomain.tld (at last two different are mandatory)
[ns3.yourdomain.tld] (... if you have more redundant servers)
2) Enter the page that enables you to chage the "Glue records". For each nameserver
(ns1, ns2) enter its name and IP as required on the form.
Glue record entries are MANDATORY when the subdomain used for a nameserver is
inside the same domain that the nemaserver resolves itself.
Example :
o
You want to use the subdomain ns1.yourdomain.tld for the main name server that
resolves your domain yourdomain.tld.
Imagine the dialog between an application that want to access to yourdomain.tld and
the nameservers:
What is the IP address for yourdomain.tld ? -> I do not know, ask to the name
address]
When a name server is down, it requires all servers along the chain in the internet to wait
until a final time-out occurs (usualy between 2 000 to 15 000 milliseconds), which locks
ram and processes during this time. And this state is propagated all around the world.
Using the same computer to host both primary and secondary nameservers (per example
with a virtual server hosted on the same computer in order to have another IP) does not
offer any redundancy: if the the computer is halted, both nameservers will be down at the
same time and all requests to resolve all the domains that they host will fail in timeout.
So, setting your system up this way is only cheating. And worse, on the computer side,
an extra VPS adds a significant load for a task that is completely useless.
Currently, the IANA only requires that a nameserver have redundancy, but does not
penalizes nameservers that are not redundant (yet).
Due to the number of newbie servers and nameservers exploding across the web. It is
possible that the IANA may choose one day to ban nameservers that are the source of too
many problems (Down time, connection loss, etc.).
So, each nameserver owner must be 100% RESPONSIBLE for their servers and
nameservers... and do the best they can to ensure that the resolution of a domain is always
a success (and is correct), because it impacts not only his website and domains, but also
the whole World Wide Web.
Cheating cannot be a solution. Hosting a world wide public server, selling hosting space,
and more, nameservers, is NOT a game!
200.201.202.203 my.sub.domain.com
As soon as you have saved the file, you can open (or close and re-open) your browser and
use it to browse for that domain with its url like http://my.sub.domain.com with the
example above. It does even not need to restart windows.
Example:
- You want to host wiki.adomain.com AND docu.adomain.com but you does not handle
adomain.com ... (etc)
==> add "adomain" (without ".com") in the "shared domains" list and then create both
wiki.adomain.com and docu.adomain.com as domain (not subdomain).
Notes:
replace new_zpanel_fulldomain by the FQDN that you want to use to access zpanel
2.6.3. Tells ZPanel daemon that the vhost file must be rewriten
setso --set apache_changed true
Install OpenSSL
apt-get install openssl
mkdir C:\zpanel\bin\apache\conf\ssl\
&
domain_com.crt
Open a text editor of your choice and copy the code from AddTrustExternalCARoot.crt
followed by the code from PositiveSSLCA2.crt in that order.
Save the file and name it domain_com.ca-bundle.crt
You will also need to download the domain_com.csr file from your place of purchase.
Then follow the installation instructions.
where :
--host1 argument specifies the old mail server FQDN
--user1 argument specifies the old email found on the old email server
--password1 argument specifies the password for the old email account
--host2 argument specifies the new mail server FQDN
--user2 argument specifies the new email found on the new email server
--password2 argument specifies the password for the new email account
2) Edit /etc/ssh/sshd_config, search for the line "Port 22" and change it to Port xxx. Save
and quit.
4) Open a new connection using the new ssh port to ensure it works : the current port in
use will become blocked after 5)
5) Close the port 22 that is no longer in use
sudo ufw deny 22