howtobsd# php -v
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP 5.3.3 with Suhosin-Patch (cli) (built: Sep 25 2010 23:22:23) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
To avoid this error we just need open ini file where loading module xdebag.so.
In FreeBSD it is:
howtobsd# vim /usr/local/etc/php/extensions.ini
and change string:
extension=xdebug.so
to:
zend_extension_ts=xdebug.so
That is all, problem is solved.
Posted on April 17th, 2011 by admin
Filed under: Solutions | 3 Comments »
Doesn’t start VirtualBox
ERROR:NS_ERROR_FACTORY_NOT_REGISTERED (0×80040154)
Solution: Delete folder: /tmp/.vbox-username-ipc/
Posted on April 1st, 2011 by admin
Filed under: Solutions | 8 Comments »
Too difficult to imagine Unix OS’s administrator which does not use ssh protocol (Secure SHell).
In this how-to I would like to show how easy to use SSH Public Key Based Authentication.
The most useful benefits for me in key authentication:
- ssh authentication without password
- ssh login from shell scripts
- security
There are just two steps to use ssh key authentication:
1. Generate SSH Keys on client.
2. Add public key to server.
1.Generating keys.
From user (which will run script or login on server) do command:
#ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/slim/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/slim/.ssh/id_rsa.
Your public key has been saved in /home/slim/.ssh/id_rsa.pub.
The key fingerprint is:
6c:62:f7:11:93:2d:47:90:66:80:88:43:c4:e3:95:7e slim@slim
The key's randomart image is:
+--[ RSA 2048]----+
| +o. o ....o. |
| = + . ++ |
| . = o= o |
| . . E. = |
| .o S . |
| . + . . |
| . |
| |
| |
+-----------------+
As result – 2 files in a ~/.ssh directory:
id_rsa – private key
id_rsa.pub – public key
2. Add public key on server.
By default public keys located in /home/user/.ssh/authorized_keys file.
So, you need to load id_rsa.pub file on server and concatenate(on server) it to authorized_keys file:
#cat id_rsa.pub >> /home/user/.ssh/authorized_keys
This will create authorized_keys if it does not exist.
That is all! Now you can try from client:
#ssh username@servername
How to use several keys for different servers read in next post.
Posted on March 26th, 2011 by admin
Filed under: Software | Comments Off
For change hostname to ‘howtobsd.com’ you should edit /etc/rc.conf:
hostname="howtobsd.com"
You also can change hostname without reboot by command:
#hostname howtobsd.com
but after reboot i will return on value in rc.conf
check current hostname:
hostname
Posted on March 26th, 2011 by admin
Filed under: Tips | Comments Off
If you want to activate logging of mysql queries, add in your my.cnf (by default it is /var/db/mysql/my.cnf)
in [mysqld] section:
log=/var/log/mysql.log
create log file:
#touch /var/log/mysql.log
#chmod 666 /var/log/mysql.log
and restart mysql-server:
#/usr/local/etc/rc.d/mysql-server restart
(it can be different on you server)
That is all.
PS: I don’t recommend you use it on hight loaded servers permanently. Use it only for debugging.
Posted on March 10th, 2011 by admin
Filed under: Tips | Comments Off
Change timezone in FreeBSD to GTM -0500:
#cp /usr/share/zoneinfo/America/New_York /etc/localtime
Check current GMT zone in FreeBSD you can by command:
#date +%z
Posted on March 4th, 2011 by admin
Filed under: Tips | 2 Comments »
Everybody who worked with svn knows fine svn client for windows TortoiseSVN. But what are we have similar for the linux (especially for FreeBSD).
“True”-developers will say “I use console svn client and don’t want anything else” and will be right. Although many users wants user-friendly interface.
So, today I want introduce you svn client for FreeBSD – RapidSVN.
Install:
#cd /usr/ports/devel/rapidsvn
#make install clean
after that checkout your work copy from repository and enjoy.
I very need the suitable diff in svn client. RapidSVN doesn’t include diff tool but we can choose external program.
install diff tool for FreeBSD – dirdiff:
#cd /usr/ports/sysutils/dirdiff
#make install clean
and put location in settings of Rapidsvn(Settings->Programs->Diff Tool ):
/usr/local/bin/dirdiff
If you know any better svn client for FreeBSD I will glad to learn it of from yours comments.
Posted on December 26th, 2010 by admin
Filed under: Software | Comments Off
The problem with automount flash drives on FreeBSD 8.1 and KDE4:
An error occurred while accessing ‘My_flash’, the system responded: org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.storage.mount-removable no <– (action, result)
or
Could not mount the following device:
My_flash
Solution:
add to PolicyKit config file(/usr/local/etc/PolicyKit/PolicyKit.conf) your user:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration
1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
<!-- See the manual page PolicyKit.conf(5) for file format -->
<config version="0.1">
<match user="root">
<return result="yes"/>
</match>
<define_admin_auth group="wheel"/>
<!-- You should add the following strings -->
<match action="org.freedesktop.hal.storage.mount-removable">
<match user="slim">
<return result="yes"/>
</match>
</match>
</config>
where slim – your user.
and finally restart hald:
howtobsd#/usr/local/etc/rc.d/hald restart
Posted on November 28th, 2010 by admin
Filed under: Solutions | 1 Comment »
The problem with installing skype on FreeBSD:
/usr/ports/net/skype12/ – installing, but doesn’t work.
/usr/ports/net/skype/ - doesn’t installing:
#cd /usr/ports/net/skype/
#make install clean
===> skype-2.0.0.72,1 is marked as broken: This is the last version of skype that works on FreeBSD, but the distfile is no longer available from the vendor, and won't be in the future. We are working on alternative solutions..
*** Error code 1
Stop in /usr/ports/net/skype.
Solution:
Download file skype_static-2.0.0.72-oss.tar.bz2 into /usr/ports/distrfiles
comment string 26 in the /usr/ports/net/skype/Makefile:
“BROKEN= This is the last version of skype that works on FreeBSD, but the distfile is no longer available from the vendor, and won’t be in the future. We are working on alternative solutions.”
after that try make it again:
#cd /usr/ports/net/skype/
#make install clean
#rehash
#skype
Congratulations!
Posted on November 3rd, 2010 by admin
Filed under: Software | 8 Comments »
Identify installed wi-fi adapter:
hostobsd#pciconf -lv |grep Wireless
device = 'Intel 3945ABG Wireless LAN controller (10208086)'
find device in Hardware Notes:
[i386, amd64] Intel PRO/Wireless 3945ABG MiniPCI network adapters ( wpi(4) driver)
So, wpi is driver for my wi-fi device.
Following the instruction wpi(4), going to configure the kernel with options:
device wpi
device wpifw
device pci
device wlan
device wlan_amrr
device firmware
You also can load driver without kernel configuring by adding in /boot/loader.conf
if_wpi_load=”YES”
add in /etc/rc.conf:
wlans_wpi0=wlan0
ifconfig_wlan0=”WPA DHCP”
create configuration file for our wireless connection :
howtobsd#touch /etc/wpa_supplicant.conf
howtobsd#vim /etc/wpa_supplicant.conf
and add there ssid and password(for WPA-PSK):
network={
ssid=”yourssid”
psk=”yourspass”
}
and finally reboot
Posted on October 23rd, 2010 by admin
Filed under: Hardware | Comments Off