History
MySQLAdmin maintains a history, accessible with the up and down arrows. And it works between sessions.
Which is nice.
Show all the (user) tables
> show tables;
Describe a specific table (e.g. users table):
> describe users;
Monday, February 23, 2009
Installing Web Frameworks, part 6: installing MySQL
- install mysql: sudo apt-get install mysql-server-5.0
- set the root password
- change root password (I didn't like the one I set it to): mysqladmin -u root -p password
, where is the new password (and not the actual word 'password')
Thursday, February 12, 2009
apt-get without cdrom prompt
When running certain versions of Ubuntu (7.10 in this case), you might encounter a request to insert the cdrom when doing apt-get.
To stop this happening, edit the /etc/apt/sources.list file, and comment out (using leading #) the line containing 'deb cdrom...'
To stop this happening, edit the /etc/apt/sources.list file, and comment out (using leading #) the line containing 'deb cdrom...'
Installing Web Frameworks, part 5: Ruby On Rails
- Install Ruby: sudo apt-get install ruby-full build-essential
- Install SVN: sudo apt-get install subversion
- Install gems: download rubygems-1.2.0.tgz from rubyforge.org, then tar -zxvf rubygems-1.2.0.tgz, then sudo ruby setup.rb
- Install gems: download rubygems-1.3.1.tgz from rubyforge.org, then tar -zxvf rubygems-1.3.1.tgz, then sudo ruby setup.rb, then sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
- update gems: sudo gem update --system
- install Rails: sudo gem install rails -v 1.2.3 --include-dependencies
Wednesday, February 11, 2009
Installing Web Frameworks, part 4: renaming hosts
- edit the hostname file: sudo vi /etc/hostname
- change to required name
- reboot
Tuesday, February 10, 2009
Installing Web Frameworks, part 3: fixed IP address for SCC server
Next task was to ensure a fixed IP was assigned to the SCC (SVN) server. There's a known feature in Ubuntu 8.10 whereby any attempt to assign a fixed IP address using the Network Manager is overridden during reboot. There are many proposed solutions: here, here, here and here.
Having spent ~3 hours today fighting my own unique battle, I can relay the following measures that I had to do:
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet static
address 192.168.0.11
netmask 255.255.255.0
gateway 192.168.0.1
# /etc/resolv.conf
nameserver 192.168.0.2
nameserver 192.168.0.1
HTH
Having spent ~3 hours today fighting my own unique battle, I can relay the following measures that I had to do:
- I had to uninstall Network Manager: sudo apt-get purge network-manager
- edit /etc/networking/interfaces, as shown below
- edit /etc/resolv.conf, as shown below
- restart networking and/or reboot: sudo /etc/init.d/networking restart
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet static
address 192.168.0.11
netmask 255.255.255.0
gateway 192.168.0.1
# /etc/resolv.conf
nameserver 192.168.0.2
nameserver 192.168.0.1
HTH
Labels:
init.d,
networking,
static IP address,
Ubuntu
Installing Web Frameworks, part 2: SVN
- install apache2: sudo apt-get install apache2
- install svn: sudo apt-get install subversion
- add a svnusers group: sudo groupadd svnusers
- enabled visibility for all users: Alt-F2 to bring up run, and then type in gconf-editor. Within this, open apps/gnome-system-tools/users, and check showall.
- add me, root and www-data to svnusers group: I cheated and did it via the GUI!
- create root repositories directory: sudo mkdir /srv/repositories
- assign repositories to www-data & svnusers: sudo chown -R www-data:svnusers /srv/repositories
- change mod: sudo chmod -R g+rws /srv/repositories
- create rails repo, in /srv/repositores: svnadmin create rails
- repeat steps 7 & 8, to ensure that apache owns and controls all the files in the repo
- install libapache2-svn: sudo apt-get install libapache2-svn
- restart Apache2: sudo /etc/init.d/apache2 restart
- edit /etc/apache2/mods-available/dav_svn.conf. Add in the contents specified here. The list is below.
- create the password file /etc/subversion/passwd: sudo htpasswd -c /etc/subversion/passwd matthew. Don't forget this, or you'll end up with weird permissions errors in local and remote clients, including things along the lines of "Server sent unexpected return value (500 Internal Server Error) in response to MKACTIVITY request"
<Location /svn>
DAV svn
SVNParentPath /srv/repositories
SVNListParentPath On
AuthType Basic
AuthName "Synesis Web Subversion Repository"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
Minimal C++ program to verify GCC installation
#include <iomanip>
#include <iostream>
#include <stdlib.h>
int main(int argc, char** argv)
{
std::cout << "__GNUC__: 0x" << std::hex << __GNUC__ << std::endl;
return EXIT_SUCCESS;
}
#include <iostream>
#include <stdlib.h>
int main(int argc, char** argv)
{
std::cout << "__GNUC__: 0x" << std::hex << __GNUC__ << std::endl;
return EXIT_SUCCESS;
}
Minimal C program to verify GCC installation
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv)
{
printf("__GNUC__: 0x%08x\n", __GNUC__);
return EXIT_SUCCESS;
}
#include <stdlib.h>
int main(int argc, char** argv)
{
printf("__GNUC__: 0x%08x\n", __GNUC__);
return EXIT_SUCCESS;
}
Monday, February 9, 2009
Installing Web Frameworks, part 1: Ubuntu
- Download Ubuntu 8.10 in 32 and 64-bit guises
- Install two 32-bit systems: 1-processor and 2-processor
- Action all the latest updates
- Install/update the basic build tools, as described in the next few steps:
- gcc: sudo apt-get install build-essential
- verify gcc, by defining two programs, one C and a C++, and compiling them.
Subscribe to:
Posts (Atom)