Posts aus der Kategorie ‘OS X’

VMware Fusion: Fehlender Netzwerkadapter

Wird ein VM Image kopiert, gibt VMware dem Netzwerkadapter automatisch eine neue MAC Adresse, um Kollisionen zu vermeiden. Allerdings identifiziert Ubuntu Netzwerkadapter über die MAC Adresse, sodass z.B. eth0 nach dem kopieren nicht mehr verfügbar ist, da der alte Adapter nun fehlt.

Um das Problem zu beheben lässt man sich im Gast System via ifconfig -a alle Netzwerkkarten anzeigen. Hier sollte auch eth1 aufgeführt sein.

eth1 Link encap:Ethernet HWaddr 00:0c:29:9c:f0:d1
inet addr:192.168.1.18 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe9c:f0d1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5621 errors:0 dropped:0 overruns:0 frame:0
TX packets:591 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1384390 (1.3 MB) TX bytes:49955 (49.9 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Nun muss man in der Datei /etc/udev/rules.d/70-persistent-net.rules die MAC Adresse von eth0 durch die von eth1 ersetzen. Der Adapter eth1 kann aus der Datei gelöscht werden.

Am Ende könnte das dann z.B. so aus sehen

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:9c:f0:d1", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Nach einem Reboot sollte das Netzwerk wieder laufen.

How to enable PHP and MySQL on OS X Snow Leopard

Since Snow Leopard ships with Apache and PHP preinstalled, there is no need to install third party tools like MAMP to run a local development enviroment. All you have to do is enable PHP in the httpd.conf and install MySQL.

To do so open a terminal window and edit the Apache config file located at /etc/apache2/httpd.conf

Uncomment the line

#LoadModule php5_module        libexec/apache2/libphp5.so

(should be on line 116) by removing the leading #

Restart the webserver with “apachectl restart”

Your apache should now run with php enabled. If you want to check if everything works so far, you can place a php file inside your web directory containing

<?php
  phpinfo();

The result should look something like this

Now that you have PHP running, you most likely want MySQL as well. You can download MySQL here http://dev.mysql.com/downloads/mysql/
Simply run the installation package and make sure to install the MySQL.prefPane as well.
Now you can start MySQL in System Preferences > MySQL

By default the MySQL socket is located in /tmp but PHP is looking for it in /var/mysql/

We can change this by editing the php.ini file.

But first we have to copy the default php.ini.

“sudo cp /etc/php.ini.default /etc/php.ini”

Now open /etc/php.ini and edit line 1216.

It should state:

mysql.default_socket = /tmp/mysql.sock

Save the file and restart Apache again

Finaly, test if PHP can connect to your MySQL server by creating a file in your web directory conatining

<?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
printf("MySQL server version: %s\n", mysql_get_server_info());
<?php$link = mysql_connect('localhost', 'root', '');if (!$link) {    die('Could not connect: ' . mysql_error());}printf("MySQL server version: %s\n", mysql_get_server_info());

If everything went well the result should look like this:

Kurz notiert: Photoshop CS5 grauen Hintergrund aktivieren

Unter OSX hat Photoshop standardmäßig keinen Rahmen sondern besteht nur aus einer Menüleiste und Werkzeugen etc.
Wer mit dem grauen Hintergrund besser zurechtkommt kann dies unter Fenster Anwendungsrahmen aktivieren

Kontakt: mail@gamgee.de