FreeBSD – Define or add (extra) nameservers

In FreeBSD there is a file named ‘resolv.conf’ where the dns servers are located. If you want to add an extra DNS server you have to edit this file. Log in with root. # ee /etc/resolv.conf You will probably see something like: domain yourdomain.local nameserver 192.168.1.1 To add an extra nameserver, all you have to […]

Read More »

Ports upgrade / update FreeBSD

To update the ports collection in FreeBSD you need to execute the following commands” If you have never used ‘portsnap’ before type: # portsnap fetch The ports collection will now be downloaded. # portsnap extract The collection is being extracted. To update the collection type: # portsnap update Thats it!

Read More »

FreeBSD / Unix – scritp doenst work as cronjob.

When you’ve created a script and you want to ‘run’ it for example every 5minutes on your webserver you can create an cronjob. But when the cronjob should launch your script, nothing happens and when you run it manually on the server it does work. There is a simple solution for this. Cron can only […]

Read More »

FreeBSD – Lost MySQL Password / restore mysql password / reset mysql password

If you lost / forgot your MySQL password you can restore it by connecting to the host with SSH. Next you add the following line to you /etc/rc.conf. mysql_args=”–skip-grant-tables –skip-networking” Then restart MySQL # /usr/local/etc/rc.d/mysql-server restart Connect with MySQL # mysql -u root mysql Then type the below command: UPDATE mysql.user SET Password=PASSWORD(‘new password’) WHERE […]

Read More »