Archive for the 'Linux' Category
Sub archives: Ubuntu Apache
Creating directories
To create a new, empty directory in linux you can use the mkdir command.
$mkdir dirName
Remember, the directory will be made in the directory you are in.
Removing directories
To remove directories there are two commands available. rmdir and rm.
The first, rmdir will remove a directory only if it is empty.
$ rmdir dirName
If you want to remove a directory that is not empty (e.g. with contents in) yo ucan use the rm command with the -r option. The -r option tells rm to remove a directory recursively.
$ rm -r dirName
Be careful not to remove incorrect files. It may be worth adding the -i command so that you are prompted before each file in the directory is removed.
$ rm -ir dirName
Copying and moving directories
Copying and moving directorys uses the cp and mv commands.
If you have previously tried using the cp command, you will find that it complains at you. To stop this complaint, you need to use the -r option. This says to copy the directory with its contents (e.g. copy recursively).
$ cp -r dirName newDirName
This creates a directory named newDirName whose contents will be identical to dirName.
NOTE: If newDirName already exists, nothing will be overwritten - the directory dirNamewill be copied into newDirName directory under the name newDirName/dirName.
To renaming directories, you use the mv command exactly the same way as with files:
$ mv dirName newDirName
When dealing with directories, mv works a lot like cp does. If newDirName doesn't exist, the above will rename dirName to newDirName, but if newDirName exists, the directory dirName will be moved into the newDirName directory under the name newDirName/dirName.
Posted by OLLIE at 01:23am Permalink
Yes, its annoying.
Type the following into the console:
sudo rmmod pcspkr
And you will never hear it again!!!
Posted by OLLIE at 14:22pm Permalink
Well, I can honestly say, Amorak for Linux is one of the best music players I have ever come across. Period.
Its pretty awsome. It links into Wikipedia.org to provide information on artists, provides lyrics from multiple sources and ties well into Last.fm to provide information on other artists which should be listened to.
Pretty much, its awsome.
To install type the following into the console:
sudo apt-get install amarok
Thatll install amarok in its basic form.
For me, from a clean install, I also had to install Ruby to get the lyrics working. Its pretty simple, just type:
sudo apt-get install ruby-gnome2
And there. Your done.
To set up last.fm support, go to
settings -> Configure Amorak
and enter your username and passwords.
Simple!
Posted by OLLIE at 14:21pm Permalink
Yes, Sun have changed their licences (last year sometime (2006)) so that its now much easier to install Java on linux. You can install it pretty easily from the command line now.
To install follow the quick and easy guide:
Have apt update its repository
sudo apt-get update
Next, tell it to install java.... simple.
sudo apt-get install sun-java5-jdk
Its actually that
easy
To check its installed correctly, type:
javac -version
to make sure the compiler is installed correctly
and
java -version
to ensure the runtime is installed correctly.
Done!
Posted by OLLIE at 17:00pm Permalink
Well, Ubuntu's commitment to only including completely free software means that proprietary media formats are not enabled or configured upon install.
This includes the mp3 format.
So, to install on Ubuntu 6.06 and 6.10 use the following guide.
Firstly, make sure you have the Rhythmbox application installed (Should be installed by default).
Ensure the relevant repositories are enabled.
Click System -> Administration -> Synaptic Package Manager -> Settings -> Repositories and then click Add. Check the Community maintained (Universe)' and Non-free (Multiverse) boxes. When you close the window, click Reload.
Next, you need to install the packages. You must do this as the super user (root). If you are not the root user, you will be unable to install packages.
Next, using the Terminal (
Application ->
Accessories ->
Terminal paste the following command:
sudo apt-get install gstreamer0.10-pitfdll gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gxine libxine-main1 libxine-extracodecs ogle ogle-gui
This will install the required packages.
NOTE: Personally, i was unable to install the package with 'gstreamer0.10-pitfdll' in the command. If you experience an error to this effect, remove it and try again.
Posted by OLLIE at 13:58pm Permalink
Do any of the sites hosted on your webserver use Mod Rewrite with .htaccess files?
Friendly URL's are becoming more and more common and many sites rely on them for both added security and to make usability easier. Here is a quick and easy guide to getting Mod Rewrite working on your new Apache 2 installation along with a quick fix if you find that although the module is installed, it dosnt appear to be working.
Firstly, remember that Apache does not come with this module enabled as default so you will need to firstly enable it. As super (root) user type the following:
# a2enmod rewrite
# /etc/init.d/apache2 force-reload
Running this command tells apache that you need the rewrite module enabled.
The second line restarts the apache server. Thats it... hopefully...
If you are a debian / ubuntu user i suggest you read on. If your not, hopefully you should be up and working.
With Debian/Ubuntu it is often the case that although mod-rewrite is enabled it does not work as you would expect. You therefore need to edit your 000-default file a little.
Type the following at the terminal (as root user) to begin modifying the file:
# gedit /etc/apache2/sites-enabled/000-default
Find the following line and change AllowOverride from None to All
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
Finally, upload your .htaccess file, restart your server and you should be good to go.
# /etc/init.d/apache2 force-reload
Finally, if you are getting any permission problems with your .htaccess files check that your permissions are set to 644. (use the
chmod command to change them)
Posted by OLLIE at 21:13pm Permalink
Okies,
So, ive been using Ubuntu for what, probably a week now, and decided today that there must be an easy way to install MPlayer. Looking at the web, there are tons of long winded methods to installing but, this one is by far the easiest. Clocking in at five lines. It couldnt be easier.
First things first, you need to edit your sources.list file (/etc/apt/sources.list).
Type the following:
sudo gedit /etc/apt/sources.list
* For those of you who arnt sure, sudo emulates the root (super) user so you will need to most probably type in your password after hitting enter. gedit is a text editor.
If your using Ubuntu dapper, append the following lines:
deb http://archive.ubuntu.com/ubuntu dapper universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper universe multiverse
Or if your using Ubuntu Edgy, append the following lines:
deb http://archive.ubuntu.com/ubuntu edgy universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy universe multiverse
Next, click save and close.
Finally, run these two commands again as the super (root) user:
sudo apt-get update
sudo apt-get install mplayer
Hopefully, as long as everything has gone correctly, you will now have MPlayer installed on Ubuntu.
Good luck
Posted by OLLIE at 23:36pm Permalink
To install Mod-Rewrite, its actually pretty simple.
Enter the following line to the terminal:
sudo a2enmod rewrite
The line adds a .load to /etc/apache2/mods-enabled/ and the module will be loaded when apache next starts.
To force a restart type:
sudo /etc/init.d/apache2 force-reload
Finally, you have to make sure that RewriteEngine is on in your apache config. Personally, I enter it into my .htaccess file but i believe apache2.conf works too.
Enter:
<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>
Hope this helps.
Any support needed check out:
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
Posted by OLLIE at 13:22pm Permalink
Yup, one more for the repository.
This guide is not mine, but I give full credit to the authors for a very good and well written guide.
If your monitor is not displaying the correct refresh rate then follow this guide.
Click:
http://doc.gwos.org/index.php/ChangeResolution
SIMPLE!
Posted by OLLIE at 02:30am Permalink
Ok.
I take no credit for this, and am in no way responsible to how you use this link, but its actually a really good guide on how to install the NVIDIA drivers on linux.
I am in no way a linux guru and most of the time dont really have a clue and i found my way through this guide easily.
Good luck
http://doc.gwos.org/index.php/Latest_Nvidia_Dapper
NOTE: Method One is the easiest to follow - i suggest you use it.
Posted by OLLIE at 02:28am Permalink