blog.up-link.ro
2Apr/100

Installing PowerDNS with MySQL backend and PowerAdmin On CentOS

PowerDNS is a MySQL-based DNS server, written in C++ and licensed under the GPL. PowerDNS can be managed through a web interface (PowerAdmin). This guide shows how to install it on CentOS 5.

1. Installing MySQL

# yum -y install mysql mysql-server

2. Enable MySQL on boot and start MySQL server

# chkconfig --levels 235 mysqld on
# service mysqld start

Make sure the MySQL server is running:

# netstat -tap | grep mysql
tcp        0      0 *:mysql                 *:*     LISTEN   28179/mysqld

3. Set password for user root

# mysqladmin -u root password your_password

Print This Post Print This Post
24Mar/100

Apache HTTP Server + PHP 5 + MySQL Installation in FreeBSD

1. Install Apache HTTP Server
Go to apache22 port:
# cd /usr/ports/www/apache22
and type:
# make config

Now you can choose the options from the menu.
# make install clean

To enable apache on boot, add the following line to /etc/rc.conf
apache22_enable="YES"

To start apache http server, type
# /usr/local/etc/rc.d/apache22 start

2. Install PHP 5
Go to php port:
# cd /usr/ports/lang/php5
and type:

Print This Post Print This Post
3Mar/100

MySQL Server Installation in FreeBSD using ports

This guide describes how to install MySQL, a very popular relational database, in FreeBSD.

Please make sure the ports collection is up to date. If not, run the following command:
# portsnap fetch update

Then navigate to the ports folder for MySQL:
# cd /usr/ports/databases/mysql51-server
and run:
# make install clean
This command will download required files from the internet and will install MySQL server.

Once the install is finished, we install the database
# mysql_install_db --user=mysql
and we set up the directory permissions
# chown -R mysql /var/db/mysql/
# chgrp -R mysql /var/db/mysql/

Make sure MySQL server start automatically whenever FreeBSD comes up after reboot.
FreeBSD provide this facility via system configuration information. This file lists which services should be started up at system initial boot time.
The file contains the global system configuration information referenced by the start up scripts and is stored in /etc/rc.conf.

Configure FreeBSD to start MySQL at start up
Open /etc/rc.conf file using a text editor ( I use vi but you can use your preferred editor )
# vi /etc/rc.conf
and append following line which will enable MySQL server automatically after each reboot:
mysql_enable="YES"
Save file and exit to shell prompt.

Starting MySQL server
To Start MySQL server under FreeBSD type following command (use script):
# /usr/local/etc/rc.d/mysql-server.sh start

Note: This will work only if you have mysql_enable="YES" in rc.conf. If you don't, use the following command:
# /usr/local/etc/rc.d/mysql-server.sh forcestart

MySQL Password
By default, MySQL super user account has no password. So it’s important to assign the administrator account password. To change the root password, enter the following command:
mysqladmin -u root password newpass

Replace newpass with your own desired password.

Optionally, copy either my-huge.cnf, my-large.cnf, my-medim.cnf or my-small.cnf  (depending on the usage and utilization of your MySQL server) as my.cnf to /etc/ or /var/db/mysql which will enable you to tweak and change the configuration of server-specific MySQL server options by editing the file.

Print This Post Print This Post