Posts

Showing posts with the label freebsd

rsync: avoid overwriting of files

I was migrating this stuffs we have from an old FreeBSD 4.0 Server to a new FreeBSD 6.0 Server hosted at Verio. I was fumbled and tumbled when I use this rsync tool by migrating the files to our new server. The situation is that, in every directories we have being assigned in a virtual host and its DocumentRoot are having different owners and group assigned. The old server we have is having a version of an old Apache . Now, in order to achieve the exact ruling or permission, rsync is a tool that enables you to preserve ownership as well as its permission of the files/directories that you're going to copy--or shall we use the term "migrate". My mistake was that, migrating with files using rsync is a little bit tricky. Ending a copy like this, for example: rsync -r -e "ssh -l ahkmed" localhost:/home/ahkmed/documents /www/documents is a different story than rsync -r -e "ssh -l ahkmed" localhost:/home/ahkmed/documents/ /www/documents Note the ending has s...

Installing MySQL v6 in FreeBSD

FreeBSD places its packages under /usr/ports/. Now for databases, types this command cd /usr/ports/databases/mysql60-server Then issue make after make, issue make install You can even specify it's configuration options like --prefix by doing "make install --prefix=/usr/local" where it will install the mysql packages. This is applied also to the client package, just follow the steps how the server is being installed. Create /var/db/mysql if that direcotry doesn't exist, then " chown mysql:mysql /var/db/mysql " and " chmod 770 /var/db/mysql " for security. Run the mysql_install_db command which will create default tables that mysql will used on its server process. Run the mysql background process by issuing the command " /usr/local/etc/rc.d/mysql-server start " or perhaps it might be " /usr/local/etc/rc.d/mysql-server.sh start ". I think older BSD preserves the .sh suffix on the start up scripts. Don't forget to provide pass...