February 29, 2008
Plesk
No Comments
If permissions for Plesk domains get screwed up for any reason (chown -R sillyclown:sillyadmin /var/www/vhosts) or some of the sort, you can fix it by running the following command:
/usr/local/psa/admin/sbin/vhostmng --install-vhost --vhost-name=domain.tld --user-name=domain_user --set-content-permissions
Cheers!
February 22, 2008
Web
No Comments
I worked on a few Urchin migrations this month so I’m posting the steps. Very simple and straight forward:
1. First copy '/usr/local/urchin/data' directory from the old server to the same location on the new server.
2. On the old server, run:
/usr/local/urchin/util/uconf-export -f filename
and copy the output file to the new server
3. For a backup of the current config on the new server, run:
/usr/local/urchin/util/uconf-export -f filename
4. On the new server, run:
/usr/local/urchin/util/uconf-import -f filename
The filename should be the config from the old server, which you copied over in step 2. This should only import settings that do not already exist on the new server, so it will not overwrite any existing configuration.
Let me know if you guys have any questions or comments.
February 20, 2008
Databases
No Comments
Here is how to set some global variables in mySQL on the fly without having to restart the service.
To increase max_connections from 100 to 250 for example, run
mysql> set global max_connections=250;
Check using
mysql> show global variables;
Make sure to add it to /etc/my.cnf if you want the change to persist across restarts.
February 19, 2008
Installations, Web
5 Comments
This is a step by step stand alone installation of Tomcat 6
JDK Install:
fetch JDK @ http://java.sun.com/
# sh jdk-6u4-linux-i586-rpm.bin
accept license
set java home and path:
# JAVA_HOME=/usr/java/jdk1.6.0_04/
# export JAVA_HOME
# PATH=$JAVA_HOME/bin:$PATH
# export PATH
# which java
Make it happen at boot time:
# cd /etc/profile.d
# vi /etc/profile.d/jdk.sh
add the following lines to jdk.sh:
export JAVA_HOME=/usr/java/jdk1.6.0_04/ #(or the the location to java home if different)
export PATH=$JAVA_HOME/bin:$PATH
Installing Tomcat From Binary:
wget http://www.signal42.com/mirrors/apache/tomcat/tomcat-6/v6.0.16/bin/apache-tomcat-6.0.16.tar.gz
Untar:
# tar -zxvf apache-tomcat-6.0.16.tar.gz
Move it to /opt/ or desired location
# mv apache-tomcat-6.0.16 /opt/
For security, lets make it run under a underprivileged user:
# useradd tomcat -d /opt/apache-tomcat-6.0.16/temp/
Adjust permissions:
# chown -R tomcat:tomcat /opt/apache-tomcat-6.0.16/
Test install
[root@localhost opt]# sudo -u tomcat /opt/apache-tomcat-6.0.16/bin/startup.sh
or use startup script:
#vi /etc/init.d/tomcat
use the following script:
http://www.linuxzone.org/scripts/tomcat.txt
Add it to chkconfig and turn it on:
# chkconfig --add tomcat
# chkconfig tomcat on
That is it! Let me know if missed anything.