How to set up ( Fedora php ruby on rails )

Wednesday, August 12, 2009

how to setup and install drupal on fedora

Drupal 6.13


Today we are going to install drupal on feodra and it would be same way for other linux distributions


First of you need to get drupal installation that we can get using the following command


[ismail@localhost ~]$ wget http://ftp.drupal.org/files/projects/drupal-6.13.tar.gz

Now we need to be super user (Root user) to perform rest of task



[ismail@localhost ~]$ su
Password:
[root@localhost ismail]#

Now we need to move downloaded files to our web directory in fedora that directory is /var/www/html/ to move file to web directory use the following command


[root@localhost ismail]# mv drupal-6.13.tar.gz /var/www/html

Now files are moved now we get to go to web directory


[root@localhost ismail]# cd /var/www/html/

Now extract the files from tar file and rename the folder drupal-6.13 to site or any you want


[root@localhost html]# tar -xf drupal-6.13.tar.gz

[root@localhost html]# mv drupal-6.13 sites

Now we need to move to our project directory which in this case is sites and now the is a folder in that called sites which contain configuration files


[root@localhost html]# cd sites/sites

Now we to set some permission on files and folder so our setting can be written on files to do that use following commands


[root@localhost sites]# chmod a+w default/

[root@localhost sites]# cd default/

Now create setting file to do so use following command and default.settings.php is already will be present and required so we will need to copy just


[root@localhost default]# cp default.settings.php settings.php

[root@localhost default]# chmod a+w settings.php

Drupal need some database before you start installation so we create first database and i am using drupal_db as database name


 
[root@localhost default]# mysqladmin -u root -p create drupal_db
Enter password:

Now open firefox and put URL of your project folder which is sites in this case


[root@localhost default]# firefox localhost/sites &




Select Install Drupal in English





Now enter the database name in our case its drupal_db database user name its root in my case and your password for database

and click continue to start installing drupal




Now we need to remove write permissions from folders and files


[root@localhost default]# chmod a-w settings.php

[root@localhost default]# chmod a-w ../default/



Enter site name you wish , site e-mail , user name which will be used to edit your site and email for it and password for it and keep in mind while typing password , password must contain capital and small both letters and if possible also symbols also.





Now click on Your new site to see admin area and all





For further assistance do comments thanks

Monday, August 10, 2009

how to setup and install joomla on fedora

How to setup Joomla on fedora


First of all we need to make sure that php and mysql is install on our system included our webserver




[ismail@localhost ~]$ which php mysql httpd
/usr/local/bin/php
/usr/bin/mysql
/usr/sbin/httpd


If php or mysql or apache server is not installed you can install with following commands


[ismail@localhost ~]$ sudo yum -y install httpd php mysql mysql-server php-mysql

Alright now php mysql and apache(httpd) server is installed now we need to download Joomla from its site


[ismail@localhost ~]$ wget http://joomlacode.org/gf/download/frsrelease/10785/42655/Joomla_1.5.14-Stable-Full_Package.zip

Now Next steps are to be performed by root user




[ismail@localhost ~]$ su
Password:
[root@localhost ismail]#


Now Create a directory of your project in my case i have choosed mysite it can be any thing


[root@localhost ismail]# mkdir /var/www/html/mysite

Now we are going to move downloaded file of joomla in our site diectroy where we will extract files from zip


[root@localhost ismail]# mv Joomla_1.5.14-Stable-Full_Package.zip /var/www/html/mysite/

[root@localhost ismail]# cd /var/www/html/mysite

[root@localhost mysite]# unzip Joomla_1.5.14-Stable-Full_Package.zip

[root@localhost mysite]# rm Joomla_1.5.14-Stable-Full_Package.zip

Now we need to create a configuration file and make it read and write able



[root@localhost mysite]# vi configuration.php

[root@localhost mysite]# chmod 666 configuration.php

[root@localhost mysite]# firefox localhost/mysite &

Now configuring joomla


open your browser and type following on url


localhost/mysite



Click next after selecting your language default is english





Click next again its telling you your stats about your configuration




Click next to accept the agreement statement



Now first select database (Mysql) than tell your host name most probably your will be also localhost Next select username of mysql server i choosed root and than entered the password of your database server of root and last box is of database name i have choosed mysite_db as my database for my project of joomla. Now click next






Now select yes if you want ftp support on i choosed it as off and click next





Now enter your site configuratins such as site Name your Email address and your password for administrator Admin password now don't bother next steps i recommend to click next afer filling site name , email , password and confirm password and now click next pop up will come click ok to continue






Alright now you have done with configuration now you jsut need to delete a folder from installation folder folder name installation in mysite folder delete that


Folder you have to delete will be in following location /var/www/html/mysite/installation

[ismail@localhost ~]$ sudo rm -r /var/www/html/mysite/installation/

After you have deleted installation folder just type this url on your browser


localhost/mysite



Now you see is your home page and now to get start working type following url on browser


localhost/mysite/administrator




Enter user name as admin and password what you choosed during installation




Here you are done with installation and configuration of Joomla and now you can create manage your joomla site


For any help do comment

Sunday, August 9, 2009

How to install Skype on Fedora (setting up skype on fedora)

How to install and update Skype on Fedora


1. First you need to import GPG key


Open terminal and past one line by line


[ismail@localhost ~]$ gpg --keyserver pgp.mit.edu --recv-keys 0xD66B746E

[ismail@localhost ~]$ gpg -a -o /etc/pki/rpm-gpg/RPM-GPG-KEY-skype --export 0xD66B746E

2. Now have to setup skype repository


to do this you need to create a file in the following path


[ismail@localhost ~]$ su -c 'vi /etc/yum.repos.d/skype.repo'

and now once press key i and paste the following code in opened file



[skype]
name=Skype Repository
baseurl=http://download.skype.com/linux/repos/fedora/updates/i586/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-skype


3. Install skype using yum


yum install skype

Saturday, August 8, 2009

How to set up ( Fedora php ruby on rails )

How to setup up fedora php ruby on rails


This blog is about post installation of fedora. This blog will help you about setting up audio and video on feodra operating system. Fedora is not shipped with audio video code that we use in our daily life. like avi , mpeg , wmv , wma and many others but now you can play every thing on feodra.

How to play audio video on fedora
Other thing that is here about development tools help like installing ruby on rails on fedora 10 and 11 . and other thing is after installation giving you choice of different servers. To setup fedora with apache will never be easy before now just few commands you can run rails application on apache server.

How to install ruby on rails on fedora

how to setup user directory or how to setup web server user home directory know as public_html.

How to setup apache server user home directory
Playing windows files on fedora now quite easy

How to play Windows media on fedora
one Thing else fedora have no SUDO configure by default and so its a great setting that you must have .
How to configure SUDO user on fedora

Friday, August 7, 2009

setting a SUDO user in fedora ( configure SUDO)

First you need to become super user to add user to SUDO.


 
[ismail@localhost ~]$ su
Password:
[root@localhost ismail]#


Now issue the command visudo



[root@localhost ismail]# visudo




Look the image and add the following line in that file you have opened


ismail ALL=(ALL) ALL

And if you want that when you do sudo it don't asks for passwrod than uncomment and this part


## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

Now we have to add user (ismail) to wheel grounp issue this command


[root@localhost ismail]# gpasswd -a ismail wheel

Now you have done to check are you root user or not login as normal user and issue this command



[ismail@localhost ~]$ whoami
ismail
[ismail@localhost ~]$ sudo whoami
root

Thursday, August 6, 2009

Installing ruby on rails on Fedora

how to setup ruby on rails on fedora(setting up ruby on rails on fedora 10 and 11)


1. Programming tools


First of all we need to check wether we have programming tools installed or not if installed than leave the next commnad



[ismail@localhost ~]$ which gcc make git
/usr/lib/ccache/gcc
/usr/bin/make
/usr/bin/git


if you have the same output as i do have than you may continue to next step leaving this one


[ismail@localhost ~]$ su -c 'yum install gcc make git'

2. Selecting Database


Rails supports number of databases and most common rails use are:

1. MySQL

2. SQLite

Installing MySQL for rails


[ismail@localhost ~]$ su -c 'yum install mysql-server mysql-libs mysql-devel'

Installing SQlite for rails


[ismail@localhost ~]$ su -c 'yum install sqlite sqlite-devel'

3. Installing Ruby language


Ruby on rails depends on ruby so before installing ruby on rails we must install Ruby language


[ismail@localhost ~]$ su -c 'yum install ruby ruby-devel ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs ruby-mysql ruby-sqlite3'

4. Installing RubyGem


RubyGem is Ruby language libraries


[ismail@localhost ~]$ wget -q http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz


[ismail@localhost ~]$ tar xzf rubygems-1.3.5.tgz

[ismail@localhost ~]$ cd rubygems-1.3.5

[ismail@localhost rubygems-1.3.5]$ su -c 'ruby setup.rb'

5. Installing Rails


[ismail@localhost ~]$ su -c 'gem install rails'

6. Installing server for rails


Rails comes with WEBrick server which is good for development not for production


[ismail@localhost ~]$ su -c 'gem install mongrel mongrel_cluster'

Apache server for rails application


Setting up Apache server for ruby on rails Application

7. SQlite binding for rails


[ismail@localhost ~]$ su -c 'gem install sqlite3-ruby'

8. MySQL binding for Rails


[ismail@localhost ~]$ cd /usr/lib
[ismail@localhost lib]$ for f in mysql/libmysql*.so mysql/libmysql*.so.1[56]; do ln -s $f; done

[ismail@localhost ~]$ su -c 'gem install mysql'

9. Your Are done with it


Now start building your rails appilcations

Wednesday, August 5, 2009

How to install Mplayer from source code

Installing Mplayer from source code


first you need to download the source code you can find that on link below


http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2


now locate the downloaded file and give following command


[ismail@localhost ~]$ tar -jxvf MPlayer-1.0rc2.tar.bz2

[ismail@localhost ~]$ cd MPlayer-1.0rc2

[ismail@localhost MPlayer-1.0rc2]$ ./configure

[ismail@localhost MPlayer-1.0rc2]$ make

[ismail@localhost MPlayer-1.0rc2]$ su -c 'make install'

Locate the media file and open with following command


[ismail@localhost Songs]$ mplayer bourne.mp3 /code>

playing WMV and WMA file format follow this link


how to play windows media format on mplayer

How to play wmv and wma on Fedora and linux (windows media video and audio)

Windows media files playing on fedora and other distributions (Linux)



Lets play windows media files on linux just few steps and you be done


[ismail@localhost ~]$ cd /tmp

[ismail@localhost tmp]$ wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2

[ismail@localhost tmp]$ tar -jxvf all-20071007.tar.bz2

[ismail@localhost tmp]$ su -c 'mkdir -p /usr/local/lib/codecs'

[ismail@localhost tmp]$ su -c 'cp all-20071007/* /usr/local/lib/codecs'

[ismail@localhost tmp]$ rm -rf /tmp/all-20071007*

Optional


add this line in command line so other applications may also be able to play windows media


[ismail@localhost tmp]$ su -c 'ln -sf /usr/local/lib/codecs /usr/lib/codecs && ln -sf /usr/local/lib/codecs /usr/local/lib/win32 && ln -sf /usr/local/lib/codecs /usr/lib/win32'

Tuesday, August 4, 2009

how to play audio and video on fedora

How to play audio video music files on linux (VLC mplayer )


playing audio video on fedora is kinda easy work to do you need to just follow these commands and in end you will have number of player with which you can play almost all video format on your fedora operating system


Fedora is not shipped with audio video codec like mp3 or avi so first of all you need some repositories so copy and paste into your terminal the below commands


[ismail@localhost ~]$ su -c 'rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm'

[ismail@localhost ~]$ su -c 'rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'


[ismail@localhost ~]$ su -c 'rpm -Uvh http://rpm.livna.org/livna-release.rpm'

Downloading and installing codec from livna


[ismail@localhost ~]$ su -c 'yum install gstreamer-plugins-bad gstreamer-plugins-bad-extras gstreamer-plugins-ugly xine-lib-extras-nonfree totem-xine'

That is what you want it now others are optional choose your favourite player or install all


Audicious


[ismail@localhost ~]$ su -c 'yum install audacious-plugins-nonfree-aac audacious-plugins-nonfree-alac audacious-plugins-nonfree-mms audacious-plugins-nonfree-mp3 audacious-plugins-nonfree-tta audacious-plugins-nonfree-wma audacity-nonfree'


ffmpeg


It must be install its good for internet audio and video play


[ismail@localhost ~]$ su -c 'yum install ffmpeg ffmpeg-libs ffmpeg2theora gstreamer-ffmpeg'

VLC


one of the popular video and audio player VLC


[ismail@localhost ~]$ su -c 'yum install vlc'

Rhythmbox


[ismail@localhost ~]$ su -c 'yum install rhythmbox-lirc rhythmbox-upnp'

Mplayer


one of the finest media player


[ismail@localhost ~]$ su -c 'yum install mplayer mplayer-doc mplayer-gui mplayerplug-in gnome-mplayer'

Monday, August 3, 2009

how to set up apache user home directory (Public_html)

Apache 2 user home directory


First create a directory with name public_html in your home directory (user directory


[ismail@localhost ~]$ mkdir public_html

Now open you apache server config file and edit to enable public_html for that uncomment UserDir public_html and comment UserDir disabled and also uncomments the lines below from where Directory start to ends


[ismail@localhost ~]$ sudo vi /etc/httpd/conf/httpd.conf



Now next step to save the configuration file and setting up permissions on public_html folder in your home directory. Our home directory need permission of 711 and public_html permission of 755 that we set by following commands.



[ismail@localhost ~]$ chmod 711 ~ismail/

where ismail is username you have your own you username you can check that by issuing command


[ismail@localhost ~]$ whoami

Alright now next step is to set permission of public_html


[ismail@localhost ~]$ chmod 755 public_html/

If SElinux is turned on you have to give extra permission on public_html folder


[ismail@localhost ~]$ sudo chcon -t httpd_sys_content_t public_html

last thing we have to do is comment welcome file in the following location


[ismail@localhost ~]$ vi /etc/httpd/conf.d/welcome.conf
Comment this whole file

Now we good to go just restart you web server


[ismail@localhost ~]$ sudo service httpd restart

Now open you web browser to test our public_html


[ismail@localhost ~]$ firefox localhost/~ismail &

or just simple type in your url


http://localhost/~ismail/



Last thing i wanna tell you is in whole this tutorial ismail was my username

Sunday, August 2, 2009

Ruby on rails Apache passenger Fedora how to install passenger on feodra

Running rails using apache
After you have install ruby on rails on your system you just need to follow these steps to use apache server as you web server for development or for production environment.

sudo gem install passenger

sudo passenger-install-apache2-module






   LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so    PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4    PassengerRuby /usr/bin/ruby 




you may have different line as shown in the image so copy these lines in your httpd.conf file right after the modules






Now next step is to create a Virtual host in httpd.conf file of your apache server .

<virtualhost * >
ServerName ror.blog.com
DocumentRoot /home/ismail/www/blogs/public
RailsEnv development
RailsBaseURI /blogs

</virtualhost>


last of all now you have to make a symbolic link to make rails up and running



ln -s /home/ismail/www/blogs/public  /var/www/html/blogs 
The folder of rails is public so what so ever your application is your symbolic link must point toward the public folder of that application.
Now you may restart you web server and enjoy using ruby on your favorite server.