Some Cool Bloggy Header Space Banner Maybe only on Bloggy
 
  Sidemenu (or Sidebar maybe)

Bloggy Bloggy My Blog

 

Support Bloggy Bloggy

Support me or Bloggy bloggy by buying us (me and my blog) items that help us both :).

Buy Me:

Some of my Sites:

 

Some of my other domains:

  • DirectoryBlend
  • AiDirectory
  • DirectoryORama

PS: No Liquor will be served at bloggy bloggy !!

Bloggy Stats:


People Online: 16
Today's Visitors: 283
Total Visitors: 516,972
Total Hits: 1,531,944
Monitoring Since 21 September,2007

Add to Technorati Favorites

Bloggy Bloggy is a Portal to my College Life as it Happens and other cool stuff.

Installing LxAdmin on Centos 5.1 with APF firewall


Hi,

So i got a server from kevworks.net last night for an amazingly low price (its a dual core, 2gig ram with 500 gig space and 10mbps unmetered ) and so i decided to use it for my main hosting backup portal. It did not come with any control panel so decided to install the free version of Lxadmin on the same. Ran into like bunch of troubles (trust me i would have kept going and going and finally screwed up the server is i did not google up the problems it was showing me) . So to make it easy for you to install lxadmin on your fresh centos 5.1 box here are the steps/instructions.

1. First of all make sure selinuxis disabled (found out this was my root of all problems). TO disable selinux do this :

In Fedora Core and RedHat Enterprise, edit /etc/selinux/config and you will see some lines like this:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.

Just change SELINUX=enforcing to SELINUX=disable, and you're done. Reboot if you want to prove it.
For others here is where i got the above from : http://www.crypt.gen.nz/selinux/disable_selinux.html

2. Now you are pretty much set, just run these commands and you should have lxadmin installed on your linux box.

Command

wget http://download.lxlabs.com/download/lxadmin/production/lxadmin-install-master.sh

sh ./lxadmin-install-master.sh

You will presented with a question/menu from yum/up2date, on which you can press <Enter>

Lxadmin will install:

  1. Web server:
    • apache
    • pure-ftp
    • awstats
  2. Mail server:
    • qmail
    • courier (imap pop)
    • webmail
    • httpd (for webmail)
  3. Nameserver:
    • bind
    • bind-chroot
  4. Database Server:
    • mysql-server
    • postgresql

Once lxadmin is installed, you can connect to ‘http://machine-name:7778′, and you will be presented with a login screen – the password would be ‘admin’. Once you login, Lxadmin will explicitly force you to change the password to something other than ‘admin’.

More instructions can be had from lxadmin site itself : http://lxlabs.com/software/lxadmin/install/

3. Now installing APF (firewall ) .

Visit http://www.rfxnetworks.com/apf.php for instructions and details. But his is how you install it :

wget

Code:
http://www.rfxnetworks.com/downloads/apf-current.tar.gz

a. tar -xvzf apf-current.tar.gz

b. cd apf-0.9.6-2/ or whatever the latest version is.

c. Run the install file: ./install.sh
You will receive a message saying it has been installed

Installing APF 0.9.6-2: Completed.

Installation Details:
Install path: /etc/apf/
Config path: /etc/apf/conf.apf
Executable path: /usr/local/sbin/apf
AntiDos install path: /etc/apf/ad/
AntiDos config path: /etc/apf/ad/conf.antidos
DShield Client Parser: /etc/apf/extras/dshield/

Other Details:
Listening TCP ports: 1,21,22,25,53,80,110,111,143,443,465,993,995,7776, 7777,7778, 7779,3306
Listening UDP ports: 53,55880
Note: These ports are not auto-configured; they are simply presented for information purposes. You must manually configure all port options.

d. Lets configure the firewall: pico /etc/apf/conf.apf (or nano /etc/apf/conf.apf)
We will go over the general configuration to get your firewall running. This isn’t a complete detailed guide of every feature the firewall has. Look through the README and the configuration for an explanation of each feature.

This stage aka d. Stage is very important. Although you setup and open port 7777,7778 and 7779 you might still be locked out of your Lxadmin admin panel. Why ? Well because APF has port 7778 Blocked by default. To fix that locate this line :

BLK_P2P_PORTS=”1214,2323,4660_4678,6257,6699,6346,6347,6881_6889,6346,7778″ << See the port 7778 . Remove it and you are all set. To edit config file i use nano /etc/apf/config.apf command. And to locate that line hit Ctrl+w key and enter text BLK_P2P_PORTS in the search field.

For configuring apf firewall and stuff please google up some more help. But Lxadmin by default installation of APF will not work as APF has port 7778 Blocked by default.

So hopefully by now your lxadmin is all setup and running on your box with the added security of the wonderful APF firewall. Not sure if CSF firewall is compatible with Lxadmin yet, might give it a try or something later .

If you need to reset your mysql password (which lxadmin setups for root user)  , use following commands :

 cd /usr/local/lxlabs/lxadmin/httpdocs/
 lphp.exe ../bin/common/misc/reset-mysql-root-password.php

You might need to run this command first, as above file by default does not exists as .php extension but has .phps extension.
So run this command if about command gives your file not found error.

cp /usr/local/lxlabs/lxadmin/bin/common/misc/reset-mysql-root-password.phps /usr/local/lxlabs/lxadmin/bin/common/misc/reset-mysql-root-password.php

That should reset your root password to null. And you can reinstall lxadmin again if you want.

Enjoy your free Lxadmin Panel !!

Tags: , ,

5 Responses to “Installing LxAdmin on Centos 5.1 with APF firewall”

  1. Jay says:

    Thanks for the tutorial. I will try it out later today and let you know if it worked.

  2. Sumeet says:

    How do you know it is using 100mb ram ? There are lots of processes that also use up ram ? What command did you use to find out its ram usage ? And i am pretty sure it uses same amount of ram for dedi too, dedi just will have more ram to spare if it needs more ram, no programs ram remain fixed, its min. ram that is required by some programs, when required they start using more ram as they go ..

  3. abdussamad says:

    I have a question regarding ram requirements for lxadmin on a dedi vs. lxadmin on a vps. lxadmin on a vps uses about 100mb idle with apache as the web server. How much RAM does it use on a dedi? I ask because I read somewhere that dedis have a higher base memory. Would appreciate any insight into this matter?

  4. Sumeet says:

    No problem glad to see it worked for you.

Leave a Reply

 
 
 

Valid XHTML 1.0 Transitional

 
 
   
Some Text Ads Spot for Bloggy Bloggy Some Text Ads Spot for Bloggy Some Text Ads Spot for Bloggy Bloggy