Thursday, August 2, 2012

Rolling back yum packages RedHat/CentOS/Fedora


*To configure yum to save rollback information, add the line tsflags=repackage to /etc/yum.conf.

*To configure command-line rpm to do the same thing, add the line %_repackage_all_erasures 1 to /etc/rpm/macros (If does not exist, just create it).

*If/when you want to rollback to a previous state, perform an rpm update with the --rollback option followed by a date/time specified. 

Some examples: 
rpm -Uhv --rollback '10:00 am'
rpm -Uhv --rollback '6 hours ago'
rpm -Uhv --rollback 'july 25'.

enabling rollbacks will consume additional disk space in the /var filesystem.

Wednesday, August 1, 2012

Create you own repo server CentOS/RedHat/Fedora


The reposync command provides a few major advantages over an rsync based approach:
reposync uses HTTP by default, so it is easier on firewalls you probably already have outbound ports 80/443 open  reposync can use multiple mirrors, as specified in the ‘mirrorlist’ directive. So there is no longer a dependency on a single server on the remote end to be up and running Lastly, and not technically an advantage of reposync itself, but there are significantly more HTTP mirrors than rsync ones, so my reposync scripts can play nicely and distribute the load over a larger number of servers.


On your local server, install reposync


yum install yum-utils -y


For CentOS /Redhat 


# reposync --gpgcheck -l --repoid=rhel-x86_64-server-5 --download_path=/repo-rpms


# cd /repo-rpms


createrepo


Then configure the repository on the client system want to update.


For Feodra



Next, tell reposync to pull down the content


# reposync -r f16-x86-64-release -p /repo-rpms/


Lastly, recreate the yum metadata.


# createrepo /repo-rpm/f16-x86_64-release/

Monday, July 30, 2012

Openmeetings installation Redhat/CentOS/Fedora


OpenMeetings is a free browser-based software that allows you to set up instantly a conference in the Web. You can use your microphone or webcam, share documents on a white board, share your screen or record meetings. It is available as hosted service or you download and install a package on your server with no limitations in usage or users.

Make sure the following firewall ports are open
1935 (RTMP), 8088 (RTMP-Over HTTP), 5080 (HTTP), 4445 (Desktop Sharing), 8443 (RTMP over SSL)


Install the rpmforge repo 32 bit repo

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Install the rpmforge repo 64 bit repo

 rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

All of the various dependancies need to be installed

yum install -y mysql mysql-server httpd php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy phpmyadmin freetype freetype-devel fontconfig fontconfig-devel java-1.6.0-openjdk-devel libtiff libtiff-devel libjpeg-devel libjpeg giflib giflib-devel libpaper libpaper-devel xml-commons-apis libpng libpng-devel libxml2 libxml2-devel fftw3 fftw3-devel cairo cairo-devel flac flac-devel wavpack wavpack-devel libsndfile libsndfile-devel libmad libmad-devel yasm-devel yasm gcc gcc-c++  ghostscript lame swftools ImageMagick ffmpeg sox openoffice.org-base openoffice.org-headless openoffice.org-writer openoffice.org-impress openoffice.org-calc openoffice.org-headless

Edit /etc/rc.local
/usr/lib/openoffice.org3/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard &
or
/usr/lib64/openoffice.org3/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard &

Download OpenMeetings package

cd /usr/src
wget http://code.google.com/p/openmeetings/downloads/detail?name=openmeetings_1_9_1_r4707.zip

unzip openmeetings_1_9_1_r4707.zip -d

cd /usr/src/om/webapps/openmeetings/conf
cp mysql_hibernate.cfg.xml hibernate.cfg.xml

Edit OpenMeetings config file /usr/src/om/webapps/openmeetings/conf/hibernate.cfg.xml,
add your mysql credentials (username and password).

openmeetings is the database address and name (you can create an empty database before the installation)

cd /usr/src/om
nohup ./red5.sh &

Start OpenOffice service

nohup /usr/lib/openoffice.org3/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard &

or

nohup /usr/lib64/openoffice.org3/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard &

To start install OpenMeetings, type in the following address
http://www.<yourdomain>.com:5080/openmeetings/install

Saturday, July 28, 2012

Turning off un-wanted services on Redhat/CentOS/Fedora


chkconfig atd  off
chkconfig auditd  off
chkconfig avahi-daemon  off
chkconfig bluetooth  off
chkconfig cgconfig  off
chkconfig cgred  off
chkconfig cups  off
chkconfig dc_client  off
chkconfig dc_server  off
chkconfig dnsmasq  off
chkconfig ebtables  off
chkconfig firstboot  off
chkconfig gpsd  off
chkconfig haldaemon  off
chkconfig ip6tables  off
chkconfig iptables   off
chkconfig irda  off
chkconfig iscsi  off
chkconfig iscsid  off
chkconfig ksm  off
chkconfig ksmtuned  off
chkconfig libvirt-guests  off
chkconfig libvirtd  off
chkconfig lvm2-monitor  off
chkconfig mdmonitor  off
chkconfig NetworkManager  off
chkconfig netconsole  off
chkconfig netfs  off
chkconfig nfs  off
chkconfig nfslock  off
chkconfig nmb  off
chkconfig ntpd  off
chkconfig ntpdate  off
chkconfig openct  off
chkconfig openvpn  off
chkconfig pcscd  off
chkconfig portreserve  off
chkconfig psacct  off
chkconfig rdisc  off
chkconfig restorecond  off
chkconfig rpcbind  off
chkconfig rpcgssd  off
chkconfig rpcidmapd  off
chkconfig rpcsvcgssd  off
chkconfig rsyslog  off
chkconfig saslauthd  off
chkconfig sendmail  off
chkconfig smb  off
chkconfig smolt  off
chkconfig snmpd  off
chkconfig speech-dispatcherd  off
chkconfig snmptrapd  off
chkconfig squid  off
chkconfig svnserve  off
chkconfig vboxdrv  off
chkconfig vboxweb-service  off
chkconfig wicd  off
chkconfig wpa_supplicant  off
chkconfig ypbind off
===========================================================

Following services for Apache and Mysql running on the same server.
chkconfig abrtd  on
chkconfig httpd  on
chkconfig network  on
chkconfig mysqld  on
chkconfig sshd  on
chkconfig udev-post  on
chkconfig xinetd on