Static IP with DHCP-Assigned DNS on Ubuntu 9.10
There is a ton of bug reports regarding the Network-Manager’s nm-applet not properly configuring static ips. There are, and always have been, bugs in the nm-applet, in each of its versions. In short, getting a static ip with dhcp assigned DNS parameters requires editing the /etc/dhcp3/dhclient.conf file. Here we go.
sudo vi /etc/dhcp3/dhclient.conf>> alias { interface "eth0"; fixed-address 192.168.1.101; option subnet-mask 255.255.255.255; } <<sudo dhclient -rsudo dhclient
Installing GDAL via FWTools
wget http://home.gdal.org/fwtools/FWTools-linux-2.0.6.tar.gz sudo tar xzf FWTools-linux-2.0.6.tar.gz -C /usr/local sudo /usr/local/FWTools-2.0.6/install.sh sudo vi /etc/profile
# Add /usr/local/FWTools-2.0.6/bin_safe to the global $PATH pathmunge /usr/local/FWTools-2.0.6/bin_safe export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
sudo cp /usr/local/FWTools-2.0.6/man/man1/* /usr/local/man/man1/ sudo cp /usr/local/FWTools-2.0.6/man/man3/* /usr/local/man/man3/ sudo cp /usr/local/FWTools-2.0.6/share/man/man1/* /usr/local/share/man/man1/ sudo cp /usr/local/FWTools-2.0.6/share/man/man3/* /usr/local/share/man/man3/ logout
Warning: You may break PHP!
The fwtools_env.* files could be copied to /etc/profile.d/, but if you’re running PHP, you’ll break the mechanism that loads php extensions. I don’t know why.
Reference:
Configuring MySQL
The following is how I set up MySQL on wharf.
- First, ensure mysql is installed:
ls /etc/init.d/my* - Now, make mysql start on boot:
sudo /sbin/chkconfig --level 35 mysqld on - Start the mysql server:
sudo /etc/init.d/mysqld start - Make MySQL more secure:
sudo /usr/bin/mysql_secure_installation - Log into mysql as root:
mysql -u root -p [to be entered by prompt] - Add another mysql user:
mysql> CREATE USER 'newuser'@'%' IDENTIFIED BY 'newuserpass';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON *.* TO 'newuser'@'%';
mysql> FLUSH PRIVILEGES; - Exit mysql:
mysql> exit - Test:
mysql -u <newuser> -p <newuserpass>
Git – Install and Configure
Git is a code revision system not much unlike subversion and CVS. One of the best features of git is that it is a distributed revision system, so you can check-in, check-out, commit, revert, etc without ever needing direct access to the central repository. You can work with your repository as if it were a centralized system if need be found. Read more …
Installing JDK on RHEL5
I needed to install the JDK as a prerequisite for GeoServer.
Steps
- Download latest JDK (jdk-6u16-linux-i586-rpm.bin) from Sun.
Note: navigating Sun’s website and using their download accelerator is a PAIN. - chmod a+x jdk-6u16-linux-i586-rpm.bin
- sudo ./jdk-6u16-linux-i586-rpm.bin
- ls -l /usr/java
- Create file /etc/profile.d/java-jdk.sh
- sudo vi /etc/profile.d/java-jdk.sh
- cat /etc/profile.d/java-jdk.sh
#!/bin/bash
export JAVA_HOME=/usr/java/latest
export JRE_HOME=/usr/java/latest/jre
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH