Saturday, February 12, 2011

New site, new focus

Hey thanks for checking out my all-things-unix blog. I have been neglecting it quite a bit lately but have started posting more howtos. They can be found at http://www.sandbaux.com! See you there.

Wednesday, January 27, 2010

The LAMP Stack, on Ubuntu, Minty Linux, and Debian

If you don't know, the LAMP stack is the Linux-Apache-MySQL-PHP stack. Because Ubuntu (and therefore Minty Linux) and Debian have apt-get, this process is extremely simple. First, lets get everything installed.

$sudo apt-get install apache2 apache2-utils mysql-server php5 libapache2-mod-php5 php5-mysql mysql-client

One line, everything will be installed. But we should do some configuring before we start it all up. To begin, lets configure apache. The file needing to be edited is /etc/apache2/apache2.conf. Choose your favorite text editor, and add the following line to the file.

ServerName localhost

If you have your own domain, then you can put this instead. Also, if you are intending to use a non-default folder to store your web documents, you'll need to adjust this as well. I will cover these changes in my next post about Virtual Hosting using apache2. For now, we'll just get the server up and running.

Lets start the web server and make sure its working.

sudo /etc/init.d/apache2 start

And then browse to http://localhost. Is everything working? It should say "It works!" making it easy to tell. Next, we'll start the MySQL server.

sudo /etc/init.d/mysql start

And then from the command line, connect to make sure its working with:

mysql -u root

If it works, you should really change your root password for security reasons. If you were able to connect, enter "exit" to, well, exit, and then run the following comand.

mysqladmin -u root password YOUR NEW PASSWORD

Phew, we're safe again! The last step is to verify that PHP is working. This involves placing a new file into your web directory. The default directory is /var/www/. Go there now. Using your favorite text editor, create a new file called phptest.php. This is what it should contain:



Thats it. Then again, browse to http://localhost/phptest.php. Do you see a lot of information? Do you see nothing? Nothing is bad, lots of information is good. But once you see it, remove the phptest.php file for security reasons. You're up and running!

Saturday, October 31, 2009

Feeds

Want to get updates when I add something to the site? Add my site by adding this link to your RSS reader, or other such things. I have been using Google Reader. It in my opinion is very convenient. Just add this link http://feeds.feedburner.com/SliceOfUnix to your RSS feeder and wowee! Updates on your time.

Adjusting the Network and Updating VirtualBox on OpenSolaris

With school started up, I've not been posting much, and I apologize. However, I did finally replace the motherboard in my main desktop, which has pushed me to use my server more (laptops and wireless weren't working well with the server except to come in, plug into the wired network, and dump. The last dump was 150 gigs, hence it not being convenient to do over wireless). Today, I decided to update VirtualBox since it was complaining that 3.0.8 was available. Due to just having installing VirtualBox on my newly built desktop, I knew that actually 3.0.10 was out, so I went and grabbed it to install. This is probably the third time I've "upgraded" VirtualBox on my OpenSolaris box since installing 3.0.2, but this time I noticed it hung on adding the VirtualBoxKern package, stating that there were already too many. I then realized that I'd never actually upgraded. Heres how to uninstall the old one, and install the newest pacakage.


#pkgrm SUNWvboxkern
#pkgrm SUNWvbox
#pkgadd -G -d VirtualBoxKern-3.0.10-SunOS-r54097.pkg
#pkgadd -G -d VirtualBox-3.0.10-SunOS-r54097.pkg

So happy hunting. I'm still in the process of balancing my computer power again, as I wanted some fast hard drive but accidentally replaced my motherboard with one without on board raid, so I might actually switch the internals of the OpenSolaris box (Phenom II) with the Windows box (Intel Q6600) so I have raid, and can then finally use my hardware raid card (one 16x PCI Express slot means I can't use an 8x slot because of the video card already taking it up). More on that as we go. I'm still also tempted to check out ZFS on FreeBSD...

Monday, September 28, 2009

FreeBSD GUI, Gnome First

Today my goal was to get a GUI up and running on FreeBSD. Due to my own familiarity with it, I chose Gnome. The first thing you'll need to do is either compile from source, or use the package management system. I chose to go the package management route because it usually is quicker. The package required is gnome2, so I ran this command:

#pkg_add -r gnome2

This installs everything you'll need. I then attempted to start the GUI with startx but that didn't work, instead putting me into the basic X11 GUI. I then created a ~/.xinitrc file. I added the following line with the following command:

$echo "/usr/local/bin/gnome-session " > ~/.xinitrc

Then ran

$startx

This failed. I wasn't sure why, so I enabled gdm by editing the /etc/rc.conf file and adding

gdm_enable="YES"

and then rebooting. This time I got an error message, telling me some files were unable to be found. To combat that, I then did some googling and found the suggestion to add the following two lines to /etc/rc.conf

dbus_enable="YES"
hald_enable="YES"

and again rebooting. Like that I was into gnome! Next i'll be looking at getting kde installed.

Sunday, September 27, 2009

FreeBSD, a cheaters way into BSD paradise

FreeBSD was explained to me as linux, but with a different mascot. Without going into that, I have started pushing myself to learn it, due to it being ZFS compatible. I'm debating switching from OpenSolaris to FreeBSD for my fileserver so that I can keep ZFS, but have a little bit more mature system. I'm not set on the switch, but researching my options.

One thing I've run into with FreeBSD is getting my user into the wheel group. This allows my normal user to su into root. As root, you must run

#pw user mod username -G wheel

Log out, log in, and poof kabam, you're ready to go. Look here for continuing tips for FreeBSD as I dive in.

Friday, September 25, 2009

OpenSolaris 2009.11, a Long Term Look

I've been using OpenSolaris 2009.06 for some time now. I have really enjoyed the feeling of security I get with all of my files hosted on my large-ish ZFS pool. However there have been some issues which I would like to bring up, and some other things I would like to compliment.

First, OpenSolaris has great package management software. I haven't found something yet that I'm unable to install except for high end scanner software for scanning film and slides. That cannot be blamed on OpenSolaris. Second, the minor differences in commands from ZFS and Linux are minimal enough that I had no issue learning OpenSolaris. Third, setup was quick and easy and I had a ZFS protected, secure Samba share going in my house in under 15 minutes on a fresh install.

Some of the issues I've come across are the difference in speed between OpenSolaris and Linux. OpenSolaris can be sluggish at times, especially when logging in to SSH. I've also had issues with the built in CIFS occasionally failing, whether due to the computers attaching to it, or the service itself. I installed Samba from source, but eventually went back to the CIFS for simplicity.

So these are some basic views on OpenSolaris after a few months of use. If you haven't tried it yet, I would suggest it as it was rather interesting if nothing more to try.