This is a huge bombshell of a question because there are many implementations of Linux, and some people are attached to distros passionately. So I am going to concentrate on a few mostly Redhat and Debian based in this post. I will not even try to cover everything, that would be crazy...
I moved this to a static page instead of a blog post as I've been updating it occasionally see Which Linux should I use ??? page
Monday, September 27, 2010
Tuesday, August 17, 2010
Set up LAMP stack on Fedora
LAMP = Linux Apache MySQL PHP
(I set this up for a class I was teaching they were using Fedora 13, it is of course easily adaptable for CentOS or RHEL)
Fedora comes with Apache (httpd) installed and mysql client but it is missing a few things to complete the LAMP stack. So a little work is required to get everything set up. All of the following are systems administration tasks and must be done as root user:
Once you complete this you can install Wordpress, Mediawiki, Tikiwik etc. Or if you want to build your own application start with this tutorial IBM DeveloperWorks Introduction to LAMP
These instructions are also applicable to Centos 5.x. Be aware that where it says install / update you may need to do one or the other depending upon your install.
Apache http://httpd.apache.org/docs/2.2/
PHP http://ca3.php.net/tut.php
(I set this up for a class I was teaching they were using Fedora 13, it is of course easily adaptable for CentOS or RHEL)
Fedora comes with Apache (httpd) installed and mysql client but it is missing a few things to complete the LAMP stack. So a little work is required to get everything set up. All of the following are systems administration tasks and must be done as root user:
Once you complete this you can install Wordpress, Mediawiki, Tikiwik etc. Or if you want to build your own application start with this tutorial IBM DeveloperWorks Introduction to LAMP
These instructions are also applicable to Centos 5.x. Be aware that where it says install / update you may need to do one or the other depending upon your install.
Apache http://httpd.apache.org/docs/2.2/
- yum update httpd -y
- service httpd start
- chkconfig httpd on
make sure it starts up when we reboot
- Note: main configuration file /etc/httpd/conf/httpd.conf, others in /etc/httpd/conf.d./*
- yum install mysql-server -y
- service mysqld start
- chkconfig mysqld on
make sure it starts up when we reboot - mysql_secure_installation
secure the install a little bit! - yum install phpmyadmin -y
the browser/web interface for mysql - service httpd restart
- Optional create a database:
- mysql -u root -p
- mysql> create database testing;
- mysql> grant all on testing.* to 'userx' identified by '123pass';
- mysql> quit
- mysql -u userx -p
- mysql> show databases;
- mysql> quit
- or you can do the same thing using http://localhost/phpMyAdmin
- Note: phpMyAdmin defaults to respond only to a localhost client, to allow other hosts to use it you must modify /etc/httpd/conf.d/phpMyAdmin.conf:
- Locate the line(s) Allow from 127.0.0.1
- Add a line below it
Allow from 192.168.10.0/24
where 192.168.10.0/24 is your network - save the file
- service httpd reload
PHP http://ca3.php.net/tut.php
- yum -y update php php-mysql
- If you are using Tikiwiki you may also need the php & gd connection: yum install php-gd -y
- service httpd reload
- create a file /var/www/html/hello.php containing:
- Load the file in a browser http://localhost/hello.php
if you see the text hello world, you are ready to go - Optional
- create a file /var/www/html/phpinfo.php
- load the file in a browser http://localhost/phpinfo.php
- 80 for apache/httpd (443 for https)
- 3306 for mysql
Thursday, July 8, 2010
Remote control your Linux box (VNC ~= Remote Desktop on Windows)
For those who visit or live in the Windows world the built in Remote Desktop client and server capabilities are quite handy for administrative tasks. It allows you to log onto one Windows computer via another.
Windows on the server side (the one you want to control, not necessarily a server)
Windows on the client side
While administrators of Linux boxes generally will connect using ssh, to use a command line interface, the demand for GUI based remote control has increased. So here are some instructions for configuring VNC on Linux if ssh & cli are not enough for you (note the instructions do not include ssh tunneling of VNC, see future posts for tunneling):
Linux server & client instructions Configure Fedora 12 - 13 VNC remote access
For a windows client download and install VNC Viewer it is a stand alone application.
Windows on the server side (the one you want to control, not necessarily a server)
- right click on My Computer > Properties > Remote tab
- ensure that remote Desktop "Allow Connections" is selected
Windows on the client side
- (Win 7 / Vista) All Programs > Accessories > Remote Desktop
- (Win XP) All Programs > Accessories > Communications > Remote Desktop
While administrators of Linux boxes generally will connect using ssh, to use a command line interface, the demand for GUI based remote control has increased. So here are some instructions for configuring VNC on Linux if ssh & cli are not enough for you (note the instructions do not include ssh tunneling of VNC, see future posts for tunneling):
Linux server & client instructions Configure Fedora 12 - 13 VNC remote access
For a windows client download and install VNC Viewer it is a stand alone application.
Monday, July 5, 2010
Have fun with your neighbours!
So somebody is piggy backing on your wireless network?
I am of the mind that it's no harm no foul if someone occasionally uses my wireless. I also support the ideas and use of http://www.ilesansfil.org/ but where I live it hasn't been adopted much, I think it has to do with population density 'burbs vs urbs??
However if someone is slowing your network or using it for nefarious purposes you may want to lock them out or mess with their heads:
The essential idea is that you split your network into trusted and unknown using DHCP. Then you have some fun with the unknowns: the two suggestions are
You may find instructions here:
http://www.ex-parrot.com/pete/upside-down-ternet.html
I am of the mind that it's no harm no foul if someone occasionally uses my wireless. I also support the ideas and use of http://www.ilesansfil.org/ but where I live it hasn't been adopted much, I think it has to do with population density 'burbs vs urbs??
However if someone is slowing your network or using it for nefarious purposes you may want to lock them out or mess with their heads:
The essential idea is that you split your network into trusted and unknown using DHCP. Then you have some fun with the unknowns: the two suggestions are
- send all traffic to kittenwar.com
- reverse all of the images using a simple perl script & the mogrify binary from ImageMagik
You may find instructions here:
http://www.ex-parrot.com/pete/upside-down-ternet.html
Tuesday, June 29, 2010
Using iso file contents
So you have an iso file & want to see what's on it ??
These are systems administration type tasks and must be done as root (su - to root, or sudo)
An iso is a file system so you have to mount it as you would any other file system:
Use the man pages:
man mkdir
man mount
man ls
These are systems administration type tasks and must be done as root (su - to root, or sudo)
An iso is a file system so you have to mount it as you would any other file system:
- create a mount point mkdir -p /mnt/iso
- mount -o loop -t iso9660 yourisofile.iso /mnt/iso
- look at the files under the tree ls -l /mnt/iso
Use the man pages:
man mkdir
man mount
man ls
Creating iso files
On linux (& unix type boxes) it is easy to create an ISO file no extra software is needed, we use the dd command. d(isk)d(ump) is one of the core gnu utilities and should be installed by default on all but the most lean implementations.
These are systems administration type tasks and must be done as root (su - to root, or sudo)
From a CDROM or DVD
From a files on disk drive
*man dd
*man mkisofs
These are systems administration type tasks and must be done as root (su - to root, or sudo)
From a CDROM or DVD
- Open a terminal session.
- for a CD: dd if=/dev/cdrom of=thenameofmycd.iso
- for a DVD: dd if=/dev/dvd of=thenameofmydvd.iso
dd is disk dump, if is in file, of is out file
From a files on disk drive
- Open a terminal session.
- mkisofs -o thenameofmy.iso file(s) and/or directory(ies)
n.b. mkisofs will create an hybrid file system (ISO9660 in this case)
*man dd
*man mkisofs
Subscribe to:
Posts (Atom)
