Recently I came across a issue, where a added a dual network card to my ubuntu server and instead of taking over the eth0 and continuing down the line in sequence. Ubuntu decided to just continue the sequence of eth1 and eth2. So it got me wondering why does it not take over the eth0, since the old network card is not there. It seems the culprit is the udev rules and the network cache which remembers the mac address of the previous card and leaves that eth0. So no other ethernet card can be eth0, till you delete the network cache and udev regenerates the device with the new network card. To resolve this issue you just need to delete the fie below and reboot.
Currently I have a few firewall issues and while I am trying to resolve those issues. I decided I still needed to surf the internet. Till I can resolve my firewall issues, my option was to either surf with my mobile 3g unit, do my internet surfing only at work, or none at all. My other option was to install squid, as a bandaid issue.
The steps to get squid working is shown below.
We need to edit the squid configuration, before we can start the application.
We now modify the squid configuration file, and modify, add the following into the squid.conf
An optional extra is if you want to modify the cache of squid the line that needs to be modified is
The only part you may wish to modify is the 7000 which denotes the amount of megabytes. You can increase or decrease the size of your cache, depending on your needs.
Before you start squid you need to create the cache, with the following command.
You now can start squid with the command
I have had for a while a Fujitsu P1620 small form factor convertable. I have had for a while Windows Seven working upon the machine, but with only two gigabytes of ram, performance was limited at best. I have decided to install ubuntu 11.04, 64 bit desktop, and remove the gnome desktop for the xfce desktop. The other issue is the very slow 4200rpm 100gb hard disk. The installation was about sixty minutes to install. Half of the installation was downloading packages from the ubuntu repository. I used a external usb dvd rom drive to install ubuntu 11.04, 64 bit desktop. I will further along the way try to document the configuration of software and hardware as in the touchscreen which seems a tricky issue.
One of the biggest issues when running RedHat Linux in any verison is how to get updates when you do not pay for mantenance. As far as I know, you cannot get the updates from redhat for free once your 30 day trail is over. Many companies need to run redhat due to the applications we designed around redhat in linux. There are many ways to get around this when running different flavours of linux, but they necessary become a pain in the backside when it comes to this, as the next update of the flavour may break the application. A workaround is too use the free version of redhat enterprise linux which is CentOS. You can convert a redhat machine to CentOS, very easily. Below will show you the process of how it is done.
At the time of this post CentOS 5.8 is the highest release to upgrade a redhat enterprise 5 installation. I am yet to work out howto upgrade a redhat enterprise 6 release to CentOS 6.
So people do not have a permanent ip and it makes supporting those users/clients. As you need to keep track of there ip when you need to log into there system/server. A handy way to do this is to use a third party service that tracks your clients non static ip to a dynamic name service. On of these services is no-ip.org This service requires you to install software upon your clients server/machine. Every 30 minutes the software talks to the no-ip.org domain name service and inserts the ip of the clients wan into the no-ip.org name server. So instead of remembering the clients ip address you can remember there name and attach the no-ip.org address. There are many other domains no-ip.org allows you to choose from but this is the domain I have choosen. e.g. client.no-ip.org. better than remembering a ip address. To install no-ip, there following steps are required on you clients server/machine.
You must create a on no-ip.org for you to be able to add hostnames. Once this is done you will need to log into your account and be able to add hosts which are the machines that have the dynamic ip. Note, do not create the hosts into groups or one machine will change all the machines ip to the same ip as the machine that does the update. Leave them ungrouped. Below is a image of the buttons that need to be ticked.
Download the no-ip.org unix client.
You can compile the source code yourself, but for the purposes of the excercise
Now we run noip for the first time to configure for connection to the no-ip service.
We now create the startup script so no-ip starts up when the machine starts up.
We can now start the no-ip service
Keeping track of time on your server can become a bit daunting, when you start having multiple number of servers. A solution is called ntp (network time protocol). The machine ever so often, loses time, by going out up to a few hours. Defined period checks with a main time server, and adjusts your machines time if it is out from the main timeserver.
The following commands below will install and configure ntp under CentOS.
The results will be shown as below.
The following commands below will install and configure ntp under Ubuntu.
Configuring the ntp.conf files will not be needed as they are automatically configured during installation.
Another way around this issue is to manually have the ntpdate application run directly via the cron to update the time. This issue is caused on virtual machines where the virtual software forces the virtual machine to sync with the host machine. Below is a work around. Just enter this into cron. The ip of the time server is au.pool.ntp.org
To change the hostname, the hostname is located in the following configuration file
The file contains three lines. We are only interested in changing the third linux beginning with hostname as this is the hostname. You can add whatever suits your fancy after the equals symbol.
Then you need to restart the networking process, via the following command
Now you can restart the network services that control the hostname at startup. Manually starting the above command should show you the results below.
Now your hostname should be changed. You can check your hostname with the hostname command
Under ubuntu to change the hostname as of this writing using ubuntu version 10.04.03 you need to modify the following file
There will be one line with the name of the machine. Just change the name from what exists to the new name you want the machine to be called. There is a issue I have with ubuntu 10.04.03. It seems that the init script to restart the hostname does not work, nor the hostname service. The only way I have been able to get around this is to reboot the machine. This may be fixed in versions afterwards.
Recently I decided that I was going to build a array, after my disk failure on my previous server. This would allow my data to be redundant, even with a disk failure. I debated between hardware and software raid. Hardware raid would be faster, limited to one hardware controller. While with software raid or sometimes called fake raid. I can have the disks across multiple controllers. This again slows the performance of the software raid, but it is the tradeoff, I am willing to accept. I decided on software raid because, if a disk dies, and I cannot get a the same size. I can use a larger disk, and downsize the disk to the size of the other disks in the array. Also with technology, larger disks do come down in price.
1. We need to first install the the raid software.
2. Create the partitions on the hard disks.
Next we need to change the partition type to “Linux raid auto”.
3. Create the software raid array.
–create creates the software array.
/dev/md0 is the name of the array, the array needs to be md[number]
–chunk the block size of the software array.
–raid-devices how many disks in the array.
/dev/sda1 is the disks that will be included in the array
4. Assemble the software raid array.
–assemble bundle the disks together.
/dev/md0 the name of the array.
/dev/sda1 the disks in the array.
5. To see the software raid sync you can use the following command.
When the array is sync’ed it will have 100%. Time it takes depends on the size of the software array.
6. Create the file System upon the software array. You can partition the software array with fdisk.
7. Now you can use the software disk array.
If you are using Gallery2 and you get a error stating the upload size limit being too large. This is not a Gallery2 limitation but a php limitation.
To modify the limitation limit of two megabyte to e.g. ten megabyte limit is as simple as just changing the php.ini file.
The administrator just needs to change the two variables in the php.ini file.
Under debian the php.ini file is located in the following area
The following variables need to be changed post_max_size and upload_max_filesize.
Change the values to the following
Also remember to restart apache2 for the changes to take effect.
The following command is needed to restart apache.
To quickly mount a network share. As in a samba or windows share. Open a terminal and type:
The mounted directory can be found in the finder application under the shared machines.
To have the machine share show as a icon on the desktop, you need a create a share directory within the root directory on your disk.