Installing Squid proxy server in Ubuntu
Squid is a proxy http server that speeds up getting pages from the internet by keeping copies of commonly accessed pages or graphics instead of downloading them each time. To install it:-
1. From a root terminal type apt-get install squid
2. Open gedit /etc/squid/squid.conf
3. Find the TAG: visible_hostname and after the comments section add visible_hostname <hostname> where <hostname> is your machine’s hostname.
4. Check http_port is either set to 3128 or a port number that you can remember for configuring your browser.
5. Close and save
6. Type adduser squid and specify a password
7. Restart squid by typing: /etc/init.d/squid restart
8. Stop the service by typing /etc/init.d/squid stop
9. Test it in debug mode by typing squid -z (which creates the cache files)
10. Type squid -NCd10 to test squid in debug mode and leave it running.
11. Open Firefox and type the URL localhost:3128 or whatever port you chose. It will fail to retrieve a page, but at the bottom it will confirm that the error is generated by squid.
12. Back at the Terminal type CTRL-C to cancel the debug mode
13. Start squid for real with /etc/init.d/squid start. It will start automatically from now on.
14. To configure Firefox to use squid, go to Edit>Preferences and click Advanced.
15. Click Network>Settings and then Manual Proxy Configuration. For http proxy, enter localhost and for port 3128 (or whichever port you chose).
16. Then click OK and close the Preferences dialogue.
17. Now go to any webpage. If you get the page, it’s working!
Powered by ScribeFire.
Installing Netbeans in Ubuntu
Following on from an earlier post, it has become even easier to install Netbeans.
1. Open a root terminal and type: apt-get install netbeans5.5
Powered by ScribeFire.
Receiving Podcasts in Gnome on Ubuntu 7.10
gPodder
1. Open a root terminal and type aptitude install gpodder
2. Type in the URL of the podcast feed in the bottom left window and there you go, it really couldn’t be easier.
I thought getting podcasts might be a little trickier but that is all there is to it!
Powered by ScribeFire.
Partitioning, Mount Points and other Gems in Ubuntu 7.10
Power Cuts
Two days ago we had several power cuts that completely managed to scrag my hard drives in logan and cerebro (the Fileserver), Ho hum… Time for a re-install, I guess. Good job the data on the file server was on a separate hard drive. Having done some research since the first install, now might be the time to add some security to the systems by utilizing several partitions to protect the data. The idea being that if the system goes down I can work on that and configuration as well as user data remains safe.
Partitions? Why bother?
When Ubuntu installs, it sets itself up in one large partition and up to this point I have used the Guided – Use Entire Disk option. So why use separate partitions for some of the installation? Well, I figure there are several advantages. It goes like this:
Partition Use
/ The root (/) partition stores the core system files and apart from some small additions and re-compiles will remain relatively fixed. Being separate from everything else should give it extra security.
/usr This directory holds user tools, compilers and other stuff. This will surely grow as I add stuff and being separate will allow easier and more secure re-installs.
/var This directory holds the log files, spool files and other stuff that changes a lot. Giving it a partition all to itself, it means that a runaway system generating loads of data will fill this small partition up rather than taking over the whole system. There is a type of system attack that generates millions of log entries with the aim of toileting free space so a separate storage space for these files seems a really good idea.
/tmp Temporary files could also possibly grow beyond belief, so that same logic applies here.
/home Placing the home directories on their own partition prevents users from filling up the hard drive and enforces a primitive form of quota management. This will have to do until I can figure out how to get home directories on the server.
The Plan
Logan has a 250 Gb hard drive and that gives 236 Gb to Linux. During the installation process, I choose Manual rather than either of the Guided partitioning systems. The first step is to delete the suggested partitions before setting up my own plan.
/ 25 Gb
swap 3 Gb
/usr 50 Gb
/home 50 Gb
/var 50 Gb
/tmp 72 Gb
On reflection I might change the home directory to 72Gb and reduce /tmp to 50Gb.
Mount Points
As you set the size of a partition (25000 for 25 Gb, for example) the dialog asks for a mount point and doesn’t offer me any choices. A Mount Point is a directory in the file system where the new partition is going to live, so all I’ve got to do here is type in the directory names listed above for each partition.
All have been set up and I click the go button, the rest of the system install flawlessly. Brilliant!
Powered by ScribeFire.
Render PC 1 (Logan) crashes and forces re-install
LAN names
I decided to giver the machines names that are easier to remember than machine 1, 2 etc. So, they are named after various characters in the X-Men. That said, Logan had a serious Power Supply issue and after a new shiny 650 W had been fitted, GRUB informed me in very short terms that the hard drive was unreadable. Damn – time to re-install and make notes as to the Desktop configuration in the same way that I did for the server (Cerebro), Ultimately Logan will not be doing all the work, that will be the job of Phoenix but all the time I have data on Phoenix that needs backing up, he’ll have to cover for her!
Powered by ScribeFire.
Installing the ePSXe Playstation 1 emulator in Ubuntu
Legal Note
Based on a tutorial I found here, I had the following results. This is the legal note that accompanies the tutorial:
Legal note: The installation and use of this emulator requires a Sony Playstation BIOS file. You may not use such a file to play games in a PSX emulator if you do not own a Sony Playstation, Sony PSOne or Sony Playstation 2 console. Owning the BIOS image without owning the actual console is a violation of copyright law. You have been warned. Do NOT ask in this thread, or message me, where to find the BIOS file or game images. Any such messages will be ignored and possibly reported.
This procedure will not work without a copy of the Playstation BIOS. The normal way to get one is to use the Action Replay cartridge and a cable to copy the ROM onto your PC.
Download Files
1. Open a root terminal and type:
2. aptitude install unzip
3. cd ~
4. mkdir ePSXe_install
5. cd mkdir ePSXe_install
6. wget http://www.epsxe.com/files/epsxe160lin.zip
7. wget http://www.pbernert.com/gpupetemesagl176.tar.gz
8. wget http://www.pbernert.com/gpupetexgl208.tar.gz
9. wget http://www.pbernert.com/gpupeopssoftx117.tar.gz
10. wget http://www.pbernert.com/spupeopsoss109.tar.gz
11. wget http://www.pbernert.com/spupetenull101.tar.gz
12. wget http://www.pbernert.com/gpupeopssoftsdl116.tar.gz
12. wget ‘http://www.ngemu.com/download.php?action=plugin&id=99′
13. wget http://members.chello.at/erich.kitzmueller/ammoq/down/padJoy082.tgz
Install the Software
1. export EPSXE=’/usr/local/games/epsxe’
2. mkdir $EPSXE
3. unzip -d $EPSXE ~/ePSXe_install/epsxe160lin.zip
I had a problem with this line. Until I realised that my root terminal set the home directory (~) to be /root and not /home/, so I changed it to /home/gary and it worked.
4. aptitude install libgtk1.2-common libgtk1.2
5. Apparently that should do it for 32-bit Ubuntu, but for 64-bit users the rest of the instructions can be found here in the original article.
Configuration
1. cd $EPSXE
2. chmod 777 cfg sstates snap memcards
3. touch memcards/epsxe000.mcr memcards/epsxe001.mcr .epsxerc
4. chmod 666 memcards/*
5. chmod 666 .epsxerc
6. tar xfz /home/gary/ePSXe_install/gpupetemesagl176.tar.gz -C $EPSXE/plugins/
7. tar xfz /home/gary/ePSXe_install/gpupetexgl208.tar.gz -C $EPSXE/plugins/
8. tar xfz /home/gary/ePSXe_install/gpupeopssoftx117.tar.gz -C $EPSXE/plugins/
9. tar xfz /home/gary/ePSXe_install/gpupeopssoftsdl116.tar.gz -C $EPSXE/plugins/
10. tar xfz /home/gary/ePSXe_install/spupeopsoss109.tar.gz -C $EPSXE/plugins/
11. tar xfz /home/gary/ePSXe_install/spupetenull101.tar.gz -C $EPSXE/plugins/
12. tar xfj /home/gary/ePSXe_install/omnijoy-1.0.0-beta2.tar.bz2 -C $EPSXE/plugins/
13. tar xfz /home/gary/ePSXe_install/padJoy082.tgz -C $EPSXE/plugins/
14. cd $EPSXE/plugins/
15. mv cfg* ../cfg/
16. mv *.cfg ../cfg/
17. chmod 666 ../cfg/*.cfg
18. cd /home/gary
19. rm -rf ePSXe_install
Remember to always change to gary to your username
Create a Startup Script
1. gedit /usr/local/bin/epsxe
2. Add the following code:
#!/bin/bash
export EPSXE=’/usr/local/games/epsxe’
export LD_LIBRARY_PATH=$EPSXE
cd $EPSXE
./epsxe
chmod 666 $EPSXE/cfg/*.cfg $EPSXE/sstates/* $EPSXE/memcards/*.mcr $EPSXE/snap/* 2>/dev/null
3. Save and close
4. Type: chmod 755 /usr/local/bin/epsxe
5. You should now be able to start the emulator by typing epsxe
Setting up the Emulator
The author then says:
- In the menu, open “Config -> BIOS”, and set it to
/usr/local/games/epsxe/bios/SCPH1001.BIN, click OK. (You must find and
obtain ths file yourself. Once you have a copy of it, put it in
/usr/local/games/epsxe/bios/) - Open “Config -> Video”, and select either “Pete’s MesaGL Driver
1.76″, “Pete’s XGL2 Driver 2.8″ or “P.E.Op.S. Softx Driver 1.17″. Click
configure, then OK to write a config file. Verify that it is working by
clicking the Test button, then OK. (Which one you use depends on your
computer.) - In “Config -> Sound” select “P.E.Op.S. OSS Audio Driver”,
Configure, then OK. Verify that it is working by clicking the Test
button, then OK. (The “NULL” driver are for those few games that just
don’t seem to work with sound. Or if you have a slow computer, and
figure you don’t care for the sound.) - In Config -> CDROM, set the path to your CD/DVD-ROM. In most
cases it should be /dev/cdrom but in my case /dev/hdc. You can check
your path by typing “mount |grep cd” in a console. - In Config -> Game Pad -> Pad 1 menu, you can set up the
controls with the keyboard. If you have a real controller, use the
“Config -> Ext. Game Pad” option, and pick either omnipad or padjoy,
click configre, and set your buttons where you want them.
Failure
Well, it didn’t work for me. Another project then – try and find out why not….
Powered by ScribeFire.
Installing an IDE for programming development
Installing Netbeans
There are many IDE (Integrated Development Environment) packages around and ideally I would like one that would enable me to work in Java, C, C++ and give me options to use easy GUI design. For testing purposes, I thought the Anjuta and Netbeans packages looked worthwhile. To start with I shall install Netbeans and the first step is to go to their site and download the package. It downloads to my Desktop. I decide to store it in /usr/bin/netbeans.
1. Open a root terminal and type: chmod +x , where the last in my case was netbeans-5_5_2-linux.bin
2. Type: ./, i.e. ./netbeans-5_5_2-linux.bin
3. It installs well but when I try and run the IDE it tell me that the JDK, Java Development Kit is not installed, so I also have to download that.
4. In Firefox, I go to Sun and download the JDK 6 with EE pack: JDK 6 Update 3 with Java EE 5 SDK Update 3
5. The same process installs it and I’m off! Well, crawling anyway. I notice that the Netbeans site has excellent tutorials on it, so that is where I shall start.
Powered by ScribeFire.
Cleaning up unwanted files in Ubuntu
This is based on a tutorial found on the Ubuntu forums here and is a summary of the steps needed. For more explanation see the origina;
1. Go to System>Administation>Synaptic Package Manager
2. Click the Status button (bottom left) then click Residual config.
3. If anything comes up in the right hand window, select it and Mark for Complete Removal, then click Apply.
4. Click on All, then on any name on the right hand side. Type localepurge and check whether it is installed or not. If not, install it. When it install it asks you for your locale. I selected en-uk – this is the locale that it will leave on my system, getting rid of anything else.
5. Do the same for the deborphan package.
6. Open a Terminal and type: sudo apt-get autoclean
7. Type: sudo deborphan | xargs sudo apt-get -y remove –purge
How to get all those missing codecs and DVDs working, pt 2
Another option is Automatix, which can be found here.
1. To install, go here and choose your Ubuntu flavour and machine type:
2. Clicking the link will download the deb file, which you can install with gdebi Package Installer.
3. Go to Applications>System Tools>Automatix to run it.
This one does work!
Powered by ScribeFire.
