[HOWTO] install mysql/phpmyadmin
Posted: 27 Feb 2013 17:35
9.1.0.1 - Sandstorm (revision 636)
Build date Tue Feb 5 01:22:23 CET 2013
Platform OS FreeBSD 9.1-RELEASE (reldate 901000)
Platform x64-full on Intel(R) Pentium(R) CPU G630 @ 2.70GHz
Full Install no swap on 32GB USB Drive
Combined information from these two posts:
Nas4Free (Freenas 7.x), install Mysql -- Install MySQL 5.5 https://sites.google.com/site/aganimkar ... extensions
Installing MySQL And phpMyAdmin On FreeNAS -- Installation of PHP/phpMyAdmin http://www.howtoforge.com/installing-my ... on-freenas
connect with ssh and # su to root.
Set Package site.
MYSQL: Before install mysq server need add group mysql GID=88 and user mysql UID=88 over webgui
Create dir and install package
Go to dir install db tables
After reboot and test process in top
PHPMYADMIN
Although FreeNAS includes php for its own web interface working upon it, it's good to install extra supporting packages to run php-based applications.
Let's start the process with the following commands:
These commands install php5 and some basic packages needed to run phpMyAdmin, after the installation you will not be able to access NAS4free webGUI interface
because of a problem, don't panic let's correct it by issuing the following commands:
Back in business! At this point our installation of the MySQL server and PHP has successfully been completed.
Installation of phpMyAdmin
Let's create a proper directory to hold applications, you are welcome to use you own scheme:
Download phpMyAdmin Untar the archeive and create the necessary symbolic links:
Now create a link to run phpMyAdmin from the default location:
You can access phpMyAdmin from http://< nas4free ip >/phpMyAdmin/. 
Build date Tue Feb 5 01:22:23 CET 2013
Platform OS FreeBSD 9.1-RELEASE (reldate 901000)
Platform x64-full on Intel(R) Pentium(R) CPU G630 @ 2.70GHz
Full Install no swap on 32GB USB Drive
Combined information from these two posts:
Nas4Free (Freenas 7.x), install Mysql -- Install MySQL 5.5 https://sites.google.com/site/aganimkar ... extensions
Installing MySQL And phpMyAdmin On FreeNAS -- Installation of PHP/phpMyAdmin http://www.howtoforge.com/installing-my ... on-freenas
Code: Select all
# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/
Code: Select all
# mkdir -p /mnt/data/db/mysql
# chmod -R 777 /mnt/data/db
# ln -s /mnt/data/db/mysql /var/db/mysql
# ln -s /mnt/data/db/mysql /usr/local/data
# pkg_add -r mysql55-server
# rehash
Code: Select all
# cd /usr/local
# mysql_install_db
# chown -R mysql:mysql /mnt/data/db/mysql/
# mysqld_safe &
add through webgui System|Advanced|rc.conf mysql_enable="YES"'
# shutdown -r now
Code: Select all
# /usr/local/bin/mysqladmin -u root -h localhost password 'NEW-PASSWORD'
# /usr/local/bin/mysqladmin -u root -h nas4free.local password 'NEW-PASSWORD'
Although FreeNAS includes php for its own web interface working upon it, it's good to install extra supporting packages to run php-based applications.
Let's start the process with the following commands:
Code: Select all
# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/
# pkg_add -v -r php5
# pkg_add -v -r php5-extensions
# pkg_add -v -r php5-xmlrpc
# pkg_add -v -r php5-gettext
# pkg_add -v -r php5-mcrypt
# pkg_add -v -r php5-mysql
# pkg_add -v -r php5-mysqli
# pkg_add -v -r php5-mbstring
because of a problem, don't panic let's correct it by issuing the following commands:
Code: Select all
# mv /usr/local/bin/php /usr/local/bin/php-cli
# cp /usr/local/bin/php-cgi /usr/local/bin/php
Code: Select all
# mkdir -p /mnt/dynamic/apps
# cd /mnt/dynamic/apps
Code: Select all
# fetch http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.7/phpMyAdmin-3.5.7-all-languages.tar.gz
# tar -zxvf phpMyAdmin-3.5.7-all-languages.tar.gz
# ln -s /mnt/dynamic/apps/phpMyAdmin-3.5.7-all-languages/ /mnt/dynamic/apps/phpMyAdmin
Code: Select all
# ln -s /mnt/dynamic/apps/phpMyAdmin/ /usr/local/www/phpMyAdmin