SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
Revision of MySQL from Thu, 07/18/2013 - 12:23
Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.
Installation
Download the latest version, which was 5.1.67 at the time of writing.
cd /extra/src
wget http://mysql.mirror.rafal.ca/Downloads/MySQL-5.1/mysql-5.1.67.tar.gz
tar zxf mysql-5.1.67.tar.gz
cd mysql-5.1.67Add a group and user for the mysql daemon. For a Linux system:
groupadd mysql
useradd -g mysql mysqlAt this point, we don't need any advanced options, so our configuration options are simply - just the install path:
./configure --prefix=/usr/local/mysql --with-plugins=innobaseIf configure complains No curses/termcap library found then:
yum install ncurses-develIf it configures without errors, make and install the binaries:
make
make installCopy the default preferences file:
cp support-files/my-medium.cnf /etc/my.cnfBecause we compiled and installed as root, we need to change the ownership on the installed files so that the mysql user can access them:
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .Create the MySQL data directory and initialize the user tables. In order to get this to run with 5.1.29-rc, I had to edit /etc/my.cnf and comment out the skip-federated line.
bin/mysql_install_db --user=mysqlWhile most of the installation can be owned by root, the data directory must be owned by the mysql user:
chown -R root .
chown -R mysql varTo test out the installation, start up the MySQL server:
bin/mysqld_safe --user=mysql &Post-Installation Setup
More detailed instructions available at MySQL's Securing the Initial MySQL Accounts page.
If you prefer, the anonymous account could be removed:
/usr/local/mysql/bin/mysql -u root
DELETE FROM mysql.user WHERE User = '';
FLUSH PRIVILEGES;Otherwise, assign passwords to the anonymous accounts
/usr/local/mysql/bin/mysql -u root
SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
SET PASSWORD FOR ''@'127.0.0.1' = PASSWORD('newpwd');
SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');If you don't know the value of host_name, you can get it using:
SELECT Host, User FROM mysql.user;Now assign passwords to the root accounts:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('newpwd');
SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');Flush the privileges to make sure our changes take effect:
FLUSH PRIVILEGES;
exitIf you ever forget the the root password, instructions for how to reset it are here.
Stop the MySQL daemon:
killall mysqldAutomatic startup
We're going to use daemontools.
If you haven't already, install daemontools.
Create a directory for the MySQL service:
mkdir -m 1755 /var/service/mysql
cd /var/service/mysqlCreate the /var/service/mysql/run script, making sure to change the servername:
#!/bin/sh
exec 2>&1
exec \
/usr/local/bin/setuidgid mysql \
/usr/local/mysql/libexec/mysqld \
--old-passwords \
--basedir=/usr/local/mysql \
--datadir=/usr/local/mysql/var \
--user=mysql \
--pid-file=/usr/local/mysql/var/<servername>.com.pid \
--skip-external-locking \
--port=3306 \
--socket=/tmp/mysql.sockMake the script executable:
chmod 755 runOur log script comes from John Simpson's:
mkdir -m 755 log
cd log
wget http://qmail.jms1.net/scripts/service-any-log-run
mv service-any-log-run run
chmod 755 runFinally, add the service to daemontools by creating the symbolic link in /service
ln -s /var/service/mysql /service/mysqlConfirm that the service is running:
svstat /service/mysql /service/mysql/log- Log in to post comments