Create Customer Linux Distribution

Remastersys

We’ve previously covered Remastersys. It’s one of a group of tools that create your ISO files using the filesystem on which it’s being run. You essentially clone your current Debian/Ubuntu install and make it into a live CD. This makes it extremely easy to customize every little thing about your distro, because you’re actually running it and can changing settings normally as you go. Because of the flexibility of the program, it’s also more complex than some of the other options.

Linux Live Scripts

This is a set of shell scripts to convert your existing system into a live CD or USB image. It works similarly to Remastersys, but does not require you to be running Debian or Ubuntu. There is no GUI here, and your distribution may require you to manually install certain kernel modules for the scripts to run.
Live-Magic

This is a Debian/Ubuntu tool that can create CD, USB, and netboot images. It’s much simpler to use than Remastersys, but it does not use your running system to build the image. Instead, you follow a “wizard” and choose your configuration options as you go. The program will pull the packages from your repositories and install them into your image. Live-Magic can be installed via the normal package managers. Ubuntu users can click here.

Revisor

Revisor is a very nice remastering tool for Fedora. It gives a wide variety of media types and includes some customization features not found some of the other graphical tools, such as package-by-package selection or browsing by category. Revisor also allows you to choose whether your creation will be a live system or an installer.

Instalinux.com

The really interesting thing about Instalinux is that it allows you to create an ISO image online. At the website, you can choose which distribution to base it on as well as the packages. Instalinux will create a small bootable ISO (approx. 30mb) which, when booted, will begin the install and fetch the other packages from the Internet. This may be the most versatile tool on the list, and the web interface makes it extremely simple to use. It won’t, however, provide you with a full live desktop environment.

SUSE Studio

Somewhat similar to Instalinux, SUSE studio allows you to use a web interface to create a custom distribution or “appliance”. It tops the charts in supported media, by including output for CD, DVD, USB stick, hard drive, VMware, VirtualBox, and Xen. Unfortunately, SUSE Studio is an invite-only program. You can request an invitation from the website. Being backed by a large company, SUSE Studio is of course much more polished than Instalinux.

Src:
http://maketecheasier.com/6-tools-to-easily-create-your-own-custom-linux-distro/2010/04/08

Share

zimbra admin password reset

To reset the administrative password:

su - zimbra
zmprov sp <admin email address> <new password>

To get a list of all administrators:

su - zimbra
zmprov gaaa

To access the admin console:

https://YOURHOST:7071

Remember that the administrative console (sometimes) requires a full email address as the login name, so you may be using the correct password and the wrong login!

Share

XRDP in OpenSuse 11.0/11.2/11.3

This tutorial is for advanced users who prefer to skate all the detail that attaches to a "new user" Tutorial. The details (wherein lies the devil) are here: Windows Linux RDP Remote Desktop Connections using openSUSE as Client or Server (terminal server) FWIW there's also an 11.1 version there.

Tested in openSUSE 11.2 KDE & Gnome 32 & 64 bit. In 11.3 I tested KDE & Gnome 64 bit and KDE 32 bit.
There are 4 simple steps

Step 1: Download and install the software

This link contains the RPMs. They work for openSUSE 11.2 and 11.3. Drill down to either the 32 bit i586 RPMs or the 64 bit x86_64 RPMs and download one each of these RPMs: xorg-x11-server-dmx, xorg-x11-server-rdp and xrdp. There are dependency issues to cater for so put the three in a folder anywhere and add that folder as a "local directory" in Yast's –> Software –> Repositories module. Install all three. That's for the server. If you need the client, you also install the RPM for rdesktop from your standard media.

Step 2: Open the firewall

GoTo Yast's firewall module –> Allowed Services –> Select –> Remote Desktop Protocol –> Add.

Step 3: Start the service

If you want the service on permanently goto Yast –> System –> Services / Runlevels –> xrdp –> Enable
If you want the service occasionslly, enable it with "sudo /usr/sbin/rcxrdp start" and turn it off with "sudo /usr/sbin/rcxrdp stop".

Step 4: Port Forwarding

Go to your router by http:// and forward port TCP 3389 to the server IP address.
 

Share

Zimbra 8 Community edition on Scientific Linux 6 (64 Bit)

Install SL 6.3 (64 bit)

  • Installing SL6.3 (64bit)  with 'minimal' installation mode
  • Post installing, fix with the Static IP Address (Public IP and I assume the system is not behind firewall)
  • Double check with /etc/resolv.conf file parameters

Prerequisites for ZImbra installation

Let's firsy update-

yum update

Let's install some pckages as well

yum – y install sudo sysstat gmp libidn libstdc++ bind bind-chroot bind-libs bind-utils wget php perl nc sqlite

and few more packages-

yum install compat-libstdc++-33 sysstat

If anything missed out you'll know in the next steps, if anything left google it, chances are you'll be able to yum it :), however for this time being the environment is made. Now proceed to download Zimbra.

Make some backend job-

  • Make sure 'SELINUX' is disabled
  • The iptables service is stopped
  • 'postfix' service is stopped and disabled at runtime and on boot

Download ZImbra

My downloaded edition was-

http://files2.zimbra.com/downloads/8.0.0_GA/zcs-8.0.0_GA_5434.RHEL6_64.20120907144639.tgz

Once downloaded, get inside the extracted folder.

Read more

Share

Install nginx on virtualmin (GPL) server

Installing Nginx Support

Switching a system from the Apache webserver (installed by default by Virtualmin to Nginx should only be done if no virtual servers with websites have been created yet. Ideally the change should be done on a freshly installed system, running RHEL 6.0, CentOS 6.0 or Debian 6.0 or later. Virtualmin version 3.89 or above is also required.

The steps to remove Apache and install Nginx are :

  1. Shut down Apache with the command /etc/init.d/httpd stop ; service httpd off (on RHEL or CentOS), or /etc/init.d/apache2 stop ; update-rc.d apache2 remove (on Debian).
  2. Install Nginx with the command yum install nginx (on RHEL or CentOS) or apt-get install nginx (on Debian).
  3. Start the Nginx webserver with the command /etc/init.d/nginx start
  4. Install Virtualmin's Nginx plugin with the command yum install wbm-virtualmin-nginx wbm-virtualmin-nginx-ssl (on RHEL or CentOS) or apt-get install webmin-virtualmin-nginx webmin-virtualmin-nginx-ssl (on Debian).

    Read more

Share

Redhat/CentOS install PHP on NginX server as fastcgi

tep # 1: Enable EPEL repo

ngnix is not included in the base system. Turn on EPEL repo to install nginx stable release:
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/$(uname -m)/epel-release-5-3.noarch.rpm

Step # 2: Install ngnix

Type the following command at a shell prompt:
# yum install nginx
Sample output:

Loaded plugins: downloadonly, fastestmirror, priorities, protectbase
Loading mirror speeds from cached hostfile
 * epel: archive.linux.duke.edu
 * base: ftp.linux.ncsu.edu
 * updates: centos.mirror.nac.net
 * addons: mirror.cs.vt.edu
 * extras: centos.mirror.nac.net
0 packages excluded due to repository protections
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 0:0.6.34-1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================
 Package                             Arch                                 Version                                    Repository                          Size
==============================================================================================================================================================
Installing:
 nginx                               x86_64                               0.6.34-1.el5                               epel                               319 k
Transaction Summary
==============================================================================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total size: 319 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : nginx                                             [1/1]
Installed: nginx.x86_64 0:0.6.34-1.el5
Complete!

Read more

Share

Network Configuration on Debian or Ubuntu

 

Setting up an Ethernet Interface

The majority of network setup can be done via the interfaces configuration file at /etc/network/interfaces. Here, you can give your network card an IP address (or use dhcp), set up routing information, configure IP masquerading, set default routes and much more.

Remember to add interfaces that you want brought up at boot time to the 'auto' line.

See man interfaces for more options.

 

Using DHCP to automatically configure the interface

If you're just using DHCP then all you need is something like:

 

    auto eth0
    allow-hotplug eth0
    iface eth0 inet dhcp

Read more

Share

Install Zimbra on Centos 5 Step by step

Zimbra is a suite of tools for Unix/Linux/MacOS systems, which includes a secure mail server, web mail, anti-spam/anti-virus controls, a Web management interface, integrated calendaring, mobile device sync, and more. In many ways, Zimbra is the Unix equivalent to Microsoft Exchange.
 
In this post, I will be installing Zimbra onto a CentOS virtual machine. The machine will need at least 1024mb of memory to run the default Zimbra services. I was unable to make it run without errors with any less memory.

Things to do after a clean installation of Centos 5.5:

  • Disable SELinux and
  • Disable Linux Firewall

The last step is to shutoff some services that will interfere with ZCS.

chkconfig sendmail off
chkconfig ip6tables off
chkconfig iptables off

We need one package before we can continue:

yum install libtool-ltdl

This completes the base installation of CentOS. On the next page we will setup Split DNS which is essential for ZCS. Go ahead and reboot, and fill up that coffee cup.

Read more

Share

VBoxHeadless Running Virtual Machines With VirtualBox On A Headless Debian/ubuntu Server

I have implemented this on Debian 6 (Squeeze system) with the IP address 192.168.0.100 where I’m logged in as root.

Installing VirtualBox To install VirtualBox 4.1 on our Debian server, we open /etc/apt/sources.list… added this line-

deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free

Use appropriate OS source list from https://www.virtualbox.org/wiki/Linux_Downloads

Then we download the VirtualBox public key…

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | apt-key add -

… and update our package database: sudo apt-get update

Afterwards, we install VirtualBox 4.1 as follows:

apt-get install linux-headers-$(uname -r) build-essential virtualbox-4.1 dkms

(The dkms package ensures that the VirtualBox host kernel modules are properly updated if the Linux kernel version changes.) Starting with version 4.0, VirtualBox has introduced so called “extension packs” and has outsourced some functionality like remote desktop connection support (VRDP) that was part of VirtualBox packages before version 4.0 into these extension packs. Because we need remote desktop connections to control our virtual machines, we need to install the appropriate extension pack now. Go to http://www.virtualbox.org/wiki/Downloads, and you will find a link to the following extension pack: VirtualBox 4.1.18 Oracle VM VirtualBox Extension Pack Support for USB 2.0 devices, VirtualBox RDP and PXE boot for Intel cards. Download and install the extension pack as follows:

cd /tmp
wget http://download.virtualbox.org/virtualbox/4.1.18/Oracle_VM_VirtualBox_Extension_Pack-4.1.18-78361.vbox-extpack
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.18-78361.vbox-extpack

(Make sure you grab the latest version from the VirtualBox web site.) Restart the Server at this stage to update the kernel with virtualbox optimized. Installing phpvirtualbox First create a system user called vbox and add it to the vboxusers group:

useradd -m vbox -G vboxusers

Create a password for the vbox user:

passwd vbox

Create the file /etc/default/virtualbox and put the line

VBOXWEB_USER=vbox

in it (so that the VirtualBox SOAP API which is called vboxwebsrv runs as the user vbox): vi /etc/default/virtualbox VBOXWEB_USER=vbox Next create the system startup links for vboxwebsrv and start it:

update-rc.d vboxweb-service defaults
/etc/init.d/vboxweb-service start

Now, run the following command to check if virtualbox kernel modules are loaded or not.

sudo systemctl status vboxdrv

Or

sudo /etc/init.d/vboxdrv status

Sample output:

vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: enabled)
Active: active (exited) since Thu 2015-11-26 16:38:30 IST; 42s ago

Nov 26 16:38:29 server systemd[1]: Starting VirtualBox Linux kernel module...
Nov 26 16:38:30 server systemd[1]: Started VirtualBox Linux kernel module.
Nov 26 16:38:30 server vboxdrv.sh[15008]: Starting VirtualBox kernel modules....
Hint: Some lines were ellipsized, use -l to show in full.

If it, not loaded, run the following command to load them:

sudo /etc/init.d/vboxdrv setup

We need a web server with PHP support to serve phpvirtualbox – I’m using Apache2 here. Install Apache2 and PHP5 as follows:

apt-get install apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apache2 apache2-doc apache2-suexec libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapr1 php5-common php5-mysql php5-suhosin php-pear wget

for Ubuntu you may install Apache-PHP with folliwng packages-

apt-get -y install apache2 php5-mysqlnd php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5 libapache2-mod-php5

For Ubuntu 16 use the following packs:

apt-get install php libapache2-mod-php php-mcrypt php-mysql  php-xml php-soap

Restart Apache2:

/etc/init.d/apache2 restart

Now, start vboxweb-service, and make it to start automatically on every reboot.

sudo systemctl status vboxweb-service

Or

sudo /etc/init.d/vboxweb-service start

Sample output:

Starting VirtualBox web service ...done.

I want to serve phpvirtualbox from Apache’s default virtual host with the document root /var/www (I will install it in /var/www/phpvirtualbox) – if you have a different document root, you must adjust the following steps: cd /var/www wget http://phpvirtualbox.googlecode.com/files/phpvirtualbox-4.1-7.zip Unzip phpvirtualbox and rename the phpvirtualbox-4.1-7 to phpvirtualbox for ease of use: unzip phpvirtualbox-4.1-7.zip mv phpvirtualbox-4.1-7 phpvirtualbox Next go to the /var/www/phpvirtualbox/ directory… cd /var/www/phpvirtualbox/ … and create the file config.php by copying it from config.php-example: cp config.php-example config.php Open config.php and fill in the password you created earlier for the vbox system user: vi config.php […] /* Username / Password for system user that runs VirtualBox */ var $username = ‘vbox’; var $password = ‘secret’; […] That’s it already – you can now open a browser and access phpvirtualbox as follows:

http://www.example.com/phpvirtualbox/

Optional Task

Removing & updating Virtualbox Extension Pack:

For example removing virtualbox extension pack 4.3 to 5.1 version, do the following things-

$ VBoxManage list extpacks
Extension Packs: 1
Pack no. 0: Oracle VM VirtualBox Extension Pack
Version: 4.1.12
Revision: 77218
Edition:
Description: USB 2.0 Host Controller, VirtualBox RDP, PXE ROM with E1000 support.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:

How to remove an extension pack:

$ VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully uninstalled "Oracle VM VirtualBox Extension Pack".

Src:

http://www.howtoforge.com/managing-a-headless-virtualbox-installation-with-phpvirtualbox-ubuntu-12.04

http://www.howtoforge.com/vboxheadless-running-virtual-machines-with-virtualbox-4.1-on-a-headless-ubuntu-12.04-server https://www.virtualbox.org/wiki/Linux_Downloads

http://www.virtualbox.org/manual/ch08.html#vboxmanage-extpack 

Share

MySQL Database Import Command

The syntax is as follows to import the data created by mysqldump command:

mysql -u {DB-USER-NAME} -p {DB-NAME} < {db.file.sql} mysql -u {DB-USER-NAME} -h {MySQL-SERVER-HOST-NAME} -p {DB-NAME} < {db.file.sql}

In this example import a file called sales.sql for salesdb1 user and sales db, enter:

$ mysql -u sales -p salesdb1 < sales.sql

If database salesdb1 does not exists, first create it and than import it as follows:

$ mysql -u root -p -e 'create database salesdb1'
$ mysql -u sales -p salesdb1 < sales.sql

Share