Installing phpmyadmin for web admin of mysql database.
First install mysql
$sudo apt-get install mysql-server mysql-client php5-mysql
Then install phpmyadmin
$sudo apt-get install phpmyadmin
there is a howto forge document here that gives a fuller explanation.
The correct how to suggests that you include the config file in the main apache2.conf.
Ubuntu/Debian systems have a folder called sites-enabled sites-available in /etc/apache2 .
conf files in these folders are loaded. Generally you will write the .conf files in the available forlder and create soft links to them from the enabled folder. so instead of inlcudeing this line in apache2.conf
Include /etc/phpmyadmin/apache.conf
I suggest creating a link to it from the enabled folder
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/sites-enabled/phpmyadmin
If doing it properly you should copy it to the sites-available and link to it there, rather than linking directly to it.
Twitter Updates
Sunday, 1 June 2008
Ubuntu reconfigure software once installed
Note to self when you mess up the installation of a program by choosing the wrong options in the blue configuration screen run dpkg-reconfigure.
$sudo apt-get install somepackage
somepackage downloads installs and runs through configuration.
choose the wrong option and try to remember how to run the setup
$sudo dpkg-reconfigure somepackage
$sudo apt-get install somepackage
somepackage downloads installs and runs through configuration.
choose the wrong option and try to remember how to run the setup
$sudo dpkg-reconfigure somepackage
Ubuntu setting up Apache
Setting up Apache2 with php5 on my Ubuntu server is as simple as .
$sudo apt-get install apache2 php5 libapache2-mod-php5
Well Apache and php works, just got to get mySQL and phpmyadmin setup.
Used this page as reference.
$sudo apt-get install apache2 php5 libapache2-mod-php5
Well Apache and php works, just got to get mySQL and phpmyadmin setup.
Used this page as reference.
Saturday, 31 May 2008
Ubuntu configuring samba
Installing Samba on my new server
$sudo apt-get update
$sudo apt-get install samba
Backup configuration
$sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.yyyy.mm.dd
Now configure
$vim /etc/samba/smb.conf
my setup
----
[edited 01/11/09]
My Example Config can be found here
[edit over]
Dont forget to create a samba user (relies on a standard user with that name present) then set the samba password.
$sudo smbpasswd -a username
Final step restart Samba
$sudo /etc/init.d/samba restart
$sudo apt-get update
$sudo apt-get install samba
Backup configuration
$sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.yyyy.mm.dd
Now configure
$vim /etc/samba/smb.conf
my setup
----
[edited 01/11/09]
My Example Config can be found here
[edit over]
Dont forget to create a samba user (relies on a standard user with that name present) then set the samba password.
$sudo smbpasswd -a username
Final step restart Samba
$sudo /etc/init.d/samba restart
Convert debain/ubuntu to static IP
My Ubuntu Mini-ITX server was by default being assined an IP through DHCP from the router. If my router could assign IP based on the MAC address I would not have to assign a STATIC IP on the machine itself but could control it from a central location. Since I dont have this most of my machine have a static IP assigned. For Debain and Ubuntu systems this is quite easy.
Following instructions are for eth0 (the first real network socket)
$sudo vim /etc/network/interfaces
This text should already be present
----
auto lo
iface lo inet loopback
if these lines are present delete/comment out (#at the beginning of the line is a commet)
----
----
#### Manually Added Below Morgy ####
auto eth0
iface eth0 inet static
address 192.168.1.x
netmask 255.255.255.0
gateway 192.168.1.x
network 192.168.1.0
broadcast 192.168.1.255
Now restart networking
A more complete tutorial
Following instructions are for eth0 (the first real network socket)
$sudo vim /etc/network/interfaces
This text should already be present
----
auto lo
iface lo inet loopback
if these lines are present delete/comment out (#at the beginning of the line is a commet)
----
auto eth0
iface eth0 inet dhcp
Add the following (replace the x's with the assigned ip)----
#### Manually Added Below Morgy ####
auto eth0
iface eth0 inet static
address 192.168.1.x
netmask 255.255.255.0
gateway 192.168.1.x
network 192.168.1.0
broadcast 192.168.1.255
Now restart networking
$ sudo /etc/init.d/networking restartA more complete tutorial
Darwin Ports
I recently found out about the Darwin Ports. It is built on the BSD package management system and lets you easily install unix programs that have been ported to os x. The package management part of it handles the dependencies for you. You do need to install Xcode first though.
http://darwinports.com/
Once downloaded you need to add the darwin ports binaries folder to the search path. from the terminal run (or manually added the path to the .bashrc)
$echo 'export PATH=$PATH:/opt/local/bin' >> ~/.bashrc
$echo 'export PATH=$PATH:/opt/local/sbin' >> ~/.bashrc
http://darwinports.com/
Once downloaded you need to add the darwin ports binaries folder to the search path. from the terminal run (or manually added the path to the .bashrc)
$echo 'export PATH=$PATH:/opt/local/bin' >> ~/.bashrc
$echo 'export PATH=$PATH:/opt/local/sbin' >> ~/.bashrc
Friday, 30 May 2008
Moving the /home dir
I am currently working on a low power mini-itx server. The operating system and boot partition is a 8GB flash drive, with a 1TB SATA drive for storage which can be powered down when not being used.
The OS is Ubuntu, running samba. I will be backing up my laptop to the server and so lots of data will be going into the homes directory. Therefore I need to move the /home/ directory to the 1TB Drive.
The partitioning/formatting/mounting steps taken for /dev/sda.
Partitioning http://tldp.org/HOWTO/Partition/fdisk_partitioning.html
$ sudo fdisk /dev/sda
option n to edit partition table.
option w to write the new partition.
Format ext3
$ sudo mke2fs -j /dev/sda1
Mounting, edit /etc/fstab
$ sudo mkdir -p /mnt/hostname/partitionname
$ sudo vim /etc/fstab
added this line
/dev/sda1 /mnt/hostname/partitionname ext3 rw,auto,async,errors=remount-ro 0 1
then
$ sudo mount -a
The new partition is now mounted.
Now move the homes directory
$ sudo cp -ax /home /mnt/hostname/partitionname/
$ sudo mv /home /home.old
$ sudo ln -s /mnt/hostname/partitionname/home /
The OS is Ubuntu, running samba. I will be backing up my laptop to the server and so lots of data will be going into the homes directory. Therefore I need to move the /home/ directory to the 1TB Drive.
The partitioning/formatting/mounting steps taken for /dev/sda.
Partitioning http://tldp.org/HOWTO/Partition/fdisk_partitioning.html
$ sudo fdisk /dev/sda
option n to edit partition table.
option w to write the new partition.
Format ext3
$ sudo mke2fs -j /dev/sda1
Mounting, edit /etc/fstab
$ sudo mkdir -p /mnt/hostname/partitionname
$ sudo vim /etc/fstab
added this line
/dev/sda1 /mnt/hostname/partitionname ext3 rw,auto,async,errors=remount-ro 0 1
then
$ sudo mount -a
The new partition is now mounted.
Now move the homes directory
$ sudo cp -ax /home /mnt/hostname/partitionname/
$ sudo mv /home /home.old
$ sudo ln -s /mnt/hostname/partitionname/home /
Subscribe to:
Posts (Atom)
