Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts

March 13, 2013

Set up a High-Quality Development Box for Under $1000 (Part 2)

Being a college student, money is always short. I'm going to walk you through setting up a high-quality development box with Fedora 18. If you don't mind getting super-involved, you could use Arch Linux, however Fedora is really easy to set up and will get you up and running quickly! This is part 2, which covers the installation of Fedora. Part 1, which is about choosing hardware can be found here.

***NOTE*** For this installation, I'm assuming that you have a wired connection.

First: Acquire the installation media
The link to Fedora's installation .iso can be found here. Choose the .iso that looks nicest to you. I'm choosing GNOME for this tutorial.

***NOTE*** For Reference:
GNOME looks a little bit like OSX in terms of layout, while KDE is laid out more like Windows.
Don't let this influence your decision too much though!
Although I am more experienced with Windows than OSX, I tend to prefer GNOME to KDE.


Second: Burn .iso to USB or CD
I'm using the LinuxLive USB Creator to burn the .iso to USB, however this is for Windows only.

Instructions for Linux and Mac can be found here.

Third: Boot the installation media
While your computer is off, insert your USB drive into a USB port. Press the power button, and look for a prompt at the bottom of your screen saying Hit [Some Key] for boot options, or something similar. Common keys are F2, F9, F11, F12, Delete, or Escape. If you're having trouble finding which key it is, google "[your computer model] boot option key" or something to that affect (Or it is effect...? I can never remember...). And select your USB drive.

Fourth: Base install
Once the media has booted, you are presented with a login screen. Just select Live System User (it should be the only option). Once logged in, if you want to play around with Fedora for a little before committing, click on "Try Fedora". Otherwise, choose "Install to Hard Drive".

First you are asked for the language you would like to use during the install, choose whichever language suits you (the default is English (US)). Click continue.
Under storage, click on "Installation Destination" and configure your hard disk. I suggest sticking with automatic partitioning, but you may have to make some changes if dual-booting or choosing to have a separate data partition. When returned to the screen that reads "Localization" and "Storage," click on Begin Installation.
On this screen, all you need to do is set a root password by clicking on the key icon and entering a password twice and clicking done.

***NOTE*** This should be a secure password! It allows root access to your system and can be used to do naughty things by naughty people (get your mind out of the gutter)!

...now we wait for Fedora to finish installing.

Once done, reboot and remove the installation media. When the system comes back up, you are greeted with a welcome screen. Just follow the prompts and choose the default options and you'll be fine!

Fifth: Do a system upgrade.
To perform a system upgrade, we will use yum, Fedora's package manager. Run

sudo yum upgrade

to upgrade all of your packages. It will take a long time, but is highly suggested (This isn't strictly necessary, but it keeps you up-to-date.).

***NOTE*** This step is not necessary for everyone!
Next, we will get wireless working with a Broadcom wireless card. To find out if you have a wireless card, do

lspci -nn | grep 14e4 (14e4 is Broadcom's vendor ID)

If nothing comes up, you can skip to installing development tools! Otherwise, add the rpmfusion repository following the instructions here. Add both free and nonfree.

Then, install broadcom-wl like so

sudo yum install broadcom-wl

...and reboot when done. On reboot, wireless should come up.

Install any development tools you need (Java, Python 2.x or 3.x). You know your needs best, but common tools are an IDE (I suggest Eclipse if you don't have an IDE in mind), and a good text editor like Sublime.

To install Eclipse, do

sudo yum install eclipse

By default, Python 2 is already installed on your system (Version 2.7.3), however you can install Python 3.3.0 simply by running

sudo yum install python3

to run a Python 2 module, run

python [path to module].py

... likewise, to run a Python 3 module, do

python3 [path to module.py]

Congratulations on your new development environment! If there's anything I missed or you want me to cover, please put it in the comments and I'll add it in!

March 6, 2013

The Wonderful World of Arch (Part 4) [Post-Install]

This is a continuation of my three previous posts, found here, here, and here.

Login using your username and password NOT as root! root should under NO circumstance be used as a normal user.

At this point, we've rebooted and we're ready to configure X.
First, we need to do a system upgrade (to get the latest linux headers) and install sudo.
For the moment, we need to login as root by typing su, then Enter, and then your root password at the password prompt.
Now we can upgrade the system, install sudo, and install X.
Do

pacman -Syu

to upgrade the system, and then:

pacman -S sudo

to install sudo.

Now we have to configure sudo to allow your non-root user to issue root commands.
The usual way to do this is by using:

visudo /etc/sudoers

...however this uses the editor vi, which I do not currently know how to use.

***NOTE*** There is a very good reason for needing to use visudo, which is explained here.

There is a solution to this though:

VISUAL="/usr/bin/nano -p" visudo

That command will open nano as the visudo editor.

In this file, you will need to uncomment the line that reads

# %wheel ALL=(ALL) ALL

by removing the # before the line.

Exit nano, and then type exit to get out of the root shell.

Now we install X.
X (or X11) is a window management system. Ubuntu, Mint, and SUSE all use X under a desktop environment to manage windows.
First, we have to install X from the Arch Repositories:

sudo pacman -S xorg-server xorg-xinit xorg-server-utils
pacman -S mesa


This will be different for everyone, so i'm not going to cover it, instructions can be found here.
If you have a laptop, you should install the synaptics package like so:

sudo pacman -S xf86-input-synaptics

Now to test X. First we install the test environment:

sudo pacman -S xorg-twm xorg-xclock xterm

and then run X:

startx

...and exit by exiting all of the open terminals (there should be 3).

Now that we know X works, it's time to install a GUI!
The desktop environment you choose is up to you - the instructions probably differ for each one. This page has a list of desktop environments (bear in mind that there are more than just those), each with install instructions. I chose Cinnamon because I think it looks gorgeous. The instructions for each DE are fairly straightforward, so I'll leave you on your own for those.

Next comes the display manager, which is essentially a graphical login screen. I chose SLiM, but there are many others. As with the desktop environments, these are fairly straightforward to install and i'm not going to go into the installation.

My next post will be about wrestling with getting WiFi up and working with a Broadcom Wireless chip! Now found here!


March 5, 2013

The Wonderful World of Arch (Part 3)

This is the continuation of my previous posts found here and here.

We left off having created a standard user, and now it's time to install the bootloader. I have decided to use GRUB.
First, install GRUB for BIOS systems:

pacman -S grub-bios

***NOTE*** The following process is for BIOS systems only. If your system uses UEFI, please refer to the documentation found in the Arch Beginners' Guide.

Next, open a virtual console with Alt+F2 and type root at the archiso login: prompt.
Now, create a BIOS boot partition as follows:

cgdisk /dev/sda

Select the 1007.0KiB empty partition and choose new (n).
Hit Enter twice, and when asked for the filesystem type, enter EF02. Do not name the partition.
Hit w to write the filesystem, and quit cgdisk.

Switch back to the original console with Alt+F1 and run grub-install like so:

grub-install --target=i386-pc --recheck /dev/sda
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo


Now to configure GRUB, there's not actually much for you to do here, except run a command.

grub-mkconfig -o /boot/grub/grub.cfg

Now onto rebooting! type exit to exit the chroot environment, and unmount the partitions:

umount /mnt/{home,}

...and then reboot:

reboot

...sacrifice your best goat and chicken to the Arch Gods (and remove your installation media)...
...And hopefully it'll boot back up! Mine did!
Next post is about some post-installation stuff. Coming soon! Here!

March 4, 2013

The Wonderful World of Arch (Part 2)

This is a continuation of my previous post found here. Enjoy!

We left off looking at /mnt/etc/fstab in nano. We have the base system installed to sda and now we're going to configure the installation with

arch-chroot /mnt

I highly suggest following the Arch Beninners' Guide whilst doing this.
Now that you're in chroot, there are some files that need to be edited, locale.gen and locale.conf.
First, do

nano /etc/locale.gen

...and uncomment the line(s) with UTF-8 of the locale(s) you desire, in my case en_US.UTF-8 UTF-8. Then exit nano, saving the edited file.
Next, run

locale-gen

The next file, locale.conf doesn't exist yet, so we're going to make it with:

echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8


***NOTE*** Replace en_US.UTF-8 with the locale you chose if using a locale other than English
Next, we will set the time zone.
Use

ls /usr/share/zoneinfo

to see all available countries, then list the directory with your country, for example:

ls /usr/share/zoneinfo/America/

Choose the city nearest you (New York for me), and create a symlink:

ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

Then set the hardware clock:

hwclock --systohc --utc

Now, I'm going to set a hostname by doing

echo EXAMPLE_HOSTNAME > /etc/hostname

Next, we're going to configure the wired network interface to start at boot.

***NOTE*** The following section has been FIXED. This is now unnecessary.

***NOTE*** The Arch Beginners' Guide points out that there is currently a bug in the install .iso that sets the interface name to something different after a reboot than the one used during installation. They have provided a script that will act as a workaround for now. That script follows here:

for i in /sys/class/net/*; do
echo "==$i"
udevadm test-builtin net_id "$i";
echo
done 2>/dev/null


In the following configuration, the value of ID_NET_NAME_PATH will be used in place of [interface]
We will be using netcfg for wired connections.
Install ifplugd with

pacman -S ifplugd

...and change the value for WIRED_INTERFACE to the value of ID_NET_NAME_PATH like so:

nano /etc/conf.d/netcfg

and change

WIRED_INTERFACE="eth0"

to

WIRED_INTERFACE="[interface]"

...and finally enable the service:

systemctl enable net-auto-wired.service

Also, enable dhcpcd to run at boot:

systemctl enable dhcpcd

***NOTE*** I am intentionally skipping wireless for now, as that it a BEAST to configure on the 6910p (If anyone's curious why, check Arch's wiki on Broadcom Wireless [yes, they have an entire section of the wiki specifically for Broadcom])

Next we're going to configure pacman (no, not the game, the [pac]kage [man]ager).
There are tons of articles on using pacman, but for now we're just going to be very basic and simply configure it.
***NOTE*** This only applies if installing x86_64 (a 64-bit system)
Selecting repositories:
Do

nano /etc/pacman.conf

...and scroll down to the line that reads #[multilib].
Uncomment that line and the two line following it and run

pacman -Sy

Next, set a root password with

passwd

Please make sure that this is a strong password as it is your root password. If you don't know what root is, this is a good explanation.
Next, we will create a normal user with useradd, like so:

useradd -m -g users -G wheel -s /bin/bash [username]
passwd [username]


Let's break that down:
useradd - add user command.
-m - makes the user's home folder at /home/[username]
-g users - the user's primary group, in this case, users
-G wheel - any supplementary groups, wheel for this user
-s /bin/bash - the user's login shell
[username] - username, must be alphanumeric (letters and numbers) and all lower case
passwd [username] allows you to set the password for [username]

In my next post, we'll be installing the bootloader and rebooting! Coming Soon! Here!