| 91 | |
| 92 | |
| 93 | ==== Secure Sockets (https) ==== #ssl |
| 94 | |
| 95 | This works for a development system (not recommended for production!). |
| 96 | |
| 97 | {{{ |
| 98 | openssl genrsa -des3 -out server.key 1024 |
| 99 | # [enter your passphrase, a simple password we will remove soon] |
| 100 | openssl req -new -key server.key -out server.csr |
| 101 | # [you can accept all the defaults, it does not matter, or customize it to your liking] |
| 102 | openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt |
| 103 | # [will ask for passphrase] |
| 104 | cp server.key server.key.bak |
| 105 | openssl rsa -in server.key.bak -out server.key |
| 106 | # [passphrase needs to be typed] |
| 107 | sudo cp server.crt /opt/local/apache2/conf/ |
| 108 | sudo cp server.key /opt/local/apache2/conf/ |
| 109 | }}} |
| 110 | |
| 111 | Then enable the following in {{{/opt/local/apache2/conf/httpd.conf}}} |
| 112 | |
| 113 | {{{ |
| 114 | LoadModule ssl_module modules/mod_ssl.so |
| 115 | |
| 116 | # Secure (SSL/TLS) connections |
| 117 | Include conf/extra/httpd-ssl.conf |
| 118 | }}} |
| 119 | |
| 120 | |
| 350 | For additional features provided by pmadb (http://wiki.phpmyadmin.net/pma/pmadb), run |
| 351 | run this SQL to setup the pma 'controluser' (change the 'pmapass' to your password). |
| 352 | {{{ |
| 353 | $ mkdir ~/tmp && cd tmp |
| 354 | $ cat > tmp.sql |
| 355 | GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass'; |
| 356 | GRANT SELECT ( |
| 357 | Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, |
| 358 | Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, |
| 359 | File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, |
| 360 | Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, |
| 361 | Execute_priv, Repl_slave_priv, Repl_client_priv |
| 362 | ) ON mysql.user TO 'pma'@'localhost'; |
| 363 | GRANT SELECT ON mysql.db TO 'pma'@'localhost'; |
| 364 | GRANT SELECT ON mysql.host TO 'pma'@'localhost'; |
| 365 | GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) |
| 366 | ON mysql.tables_priv TO 'pma'@'localhost'; |
| 367 | -- |
| 368 | -- [Hit CNT-D] |
| 369 | -- |
| 370 | $ mysql5 -u root -p < tmp.sql |
| 371 | }}} |
| 372 | |
| 373 | Then setup all the tables for the pmadb features with: |
| 374 | {{{ |
| 375 | mysql5 -u root -p < /opt/local/www/phpmyadmin/scripts/create_tables.sql |
| 376 | }}} |
| 377 | |
| 378 | |