Fedora Linux Notes
From DreamsteepWiki
Good General Sites for Fedora Tips
HowtoForge - Linux Howtos and Tutorials
Fedora Personal Media Server
Server Configuration Notes
Dreamhost
Automatically Backing Up a Web Site & MySQL Databases
Setting up Django on Dreamhost
MySQL
Subversion
Installing Subversion on Fedora
Version Control with Subversion (Ebook)
MediaWiki
- Dreamhost - Upgrading MediaWiki - http://wiki.dreamhost.com/index.php/MediaWiki#Upgrading_to_1.10.0
To change the MediaWiki sidebar type the following in the search field:
MediaWiki:Sidebar
Shell Scripts
Gzip Files in a Directory Tree
Web Server
Default Web Server files location:
/var/www/html
Apache Web Server Configuration
Configuring Apache:
/etc/httpd/conf/httpd.conf
Restarting Apache
/etc/init.d/httpd restart
Configuring the Apache welcome file:
/etc/httpd/conf.d/welcome.conf
Default PHP Configuration File Location
/etc/php.ini
File Permissions and Third Party Web Applications
It can be tricky configuring the required file permissions on a web application (Mediawiki, Gallery2, Typo3, etc.). Generally speaking, the installed files should be owned by root and readable (not writeable) by apache. You want to avoid giving the web application too much leeway in writing files to disk since that is an extra security risk. Typically, all directories and files are owned by root with read/write permissions, and readable by everyone (read only).
Most web applications will often need to write to disk. For example, a web application installer will typically write a configuration file to disk. For example, the "my_web_app" configuration could be found in /var/www/html/my_web_app/config. In this case, the web server user -- apache should own the file with read/write permissions:
chown apache.root /var/www/html/my_web_app/config
In many web applications, a specific directory is used for writing files. For example, a file upload utility for images is quite common with web applications. The same procedure is the same with directories:
chown apache.root /var/www/html/my_web_app/upload
Common Ports
Common Ports:
Port 21 FTP
Port 22 SSH
Port 25 SMTP
Port 80 HTTP
Port 139 NetBios - SSN
Location of Root Mail:
/var/spool/mail/root/
DDClient
DDclient Configuration:
/etc/ddclient
GRUB
- GRUB configuration is located in: /etc/grub.conf
Shell Commands
File Permissions
Each of the three sets of permissions are defined in the following manner;
r = Read permissions
w = Write permissions
x = Execute permissions
Owner Group Other
r w x r w x r w x
As many of you already know, permissions are normally expressed as a numeric value, something like 755 or 644. so, how does this relate to what we have discussed above?
Each character of the permissions are assigned a numeric value, this is assigned in each set of three, so we only need to use three values and reuse them for each set.
Owner Group Other
r w x r w x r w x
4 2 1 4 2 1 4 2 1
Now that we have a value that represents each permission, we can express them in numeric terms. The values are simply added together in the respective sets of 3, which will in turn give us just three numbers that will tell us what permissions are being set.
So, if we are told that a file has the permissions of 777, this would mean that the following was true. Owner Group Other
r w x r w x r w x
4 2 1 4 2 1 4 2 1
Thus...
4+2+1 4+2+1 4+2+1
= 7 = 7 = 7
The Owner of the file would have full Read, Write and Execute permissions, the group would also have full Read, Write and Execute permissions, and the rest of the world can also Read, Write and Execute the file.
Recursively chmod directories only
find . -type d -exec chmod 755 {} \;
This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.
Similarly, the following will chmod all files only (and ignore the directories):
find . -type f -exec chmod 644 {} \;
Change ownership:
chown kloge /var/www/html
chmod 755 /var/www/html
Make a File or Directory Writable by Anyone
chmod a+w name_of_file_or_directory
File Permission for Anyone
chmod ugo+rw -r (Fedora)
chmod -r ugo+rw (OS X)
Change Ownership Recursively
chown -R kloge /var/www/html
chmod 755 -R /var/www/html
Renaming a directory
Renaming a directory in Linux / Unix is much like renaming a file. Simply replace the file name with the directory name that you wish to rename. For example, if we wanted to rename the directory "test" to "hope" you would type the below command.
mv test hope
Getting the Version of the Kernel
You can determine your kernel version with the following case-sensitive shell command:
uname -r
Untar a File
tar -xvf fileName.tar
tar zxvf fileName.tar.gz
Rsync
rsync {source} {destination}
rsync -arvuz
Here are what the switches (-arvuz) after the rsync command mean: a = archive, r = recursive, v = verbose, u = update, z = compress
Backup to a Spare Disk - Shell Script
From http://samba.anu.edu.au/rsync/examples.html
I do local backups on several of my machines using rsync. I have an extra disk installed that can hold all the contents of the main disk. I then have a nightly cron job that backs up the main disk to the backup. This is the script I use on one of those machines.
#!/bin/sh export PATH=/usr/local/bin:/usr/bin:/bin LIST="rootfs usr data data2" for d in $LIST; do mount /backup/$d rsync -ax --exclude fstab --delete /$d/ /backup/$d/ umount /backup/$d done DAY=`date "+%A"` rsync -a --delete /usr/local/apache /data2/backups/$DAY rsync -a --delete /data/solid /data2/backups/$DAY
The first part does the backup on the spare disk. The second part backs up the critical parts to daily directories. I also backup the critical parts using a rsync over ssh to a remote machine.
BackupPC - http://backuppc.sourceforge.net/index.html - BackupPC is a good free backup system to consider, and can make use of Rsync.
Rename Files with Extension
for f in *.MP3; do mv "$f" "`basename "$f" .MP3`.mp3"; done;
SELinux Policy
From root you can temporarily disable or enable SELinux.
To temporarily disable SELinux:
setenforce 0
To enable it:
setenforce 1
Remove Everything from a Disk Volume
This can be very dangerous!
rm -rf *
Output a Directory Listing to a Text File
The following creates a file named "listing.txt" and lists all subfolders with file size, date, owner, and permissions.
ls -lghoR > listing.txt
Mounting an HFS+ (Apple OS X Volume) in Fedora
List all attached drives:
fdisk -l
Probe for HFS+ Volumes:
modprobe hfsplus
Mount an External OS X Formatted USB Drive
mount -t hfsplus /dev/sdc1 /media/'Moonka 320'
MySQL
Creating a Database:
create database DBname;
Logging in if You've Had Problems Accessing MySQL:
Prompt-> mysql -u root -p
Enter Password: <cr>
Optimize Yum
yum install yum-fastestmirror yum-skip-broken yum-fedorakmod yum-kernel-module
Installing VNC Server on Fedora
http://sysdigg.blogspot.com/2008/05/how-to-install-vnc-server-on-fedora-9.html
RPM Respositories
http://freshrpms.net/ FreshRPMs
Webmin
Starting Webmin - /etc/webmin/start Stopping Webmin - /etc/webmin/stop
Check Network - ifconfig
Linux Tivo-like system - MythTV
Joomla Installation
Fix Directory Write Permissions:
chmod 777 -R html
Recursively sets full permissions to all subdirectories of "html". Use only for a local or test server.
Otherwise, change the permissions of the following files and directories to 777:
chmod 777 administrator/backups/ chmod 777 administrator/components chmod 777 administrator/modules/ chmod 777 administrator/templates/ chmod 777 cache/ chmod 777 components/ chmod 777 images/banners/ chmod 777 images/stories/ chmod 777 images/ chmod 777 language/ chmod 777 mambots/content/ chmod 777 mambots/editors/ chmod 777 mambots/editors-xtd/ chmod 777 mambots/search/ chmod 777 mambots/system/ chmod 777 mambots/ chmod 777 media/ chmod 777 modules/ chmod 777 templates/
Determining which Graphic Card is Installed
lspci |grep VGA
Video & DVD Playback
Getting DVDs to play in Fedora 7 - http://www.fedoraforum.org/forum/showthread.php?t=100206
Installing HandBrake on Fedora
yum install libtool jam rpmdevtools bzip2-devel zlib-devel subversion git yasm-devel yasm intltool
then type 'make'
Duplicating DVDs and CDs
Fedora can make copies of unprotected CDs and DVDs from the Gnome desktop. Simply insert a disc, right click it, and choose "Copy..."
If you have a single DVD drive Fedora will first copy the disc, eject it, and ask you to insert a blank disc. The data will then be burned onto the blank disc.
If you have two DVD drives you can insert the disk to be copied in one drive, and the blank media in the other. Fedora will copy the data from the source disc, then automatically write it to the other drive. This saves having to "babysit" while duplication is taking place. Once Fedora is finished it will eject the copied disc.
However, Fedora does not always clean up .iso images after duplicating CDs or DVDs. Fedora copies source DVD/CD data to the /tmp directory, then uses the temp .iso file to burn the image to the blank disc. Eventually, if you duplicate enough discs using the aforementioned method, you will run out of disk space.
To clean up leftover .iso files:
Go to the /tmp directory, look for .iso files, and delete them.
NTFS
Fedora 7 Tips & Tricks. NTFS intallation and configuration.
Apps
http://heroinewarrior.com/cinelerra.php3 - Cinelerra Video Editor
http://www.linuxmovies.org/software.html - The Linux Motion Picture Pipeline
http://ccrma.stanford.edu/planetccrma/software/installplanetnine.html - Installing Planet CCRMA Audio Apps on Fedora 9 or 10
http://www.harald-hoyer.de/linux/pulseaudio-and-jackd - How to configure Fedora 9 to run pulseaudio and jackd at the same time.
http://www.spindazzle.org/greenblog/index.php?/archives/116-Fedora-9-and-jack-audio.html - Fedora 9 and Jack Audio
Upgrading Blender without an RPM
The blender application itself goes in:
usr/bin
Replace the old Blender binary with the new one.
The Plugins folder goes in:
usr/lib/Blender/Plugins
Replace the old 'Plugins' folder with the new one.
The existing menu links will still work, but load the newer version of Blender.
Installing Deadline
Deadline (http://franticfilms.com) is a render management application that works with Linux, OS X, and Windows. It allows distributed rendering of Maya, Blender, AfterEffects, QuickTime, and many others. It is very slick, and relatively easy to set up.
As long as you don't need more than 2 nodes it is free. I have my Fedora 9 Linux media server running as a Deadline Repository and 2 WIndows XP machines as slaves. It works really well.
By defualt, the Deadline Repository wants to install to:
/usr/local/DeadlineRepository
I installed it by executing ./deadlinerespository.sh, (or with some similar .sh name). I followed the prompts and it installed smoothly. I had to add full read/write permissions to the DeadlineRepository directory.
chmod 777 -R DeadlineRepository
and chown the user to have full access. I added an SMB share called Render to access the DeadlineRepository directory.
Note: Render output is saved to the same location as the source file's save path. For example, if I have a .blend file with a save path to C:\temp that is where all renders will go per machine. You have to set up a common, shared network file save path in the project to have all of the single render files put in one place. Not a big deal.
Also, linked files must be network accessible for things like textures, video, or sounds to render properly.
Nero Linux
In the terminal run the following (as root) so it can see all CD and DVD drives:
chmod a+r+w /dev/sg*
PVR Links & Information
PVR - Personal Video Recorder Links & Information
Linux & Modems
http://linmodems.technion.ac.il/ - Linmodems Support
http://modemsite.com/56k/index.asp
Fedora - List of Additional Software to Install
IMHO, these are the best and most useful applications to install on a Linux computer for media production work.
Graphics
- Blender - 3D Modeler, animator, compositor, video sequencer powerhouse.
- Yafray - Great looking rendering engine.
- Inkscape - Vector graphics creation and editing, similar to Adobe illustrator.
- K3D - 3D modeling and animation program.
- Synfig - Powerful vector-based 2D animation package, designed from the ground-up for producing feature-film quality animation with fewer people and resources.
- The Gimp - Bitmap creation and editing, similar to Adobe Photoshop.
- Wings 3D - Easy to learn 3D modeler.
- Xaos - Fractal renderer and explorer. Lots of fun to play with for creating interesting and beautiful images.
Internet
- gFTP
- VNC Viewer
Sound & Video
- Amarok
- Ardour - Multi-Track audio production.
- Audacity or audacity-nonfree - Excellent audio editor.
- audio-convert-mod - Audio file converter for WAV, MP3, AAC, Ogg formats, and more.
- Audio Player
- CD Player
- Cinepaint - High-end digital image editor that supports high resolution digitized film formats.
- DVD Ripper and Encoder
- K3b - CD/DVD writing suite.
- Kino - Video editor that excels at FireWire video capture.
- Mediatomb - UPnP Media Server
- Movie Player
- MPlayer
- VNC2SWF - Screen Recorder
- Sound Converter - Convert to and from various audio formats.
- Sound Juicer - CD Extractor
- Thoggen DVD Ripper - Converts DVDs to OGV format.
- WinFF - FFMPEG front-end.
- XviD Configurator
System Tools & Utilities
- AcetoneISO - ISO Utility
- Amule
- Areca - Personal file backup software developed in Java.
- BackupPC (backuppc) - http://backuppc.sourceforge.net/
- fwbackups - a feature-rich user backup program with a simpe, intuitive interface.
- gnome-password-generator - Graphical password generator with lots of options.
- Gparted - Easy to use disk formatting and partitioning tool.
- Grsync - Graphic front-end to Rsync.
- KCron
- Mondo Rescue - http://mondorescue.org/ - GPL filesystem backup.
- NTFS Configuration Tool
- PwManager - A secure, easy to use password manager.
- Scribus - A desktop publishing program, similar in features to Adobe InDesign.
- Tesseract - OCR Utility
- Unison - File synchronization utility.
- Webmin - A powerful web interface to control or configure a networked or remote computer.
- Yumex - Yum Extender
Other
- AbiWord - http://www.abisource.com/ - An excellent word processor, similar to Microsoft Word.
- Celtx - http://www.celtx.com/ - Full-feature scriptwriting utility, with pre-production capabilities and online collaboration.
- Wine - Windows emulator.
- Zim - An easy to use personal Wiki.

