Você está na página 1de 11

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.

0 Global Open Versity IT Enterprise Architecture Hands-on Labs Training Manual Step-By-Step Install Guide DTC GPLHost Web Hosting Control Panel on Linux CentOS 5 Server Kefa Rabah Global Open Versity, Vancouver Canada krabah@globalopenversity.org www.globalopenversity.org Table of Contents Page No. STEP-BY-STEP INSTALL GUIDE DTC GPLHOST WEB HOSTING CONTROL PANEL ON LINUX CENTOS 5 SERVER 3 Introduction Part 1: Install CentOS 5 Part 2: Post Installation Configurations. Step 1: Perform System Upgrade Step 2: Modify the Hosts file Part 3: Install DNS Server Part 4: Pre-requisite Setup Part 5: Detailed setup of DTC Step 1: Settin g up the RPMForge repository Step 2: Setting up the DTC repository Step 3: Insta lling DTC Step 4: Fully-qualified host name Step 5: SELinux and firewall Step 6: MySQL security Step 7: DTC configuration Step 8: Setup Services & Product List Step 9: Create New Account Step 10: Server Monitoring Part 6: Configure Squirrel Mail Webmail Step 1: Install Mail Transport Agent Switcher (MTAS) Step 2: Switch to Postfix from Sendmail Step 3: Configure SquirrelMail to Work with Courier-IM AP Part 7: Configure Mail on DTC Step 1: Set up mail Step 2: Adding Database Ste p 3: Login to your mailbox Step 4: Changing Account Settings April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada 3 4 4 4 4 5 5 6 6 7 7 7 8 8 9 16 17 20 21 22 23 23 26 26 28 29 30 1 www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0 Part 8: Install Firewall Part 9: Need More Training on Linux: Web Hosting Soluti ons Administration Training Part 10: Hands-on Lab Assignments 30 31 31 31 A GOV Open Knowledge Access Technical Academic Publications Enhancing education & empowering people worldwide through eLearning in the 21st Century April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada 2 www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0 Global Open Versity IT Enterprise Architecture Hands-on Labs Training Manual Step-By-Step Install Guide DTC GPLHost Web Hosting Control Panel on Linux CentOS 5 Server By Kefa Rabah, krabah@globalopenversity.org June 27, 2010 GTS Institute Introduction Linux CentOS5 is a community-supported, free and open source operating system ba sed on Red Hat Enterprise Linux. It exists to provide a free enterprise class co mputing platform and strives to maintain 100% binary compatibility with its upst ream distribution. CentOS stands for "Community ENTerprise Operating System". Ce ntOS is the perfect server for people who need an enterprise class operating sys tem stability without the cost of certification and support and pocket burning b aggage that comes with proprietary software. And the beauty is CentOS is free. I n this Hands-on Labs session, were going to install DTC GPLHost Control Panel on Linux CentOS5 server. Domain Technologie Control (DTC) is a web-based control pa nel aimed at providing a graphics-oriented layout for managing commercial hostin g of web servers, intended for shared web hosting servers, virtual private serve rs (VPSes), and dedicated servers. Domain Technologie Control is free software r eleased under the GNU LGPL v2.1 license. It is fully skinnable and translated in to several languages. DTC is fully open source (LGPL). DTC is also the first web hosting control panel that has reached inclusion in major distributions like De bian (since Lenny in 2009), Ubuntu (since 2008) and FreeBSD Using a web GUI for the administration and accounting all hosting services, DTC can delegate the tas k of creating subdomains, email, ssh, database, mailing lists, and FTP accounts to users for the domain names they own. Moreover, Domain Technologie Control all ows the administrator to create web hosting plans that provide e-mail and FTP ac counts, domain purchasing, subdomains, SSH, and MySQL databases to the end users under controllable quota for the web sites that these users own. DTC also maint ains the automation of billing, generates backup scripts, and monitors traffic ( per user and per service) using a single system, UID or GID. Also integrated int o DTC are the support ticket system and customizable HTTP error pages. DTC itsel f manages its own MySQL database to store its setup configuration, web hosting p lans, and users. It has support for many other free software: MySQL, Apache, PHP , qmail, Postfix, Courier, Dovecot, ProFTPd, Webalizer, mod-log-sql, and more. I t also connects to dtc-xen to manage and monitor the usage of Virtual Private Se rvers (VPS). Solution In this Hands-on Labs, you will learn how to install CentOS5 and prepare it for the installation of DTC GPLHost Control Panel. Youll also learn how to perform po st-installation configuration of CentOS5 e.g., upgrade the system with new patch es and bug fixes, configure static IP address from dynamic one, change the compu ter hostname, modify hosts & resolv.conf files, perform ping test among others. Next, April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada 3 www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0 you will learn how to install DTC on Linux CentOS5 server. Upon completion of th is lab session you should have gained a capability and expertise level to instal l and maintain DTC GPLHost Control Panel, which you can use to manage your hosti ng solutions. The entire lab training was performed on VMware. But you can also use the open source VirtualBox from Oracle etc. Part 1: Install CentOS 5 Assumptions: 1. Its assumed that you have a good understanding of Linux operating system and i ts working environment. Its also assumed that you know how to install and configu re Linux CentOS5, if not go ahead and pop over to scribd.com and check out or ex cellent hands-on training manual, entitled Install Configure and Upgrade Linux Ce ntOS5 Server v1.1 to get you started. 2. Its also assumed that you have a good und erstanding of MySQL database. 3. In the next section, were going to perform other post-installation work like system upgrade and etc. Part 2: Post Installation Configurations. Step 1: Perform System Upgrade For best practices in IT, its important to always perform systems upgrade after initial installation is completed. To do this, per form the following procedures: 1. Click Application -> Accessories and the selec t Terminal 2. From Terminal window, issue the command "yum install update y". Thi s enables the system to get the latest patches and bug fixes. 3. Youre now down w ith system update. In the next section were going to learn how to change NIC adap ter configuration from dynamic IP address to static IP address. Step 2: Modify t he Hosts file 1. Its assumed that you know how to install CentOS5 using static IP address, very important for DNS server. Once youre done with the installation th en verify that your hosts file is set correctly. 2. In this step we want to modi fy the hosts file to reflect our new "Fully Qualified Hostname" and IP address. 3. To do this, from the Terminal window issue the command: [root@mx ~]# gedit /e tc/hosts 4 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0 4. While here also note our hostname and IP address: server03.govholabs.com 192.168.1.10 5. Check out /etc/hosts to ensure that you h ave a correct setup, in our case, its as follows: # Do not remove the following l ine, or various programs # that require network functionality will fail. 127.0.0 .1 localhost.localdomain localhost 192.168.1.10 server03.govholabs.com server03 192.168.1.10 dtc.govholabs.com ::1 localhost6.localdomain6 localhost6 6. For the final test, issue the ping command, to see if our hostname can return its own IP address: [root@mx ~]# ping server03.govholabs.com [root@mx ~]# ping dtc.govholabs.com 7. Were done with this section. Part 3: Install DNS Server In this section its assumed that you know how to install and configure a DNS Serv er on a Linux machine, if not, then check out our excellent Hands-On Labs traini ng manual, entitled Using Webmin and Bind9 to Setup DNS Server on Linux to get you started. Here were going to use Webmin and Bind9 to deploy DNS Server. However, its important to note that DTC will configure DNS and all the hosting requirement s for you! Part 4: Pre-requisite Setup 1. Ensure that you have set the hostname, correctly, if not you can issue the fo llowing command to setup your hostname for "server03.govholabs.com", as follows: # hostname server03.govholabs.com Note: change hostname to suit your needs. 2. Now check to ensure that you have a valid hostname entered, or amavisd-new will complain about it and refuse to setup. Try this command, as this is the one that amavis will use: hostname --fqdn Note: It should return the fully qualified dom ain name of your mx server that should be something like "mx.example.com" (this is best option). 3. Similarly, check that 5 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0 cat /etc/hosts returns something like: 192.168.1.10 server03.govholabs.com serve r03 Note: You make thins easier by installing DNS server. 4. Now check your hostname , e.g., hostname -d gives only govholabs.com hostname -s gives only server03 hos tname -f gives the server03.govholabs.com 5. Finally, check that "uname -a" is returning the correct FQDN. 8. Youre done wi th Installing and post configuration of CentOS5. Part 5: Detailed setup of DTC So, let s get on with the program. Setting up DTC in Linux CentOS is a rather st raightforward procedure which should take thirty minutes tops: 1. 2. 3. 4. 5. 6. 7. Install your operating system (not covered in this HOWTO) but you can check it from here. Set up the RPMForge repository (to pull several DTC dependencies) Set up the DTC repository Install DTC rpm Pre-configuration checklist DTC config uration Post-configuration adjustments Step 1: Setting up the RPMForge repository 1. First, we need to set up the RPMFo rge repository on your machine. At the time of writing this HOWTO, the latest RP MForge RPM release for CentOS 5.4 was: 32-bit Intel syystems 64-bit Intel system s 2. You probably want to get the latest release so peruse the right package here. Make sure the name matches your architecture (x86_64 or i386) and base system ( fc7, fc8, el4, el5). 3. Once you ve installed it, make sure you execute yum upda te to get your system up to date with all the packages. 6 April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0 Step 2: Setting up the DTC repository 1. Once you ve installed the RPMForge repo sitory, put the following file (name it "gplhost.repo") in "/etc/yum.repos.d/": [gplhost-archspecific] name=GPLHost (architecture-specific) #baseurl=ftp://ftpar chive.gplhost.com/yum/centos/$releasever/RPMS/$basearch/ mirrorlist=http://ftpar chive.gplhost.com/yum/centos/$releasever/RPMS/$basearch/mirr orlist gpgcheck=1 e nabled=1 gpgkey=ftp://ftp.gplhost.com/yum/RPM-GPG-KEY [gplhost-noarch] name=GPLH ost (architecture-independent) #baseurl=ftp://ftparchive.gplhost.com/yum/centos/ $releasever/RPMS/noarch/ mirrorlist=http://ftparchive.gplhost.com/yum/centos/$re leasever/RPMS/noarch/mirrorl ist gpgcheck=1 enabled=1 gpgkey=ftp://ftp.gplhost.c om/yum/RPM-GPG-KEY 2. That sets up yum to download DTC from our repository mirrors. Make a note tha t the URLs have centos in them, but in the future we ll be providing packages fo r Fedora too. Step 3: Installing DTC 1. Once you have both rpmforge and GPLHost s repository, simply type: yum install dtc-postfix-courier or yum install dtc-core Note: this depends on how much dependencies you want to be installed. The "dtc-core" aims a t installing the least possible dependencies, so that you just have a workable e nvironment: a web server, no serious mail system. However, the "dtc-posfix-couri er" is when you want to use all supported packages from DTC, with mail content s canning, etc.; and its the one we have installed. Step 4: Fully-qualified host name 1. Your machine must have a fully qualified ho st name. Some Linux distributions happily accept or default to a simple host nam e (like mx), while several daemons including SpamAssassin need a FQDN in the mac hine (like "mx.example.com"). Use the setup tools in your machine to ensure this is the case. April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada 7 www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0 2. You shall check that "/etc/sysconfig/network" has the correct FQDN. If it doe sn t, then set "server03.govholabs.com" there, and reboot. You shall also check that "/etc/hosts" has it. Then check with "uname -a" that your server is current ly configured with the correct hostname. Step 5: SELinux and firewall 1. Use "system-config-securitylevel" to open the re quisite ports for the services you ll be using. Then disable SELinux or set it t o permissive, otherwise DTC configuration will fail and DTC won t be able to ope rate even after the configuration. 2. The following will tell you if it s enable d or not: 1. if selinuxenabled; then echo "SELinux is enabled" ; else echo "SELi nux is disabled" ; fi Step 6: MySQL security 1. It s advised to increase the timeout of MySQL as follo w (edit "/etc/my.cnf"): connect_timeout=300 wait_timeout=1800 2. Start your MySQ L server with: /sbin/service mysqld start Youll be asked to set an initial secure root password for it with: /usr/bin/mysqladmin -u root password replace-me-wit h-a-secure-password Warning! Write this password down -- you will need it in or der to setup DTC. 3. Starts all your daemons after the packages are installed se rvice httpd start service crond start service postfix start service clamd start service amavisd start service syslog start service mysqld start service courierauthlib start service courier-imap start service dkimproxy start service pure-ft pd start service spamassassin start service saslauthd start April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada 8 www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Global Open Versity, ICT Labs Install Guide DTC GPLHost on LinuxCentOS5 Server v1.0 Note: you may need to separately install some of the service using yum utility. 4. Were done with this section. Step 7: DTC configuration 1. After the installation and daemon setup is complete , set the safe mode to off in "/etc/php.ini" so that the cron job can do what it needs, 2. Before running DTC installation command, do ensure first that your NI C is set correctly, like in Fig. 1. Fig. 1 1. Follow the link below to access the full document. The full document has moved to Docstoc.com. You can access and download it from here: OR http://www.docstoc.com/docs/50345601/Step-By-Step-Install-Guide-DTC-GPLHost-W eb-Hosting-ControlPanel-on-Linux ----------------------------------------------Step-By-Step Install Guide DTC GPLHost Web Hosting Control Panel on Linux v1.1 Kefa Rabah is the Founder of Global Technology Solutions Institute. Kefa is know ledgeable in several fields of Science & Technology, Information Security Compli ance and Project Management, and Renewable Energy Systems. He is also the founde r of Global Open Versity, a place to enhance your educating and career goals usi ng the latest innovations and technologies. April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada 9 www.globalopenversity.org EBT200 Web Hosting Solutions Administration Training

Você também pode gostar