This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSTALL | |
======= | |
1. get the wright source distribution (watch for _64 unless it matches your machine echitecture) | |
2. cd /usr/local | |
3. sudo tar -zxvf /path/to/mysql-VERSION-OS.tar.gz | |
4. sudo ln -s full-path-to-mysql-VERSION-OS mysql | |
5. cd ./mysql | |
6. sudo chown -R mysql . | |
7. sudo chgrp -R mysql . | |
8. sudo scripts/mysql_install_db --user=mysql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To create a database instance, after install do | |
sudo mkdir -p /opt/local/var/db/postgresql83/defaultdb | |
sudo chown postgres:postgres /opt/local/var/db/postgresql83/defaultdb | |
sudo su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/defaultdb' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * INTO OUTFILE '/tmp/output.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM table_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======================= buildout.cfg ======================= | |
[buildout] | |
unzip = true | |
develop = . | |
eggs = | |
ws_ha_transitory | |
ipython | |
ipdb | |
MySQL-Python | |
docutils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ifconfig eth0 192.168.1.50 netmask 255.255.255.0 up | |
sudo ifconfig eth0 hw 00:00:00:00:00:00 | |
sudo route add default gw 172.16.236.0 | |
Display current active Internet connections: | |
netstat -nat | |
Display open ports | |
sudo netstat -tulp || sudo netstat -tulpn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Fixed row_format table (better indexes than for Dynamic) | |
mysql> CREATE TABLE test_tab ( | |
id int(11) unsigned NOT NULL AUTO_INCREMENT, | |
id_2 int(11) unsigned NOT NULL, | |
id_3 int(11) unsigned NOT NULL, | |
name char(10) NOT NULL, | |
c_date date NOT NULL, | |
mtime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
PRIMARY KEY (id) | |
) ENGINE=MyISAM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB table sizes overview | |
======================= | |
SELECT TABLE_NAME, TABLE_ROWS FROM information_schema.tables WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_ROWS DESC; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. First get libevent as it is required by next step. In case you have it jump to the next step | |
http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz | |
tar -xzvf libevent-1.4.13-stable.tar.gz | |
cd libevent-1.4.13-stable/ | |
./configure | |
make | |
make install | |
2. Get C source and build Gearman | |
wget http://launchpad.net/gearmand/trunk/0.12/+download/gearmand-0.12.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Start gearman `server` on some machine (here `worker` machine): | |
$ gearmand --port 8888 | |
2. Connect a `worker` to the server | |
$ gearman -h IP -p 8888 -w -f test wc | |
$ gearman -h 127.0.0.1 -p 8888 -w -f test executable_script | |
3. Push a job to queue by calling: | |
$ gearman -h IP -p 8888 -f test "SOME DATA TO PROCESS OR ARGS" | |
Notes: | |
* Gearman does NOT spawn any `worker` processes, therefore if a number of `workers` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN {begin=0;end=0} | |
{ | |
if ($1 == "Open_features:") begin=1 | |
if (begin && $1 == "") end=1 | |
if (begin && !end && $1 != "#" && $1 != "Open_features:") OUT[$NF] = 1 | |
} | |
END {for (key in OUT) print key} |
OlderNewer