"hello world" javascript in LinuxBy David J Selden-Treiman

JavaScript is often useful for website design. It can allow you to dynamically generate content for individual visitors. You can load content dynamically using AJAX. You can create animations that may increase the effectiveness of your website.

However, JavaScript has some drawbacks too.

1. Increased Loading Time

In order for your JavaScript to be loaded by your visitors’ browsers it will need to be downloaded to their computer. This increases the amount of time required to load your webpage.

If you have a very fast internet connection, this may seem insignificant. JavaScript files are often smaller than 100kB, and on a modern wireless or Ethernet connection it will load in less than a second.

However, not all visitors to your website will have a fast internet connection. Some may living in remote locations with slow internet connections. Remember dialup? Some internet connections haven’t gotten much faster than that.

Your webpage may also downloaded by people on mobile devices. While cellphone data connections are getting faster, in many areas, especially in rural parts of the world away from cities, internet connections are still slow. If you use JavaScript on your website, your visitors on these connections will have to wait for it to download.

2. Increased Waiting Time

After your JavaScript has loaded, your visitors’ computers will need to execute your code. If you are using a fast, modern computer, your browser can probably perform your JavaScript quickly and easily.

However, not everybody uses a developer-level computer. Some people use computers that will require a significant amount of time to even start up a browser.

If your JavaScript requires a large amount of time to complete, visitors with slower computers will need to wait… and wait… for your JavaScript to be performed. This may even prevent them from using their computer in other ways.

Having to wait can greatly decrease the quality of these visitors’ experience.

3. Different Implementations

Just like CSS is implemented differently on different computers by different browsers, JavaScript is executed differently depending on the visitors’ machine. This can cause your JavaScript to not work or even make your website unusable.

In general, there are commonly agreed upon standards for how portions of code should be executed. However, not every browser agrees to follow all of the rules. Internet Explorer has historically failed to accept web development standards, causing problems for web developers. (But, thankfully for developers, Microsoft has been getting better about complying with them.)

In addition to browser differences, your code will likely need to operate differently depending on each visitors’ individual machine. Windows, Mac OS, Linux, iOS, Android, and other operating systems all have slightly different (or some times very different) ways of displaying website content.

To compensate for these differences, you will need to design your JavaScript to work with all of these different OSs.

In addition, your JavaScript will need to work with different screen sizes. If you have JavaScript that influences an image that it assumes is 500px by 500px, and a visitor’s screen decreases the size of the image, your JavaScript may not work as you intended. It may harm the appearance of the image or even make the entire page unusable.

Because of the complexity of implementing JavaScript for different browser, OS, and machine configurations, it is usually easier to use alternatives, such as CSS, where possible.

Tags: , , ,

RAID1By Robert Camilleri

We start by listing the partition tables present on the server to locate the new hard disk

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/hdc doesn’t contain a valid partition table

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

The above output shows that there are two hard disks (hda and hdc). Partitions are visible on hda however hdc does not contain a valid partition table. In fact this is the replacement for the faulty disk.

To view the health of the Software RAID type cat /proc/mdstat

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hda1[1]

104320 blocks [2/1] [_U]

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]#

Note that [2/1] shows that there are 2 disks in the array however only 1 is active. The symbols [_U] mean that one of the two disks is missing from the array and must be reconfigured.

Since the new disk is /dev/hdc we need create the partitions required for the RAID. Use fdisk to create the boot partition on the new disk.

[root@mail ~]# fdisk /dev/hdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

The number of cylinders for this disk is set to 60801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-60801, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-60801, default 60801): +100M

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 83 Linux

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): l

0 Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot
1 FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris
2 XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
4 FAT16 5 Extended 41 PPC PReP Boot 85 Linux extended c7 Syrinx
6 FAT16 42 SFS 86 NTFS volume set da Non-FS data
7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set db CP/M / CTOS /.
8 AIX 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext’d (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT
1c Hidden W95 FAT3 75 PC/IX
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect

Command (m for help):w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@mail ~]#

Type fdisk -l to verify creation of partition on the second disk

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

Software RAID requires disks in the array to be partitioned identically. You can try to do this manually calculating the exact number of cylinders required for each partition to match their counterparts on the other disk. This is highly discouraged. Instead we use the sfdisk command.

[root@mail ~]# sfdisk -d /dev/hda

# partition table of /dev/hda

unit: sectors

/dev/hda1: start= 63, 208782, Id=fd
/dev/hda2: start= 208845, Id=fd
/dev/hda3: start=102607155, 6136830, Id=fd
/dev/hda4: start=108743985, Id=fd
[root@mail ~]#

The output above displays the partition sizes on the primary disk

In order to create identical partitions on the secondary disk we type the following

[root@mail ~]# sfdisk -d /dev/hda | sfdisk /dev/hdc

Checking that no-one is using this disk right now... 

OK

Disk /dev/hdc: 60801 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hdc1 0+ 12 13- 104391 fd Linux raid autodetect
/dev/hdc2 0 – 0 0 0 Empty
/dev/hdc3 0 – 0 0 0 Empty
/dev/hdc4 0 – 0 0 0 Empty
New situation:
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/hdc1 63 208844 208782 fd Linux raid autodetect
/dev/hdc2 208845 102607154 102398310 fd Linux raid autodetect
/dev/hdc3 102607155 108743984 6136830 fd Linux raid autodetect
/dev/hdc4 108743985 976768064 868024080 fd Linux raid autodetect
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table

Re-reading the partition table…

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
[root@mail ~]#

Typing fdisk -l once again displays that the partitions on both disks are in fact identical

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect
/dev/hdc2 14 6387 51199155 fd Linux raid autodetect
/dev/hdc3 6388 6769 3068415 fd Linux raid autodetect
/dev/hdc4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

Now that the partitions are identical we can re-sync the information across the RAID configuration

Type mdadm -a /dev/md0 /dev/hdc1 to add /dev/hdc1 partition to the /dev/md0 RAID partition.

[root@mail ~]# mdadm -a /dev/md0 /dev/hdc1

mdadm: added /dev/hdc1

[root@mail ~]#

Type cat /proc/mdstat to view the re-syncing process

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[2] hda1[1]

104320 blocks [2/1] [_U]

[=>... ] recovery = 7.8% (8512/104320) finish=0.7min speed=2128K/sec

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]# cat /proc/mdstat
Personalities: [raid1]
md0: active raid1 hdc1[2] hda1[1]
104320 blocks [2/1] [_U]
[=======>... ] recovery = 37.2% (39808/104320) finish=0.5min speed=1809K/sec

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:

The below shows how the output should be when the re-syncing process has ended. Note the “[UU]“. This confirms that both disks are active.

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[0] hda1[1]

104320 blocks [2/2] [UU]

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]#

The same process has to be performed on the other partitions

[root@mail ~]# mdadm -a /dev/md1 /dev/hdc2

mdadm: added /dev/hdc2

[root@mail ~]# mdadm -a /dev/md2 /dev/hdc3

mdadm: added /dev/hdc3

[root@mail ~]# mdadm -a /dev/md3 /dev/hdc4

mdadm: added /dev/hdc4

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[0] hda1[1]

104320 blocks [2/2] [UU]

md2: active raid1 hdc3[2] hda3[1]
3068288 blocks [2/1] [_U]
resync=DELAYED

md3: active raid1 hdc4[2] hda4[1]
434011968 blocks [2/1] [_U]
resync=DELAYED

md1: active raid1 hdc2[2] hda2[1]
51199040 blocks [2/1] [_U]
[>... ] recovery = 0.0% (37376/51199040) finish=501.5min speed=1698K/sec

unused devices:
[root@mail ~]#

Finally we need to install GRUB on the second disk’s MBR.

[root@mail ~]# grub
GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]

grub> find /grub/grub.conf
(hd0,0)
(hd1,0)

grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1)
Checking if “/boot/grub/stage1″ exists… no
Checking if “/grub/stage1″ exists… yes
Checking if “/grub/stage2″ exists… yes
Checking if “/grub/e2fs_stage1_5″ exists… yes
Running “embed /grub/e2fs_stage1_5 (hd1)”… 15 sectors are embedded.
succeeded
Running “install /grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/grub/stage2 /grub/grub.conf”… succeeded
Done.

grub> quit

Tags: , , , , ,

By Hoo Ann

Tux, the Linux mascotIf you are a regular user of Windows or Mac OSX, you will feel like being lost in a strange world in the first time you install and try Linux as the operating system for your computer. In this article, I will show you some tips to help you get accustomed to the magnificent world of Linux as a beginner.

Choose the right Linux distribution that suits your need and experience

There are already a lot of Linux distributions out there for you to choose and there will be more new distributions created by Linux enthusiasts day after day. But unfortunately, not all Linux distribution can be used by beginners. For Linux newbies, I recommend you to choose popular distributions like Ubuntu or Linux Mint.. These distribution are very user-friendly, easy to install and somewhat similar to normal operating systems like Windows and Apple Mackintosh. When you gain more experience and are willing to explore the new things, you can move to more advanced Linux distributions like Arch Linux or Gentoo.

Do not be afraid of the command line

For an average Linux user, the command line is arguably one of the most frequently used applications. The command line is a very powerful and useful tool, you can do almost all the basic computer tasks on the terminal, such as browsing websites, using it as an online chat client or a mail client, you can even listen to music and watch videos on the terminal as well. By the same token, do not be afraid of the command line, try to learn all the basic commands and use the terminal as frequently as possible and your knowledge about Linux will increase very fast.

You can use Windows software and games on Linux easily

Do not worry that you cannot find an open sourced alternative for your favorite window application. And do not worry that you will have to give up playing video games after switching to Linux as well. The trick is you need to use some special packages like Wine. With Wine, you can play video games and run Windows applications on Linux very easily.

Try to seek help on Linux forums and chat channels

The community of Linux users are very huge, active and friendly. So whenever you encounter a problem with Linux, just drop by a Linux forum and ask questions, people there will be very willing to help newbies. Also, all the Linux distributions usually come with user manuals so do not forget to read these document first.

Linux is really cool to use. If you want to know more about Linux, come visit my blog and learn more about the useful tips and tricks. Here is a tips about changing the grub timeout in Linux

Tags:

LAMP stands for: Linux Apache MySQL PHP. It is a popular way to get a professional style web hosting setup on one’s own computer. It’s quite simple to install and provides the major components of what is necessary to design and implement as simple or as complicated a website as one can imagine, just like having your own web hosting right on your own computer to experiment with!

The steps involved to getting a fully operational LAMP setup in Linux Mint 13 Maya are outlined below, complete with clickable screenshots.

Once again my system is as follows:

Intel Core 2 Duo 2.67GHz box with 2 GB of DDR2 RAM, Nvidia 8400GS card, running Linux Mint 13 Maya Xfce 64-bit.

STEP 1 – open a terminal and type sudo apt-get install lamp-server^
(note the carat “^” after server)

Press “Enter”

STEP 2 – Configuring mysql server – It’s always a good idea to change the default password whenever possible, make up a good one and don’t forget it!

…back to installing…

STEP 3 – Done with the terminal install for now

STEP 4 – Test the APACHE installation, open a browser window and type in the address: http://localhost/

Now test the PHP installation, for this we require a test PHP file in /var/www/ called test.php We can use a text editor as root, or as so often is the case we can type a command in the terminal: echo “<?php phpinfo(); ?>” | sudo tee /var/www/test.php

Once you do that, a restart of the Apache web server is required. That can be done by issuing this command: sudo service apache2 restart

After that is done, go back to the web browser and enter this address: http://localhost/test.php/ and you should see a page like this one describing your PHP installation:

STEP 5 – Fixing the Apache server qualified domain name error you may have seen in the terminal is easy enough at this point as well. Enter the following command in the terminal:

echo “ServerName localhost” | sudo tee /etc/apache2/conf.d/fqdn

Then restart the Apache server: sudo service apache2 reload

STEP 6 – Configure MySQL

It’s important to bind MySQL to your localhost IP address. Typically that IP address is 127.0.0.1, but we can verify that by issuing the following command:

cat /etc/hosts | grep localhost

In my case I saw this:

 

Next, verify you have the correct BIND address:

cat /etc/mysql/my.cnf | grep bind-address

In my case I have the proper 127.0.0.1:

STEP 7 – Installing PHPMyAdmin

The most convenient way to administer MySQL is by using this handy tool. As we’ve discovered so far, the process involved is quite easy. Back to the terminal we go, this time type: sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

It will go through the familiar downloading process, then a screen will pop up asking which webserver to choose to be automatically configured to run PHPMyAdmin – Please choose Apache2 by pressing the space bar:

 

The next screen to pop up asks if you would like to use dbconfig-common to facilitate the use of PHPMyAdmin – as the screen shows, you should choose “Yes” unless you are an expert administrator.

 

Next, enter the MySQL password you entered earlier

Now, enter a password for PHPMyAdmin to register to the database server, then confirm on the next screen

STEP 8 – Testing PHPMyAdmin

Let’s make sure it’s working, type this address in your browser:

http://localhost/phpmyadmin

You should see this:

Now let’s login with root and the password we created earlier:

 Success! Congratulations, you have successfully installed Apache web server, MySQL, and PHP on your Linux Mint 13 machine. Hopefully the steps involved were straightforward and will reward you with years of fulfilling web development on your own computer.

 

Tags: , , , , , ,

Glxgears reveals the advantages of installing proprietary Nvidia drivers to greatly improve 3D performance on your Linux system. This post shows step by step how to install the drivers on your system, as well as show the big increase in performance achieved.

My system is an Intel Core 2 Duo 2.67GHz box with 2 GB of DDR2 RAM, Nvidia 8400GS card, running Linux Mint 13 Maya Xfce 64-bit.

First, here is a screenshot of my glxgears running on my system before I install the Nvidia drivers:

Glxgears before Nvidia driver

 

 

 

 

 

 

 

Now, the after screenshot with the drivers installed, notice the huge improvement!:

Glxgears after Nvidia driver

 

 

 

 

 

 

 

How did I install the drivers? It’s easy, first click on Menu | Settings | Additional Drivers, highlight the appropriate driver (I chose the recommended one), then click “Activate” in the lower-right corner.

Before installing Nvidia drivers

 

 

 

 

 

 

 

It’s a big download, so depending on your Internet connection it may take a long time. (my high-speed connection got it done in about 10 minutes)

almost there!

 

 

 

 

 

 

 

Once the install is finished you need to click “Close” and restart the computer to activate the driver.

Nvidia installed on Linux Mint!

 

 

 

 

 

 

 

Thank you for reading, remember Linux rocks!

Tags: , , , ,

By Andrew Spalding

Ubuntu

Those looking to create a home network may find it is necessary to set up home servers. These are useful in making sure that you are able to use your computers the way that you want to use them when you want to use them.

The two main ways that you can accomplish this is through the use of the Linux Ubuntu home server and the Amahi home server. These servers are designed to provide you with instant access to all of your information throughout your devices.

The Linux system offers those who run the Ubuntu home server fast access which maximizes information sharing across devices. This same accessibility and ease of use is possible whenever using the Amahi Amahi Logohome server.

It is not only easy to set up. It allows you the ability to maintain all your information safely and securely. Best of all, with the help of open source, it is likely that there will be an Ubuntu version of the Amahi home server coming soon.

Features of the Amahi Home Server

Those using the Amahi home server will be able to enjoy these features:

- Outlook Integration

- iCal Integration

- Open Search

- Superb Calendars

- Open Source

- Network Simplification

- Dynamic DNS

- Disk Monitoring

- File Sharing

- Easy Backups

- Virtual Private Network (VPN)

- One-Click Apps

- Disk Pooling

- Media Streaming

These features offer you the ability to access your information wherever and whenever you want to.

Benefits of Using Amahi Home Server

The ability to use a VPN means that you will be able to access all of your files even when you are away from your home and the home network. This will allow you to access files even when you are on the other side of the nation and need them for a meeting.

Being able to back up your system allows you to have protection in case one of the computers on your network crashes. Set up computers to constantly update to the network so that you will have the protection needed in case a system is infected with a virus.

The Amahi server also offers you the ability to organize all of your files throughout your network. This manages your ability to find files whenever necessary. Photos, videos, documents and all other files are easily accessible when using this system.

Sharing files along the system allows you to access videos and pictures from any device on your network. It also allows you to coordinate calendars with everyone in your home quickly and easily. Even calendars which are different systems are accessible through the network.

Protecting your information from unauthorized access also allows you to have better protection for all of your information. Better security is possible as all information runs through the reinforced firewalls of the server. Additional encryption and security measures means you will have to worry about infected computers less often. It is no wonder so many people are turning to Amahi server software.

Article was written by Andrew Spalding. If you would like to learn more about building computers and home servers. Then visit How to Build a Computer

Tags: , ,

By Alex Colcernian

ltsp diagramDo your discoveries, interests, or work revolve around cloud computing, low-resource computing, server-centric computing, thin clients, or virtualization? If so, chances are good you’ve heard of the Linux Terminal Server Project (LTSP). Started in 1999, LTSP was the driving force in delivering network booting X/GUI (graphical user interface) and applications in the Linux space. As a solution to lower cost barriers compared to deploying multiple PCs throughout an organization, LTSP rapidly gained traction. Today, LTSP is used worldwide in education, health care, manufacturing, retail, and more. Providing the efficiency of delivering applications and storing data on a server(s), LTSP drastically cuts IT support requirements, while lowering or eliminating burdensome software license fees dues to it’s open source nature.

Limitations to the adoption of thin client environments in the past are strongly linked to user experience and multimedia. With exponential growth in web-based multimedia technologies like java, ajax, and flash, client-side resource demands have increased. The need for additional computing resource places a tax on network bandwidth and server resources. Recent advancements in LTSP 5, specifically Local Applications (Local Apps), have mitigated multimedia and bandwidth challenges.

Local Apps allow system administrators to configure LTSP in a way which shares resource demand between thin clients, and servers. Running an application utilizing thin client resources reduces network bandwidth as well as load on the server. Multimedia runs notably better on thin clients in an LTSP 5 deployment utilizing Local Apps. With Local Apps, users are delivered a performance experience which mirrors that of a full desktop PC. In return, thin clients become a transparent device to the users in an organization. When using Ubuntu, the free Linux based operating system from Canonical Ltd., users can enjoy the latest 3D desktop effects known as compiz.

If you experimented or implemented LTSP in the past and were concerned with multimedia performance, it’s time to give LTSP 5 a try. Local Apps make a world of difference in performance. We recommend downloading the Ubuntu 9.10 Alternate Install CD, and following instructions to install an LTSP environment.

LTSP in today’s world is deployed on dedicated or virtual servers, providing a cohesive thin client environment. LTSP has the ability to be integrated with key features in organizational networks like network attached storage, and centralized authentication, (e.g. OpenLDAP, eDirectory and Active Directory). LTSP is the most flexible solution when it comes to terminal services functionality in Linux environments.

Alex Colcernian is the Director of Marketing and Sales at DisklessWorkstations.com. DisklessWorkstations.com founded alongside the Linux Terminal Server Project (LTSP) in 1999, provides thin client hardware and solutions. DisklessWorkstations.com is the global leader in LTSP deployments, serving businesses, government, non-profits, and schools. For more information, please visit http://www.DisklessWorkstations.com.

Tags: , , ,

By Archie Spencer

androidI always hear the same question asked in several ways. “Can I actually learn how to produce apps for Android?” “How hard is it to study Android programming?” “Where should I go to learn Android programming?” “I just bought a new Android device, and I feel so inspired! I have an idea for a new application, but where do I begin?”

Mobile application development is really hot these days, and Android is now out in front of the rest in the mobile app world. And if you have already read this far in this article, I’m assured it is because you have already been asking some different version of one of the questions listed above. Today you are lucky, because I have already been down this road, and I have one resounding response: “Positively! It is really feasible to become able to write Android applications, no matter your background, and the tools to study and develop with are free and simple to use!”

So let’s begin with the tools. The number one tool for Android programming is the Eclipse IDE (Integrated Development Environment). Eclipse is free, runs on many operating systems (including Windows and Linux), and is often upgraded to provide better performance in development. In addition, the Android Development Team from Google has provided the Android Development Toolkit (ADT) plugin for Eclipse that turns it into an Android mobile application fabrication powerhouse! It turns application compilation into a one-click task, provides custom editors for layout files and resources, and automates updates for the latest revisions of the Android SDK. Some developers find Eclipse a little quirky, or even buggy to use at times (myself included). For example, it won’t always recognize new resource files until you restart it, which is sometimes a pain. However, I always use Eclipse with the ADT plugin for all of my Android programming, and I suggest that you do the same thing.

You may always opt to use a different piece of software, and there are many out there. But a word of caution about IDEs: many Android IDEs claim to turn mobile programming into a “drag-and-drop” process, or permit Android programming in other languages besides Java. Is it easy to create mobile apps using these tools? Of course. Will they be alright apps? Maybe. But will they be great apps – apps that really exceed expectations and extend easily with new features as the Android mobile platform evolves? No. Mobile programming is just like any other task worth doing: do it correctly (in this case, do it the Android way) and you will always have better success.

Now on to the study part. This part will take much longer than just downloading a simple tool. Learning Android development is like studying any other foreign language (and that is what this is – just a foreign language, except a language that allows you to talk to a computer instead of another human). It will require persistence, and a lot of trial-and-error. A good portion of readers will quit, telling yourself that it isn’t worth it. That’s ok: the remainder of us will succeed in the Android app market in your absence! For those readers who don’t quit, you will find the process very rewarding in so many ways.

If you don’t understand Java, that is how you need to start. When I started learning Android I got a little frustrated, because I didn’t already understand Java beforehand. After spending a week on the basics of Java, I learned that I could read the code samples and understand the examples. So start there.

Next is the Android SDK itself. There are so many studying tutorials for Android available that I really don’t have the room to list them all in this post. But Google does, so search for it. Search for “Android app tutorial” and start with the tutorial that suits you the best. It is truly that easy. I would also suggest the Android lessons found in the Android SDK online documentation for all of your coding reference needs about the Android platform. And don’t forget those newsgroups! They are one of my favorite places to find instant help from real developers who enjoy helping new programmers.

Archie Spencer is an Android development veteran, and has been building mobile apps for Android since 2010. He invites you to continue your journey on the path to dominating the Android app market by checking out his new Android App Tutorial, designed specifically with new developers in mind.

Tags: ,

By Sam Bashton

Whilst Microsoft still dominates on the desktop, Linux has a huge user base in business as a server operating system. Red Hat LinuxAlmost all of the worlds major websites run on Linux – Google, Facebook, YouTube, Wikipedia to name just a few. It’s therefore no surprise that there is a growing demand for professionals with Linux skills, who can command up to 30% higher pay than their Microsoft-supporting counterparts.

Red Hat Enterprise Linux (RHEL) is the most popular Linux distribution amongst medium to large enterprises, and Red Hat have developed their own training courses and certifications to ensure that professional standards are high.

There are three levels of certification provided by RedHat – RHCT (Red Hat Certified Technician), RHCE (Red Hat Certified Engineer) and RHCA (Red Hat Certified Architect).

RHCT is the entry-level certification, suitable for a junior-level system administrator looking after Linux systems. Topics covered include package management, network configuration, file system administration and basic system troubleshooting.

RHCE is a well respected qualification, which shows a good level of knowledge of use and troubleshooting of Red Hat Enterprise. Topics covered include advanced package management, system services, kernel configuration, network configuration, advanced account management, web services, mail services, virtualization, NFS and troubleshooting.

RHCA is a very difficult to attain qualification, currently held by less than 1000 people worldwide. To attain the RHCA qualification, one must pass a total of six exams – the RCHE exam; RedHat Enterprise Security: Network Services, RedHat Enerprise Deployment, Virtualization and Systems Management; RedHat Directory Services and Authentication; RedHat Enterprise Clustering and Storage Management; and RedHat Enterprise Systems Monitoring and Performance Tuning Expertise. Those who attain RHCA qualification can expect to find themselves in high demand, and command a sizeable salary.

For those unfamiliar with Linux, the RHCT is a good initial goal to aim for. RHCT certification provides a good ‘foot in the door’ for would-be employees looking to impress an employer and gain their first Linux System Administration job.

For those looking to run an entire network, RHCE certification should be sought. The RHCE course provides a good level of knowledge, enough to be able to cope with most challenges day-to-day administration can throw at them. The RHCE exam proves a high level of knowledge, and is a highly respected qualification.

RHCA certification should only be pursued by those hoping to forge a career as a professional Linux consultant and/or troubleshooter. Together, the examinations that make up the certification represent more than 30 hours of test time – to say nothing of the preparation time required. As such, RHCA certification is only for the most dedicated and studious of people.

Sam Bashton, Bashton Ltd Linux Consultancy, provider of Red Hat Training and Certification.

Tags: , ,

By Clarence E Johnson

There are several ways to create a users and groups in Linux that are graphical, however the standard way to create a user is through the command line.

id command in terminalStep one is to create the group, then create the user and place the user in the group. In Linux when a user is created without specifying a group then a group is created by the same name as the user. Consider a system that has 100 users if each user was created without specifying a group then there will be 100 groups. You must be root in order to create users, groups, and users’ passwords.

# groupadd executive

Creates the executive group. To verify that a group was created view the /etc/group file.

# useradd -d /home/gbush -group executive gbush

Creates the directory /home/gbush, add the user gbush to the group executive group. To verify that the user was created view the /etc/passwd file. This file contains a record of all of the users on the system.

# passwd gbush

texan

texan

Creates a password for the user gbush as texan. The password of texan does not fit the necessary length and complexity, but as root you can change the password to anything you want.

# useradd -d /home/dcheney -group executive dcheney

Other useful commands are

userdel and groupdel for deleting users and groups.

usermod and groupmod for modifying users and groups.

Tip:

Considering the current political structure of this example (executive, legislative and judicial) can help you create groups, then add the appropriate users.

New Sessions

In Linux you can create login sessions by pressing Control+ALT and Function1 through Function6 keys. This is a good way to test the new user accounts.

Identity

Because it can be difficult knowing who you are logged in as you can type the following command

#id

This will tell you who you are and what groups you belong to.

You may also become another user by using the su command.

#su gbush

This command would allow you to become gbush. If you are not the root user then you will be asked for the password of gbush.

#su – gbush

The above command says that you want to become gbush and you would like to run his startup scripts and be placed in his home directory.

You may become a member of a different group by using the newgrp command.

#newgrp executive

Would place you in the executive group. Please note that if this is not your default group as noted in the /etc/passwd file, and you are not listed as a member in the /etc/group file then you will not be allowed to become a member of the group. As far as root is concerned, root can do anything at anytime.

HELP

Help can be obtained by using the manual command.

#man ls

Would give you the manual page of the ls command. This can be quite helpful if you forget an option to a command.

If you cannot remember a command but you know what it is similar to you can use the apropos command.

# apropos who

Would show you all of the command that have the word contain the world who.

The help command can be used to get help on some built in command.

#help logout

If you are concerned about where in the file system a command would be run from type in the following

#whereis rm

Would show you where in the system the rm command would be executed, if you were to type the command.

If you know part of the command but you would like to know where it exist on the system you can use the locate command which searches a database of file name that is maintained nightly.

#locate who

Would show you all of the files that have the word who in them. This search is done through out the system. This is good for user defined commands.

Commands

In order to configure the Linux computer for different services, you should have a good understanding of standard UNIX and TCP/IP commands. These are a few of the commands that are used in Linux:

ls

who

cat

pwd

cd

telnet

rlogin

ftp

rcp

traceroute

login

man

cp

bash

ln

passwd

rm

su

touch

startx

df

du

rsh

uptime

vi

pico

at

cron

more

find

rmdir

mkdir

ping

nslookup

This submission is made by Clarence E. Johnson, president of Johnson Computer Technologies Inc in St. Louis, MO. Please visit http://www.johnsonct.net for more info on Mr. Johnson.

Tags: , , , , , , ,
« Previous posts Next posts » Back to top