|
Prerequisites: |
FreeBSD (Base + Autoconf, Automake,
Bash and GCC) OpenSSL |
|
Overview: |
|
MySQL – The open source database server of choice
Home:
#
Add
a “mysql” user to your system:
(MySQL
should not need to run as root!)
pw groupadd
mysql
pw useradd mysql -n mysql -G
mysql -s /usr/sbin/nologin
# Download (Notes:
Users behind a Proxy
Server should read this and
users without Internet but have a CDRom read this.)
cd /usr/src
fetch
http://mysql.he.net/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz
# Unzip and Untar and Change Directory
tar xvf mysql-?.?.*.tar.gz
cd mysql-?.?.*
# Configure
./configure --prefix=/usr/local
--mandir=/usr/local/man --infodir=/usr/local/info/
--build=i386-srcbld-freebsd7.0 --localstatedir=/var/db/mysql
--with-mysqld-user=mysql --with-mysqlmanager
--enable-thread-safe-client --enable-assembler --with-tcp-port=3306
--without-debug --with-openssl=/usr/bin/openssl
--with-openssl-includes=/usr/include --with-openssl-libs=/usr/lib
--with-readline --enable-dependency-tracking --enable-local-infile
--with-archive-storage-engine --with-csv-storage-engine
--with-blackhole-storage-engine --with-federated-storage-engine
--with-libwrap --with-mysqlfs --with-low-memory --with-berkeley-db
--with-named-thread-libs=-pthread --with-embedded-server
# Compile
make all
# Install
make install
|
Add users, manually start the server and perform basic tests |
|
# Install the base database
# Perform basic checks
# Set a Password!
# Secure a
production server
# Add a "mysql" user with password
and grant that user permission to connect
# Add a "mysqltop" user with
no password
and no ability to make changes and only usable via localhost for the
"mtop" CLI tool
#
(Optional) Add
some compatibility for Linux applications by creating a symbolic
links
# (Optional) Run some tests before going into production
(optional) |
|
Copy and test the "rc" boot time startup script |
|
# Copy the "rc" startup script
# Clean up
# Perform basic checks using the password
# Edit your /etc/my.cnf |
|
Tune up MySQL to boost performance |
|
# Edit /etc/my.cnf
|