I have downloaded a dmg file called BaiduYun_2.2.0.dmg, which, on double-click, shows the license agreement window straight away, instead of showing an installation package or an application that can be dragged to the Applications folder. I have never seen any installation on Mac OS X like this before. Is there an autorun setting anywhere that I can disable this behaviour? Additionally, it does not show up as a mounted device on Finder windows.
MacOS – How to disable dmg autorun
dmgfinderinstallmacos
Related Solutions
DropDMG
I use and recommend DropDMG since it has many features that make it useful for sharing software such as scripting the building of a DMG file directly from my CI server when I promote a build using the included CLI tool dropdmg
.
Above: Many options for configuring a DMG file, including layouts and showing a license when opening the DMG.
Preface:
It's no problem to install MAMP, MAMP Pro or Bitnami MAMP Stack on OS X Server (Yosemite or older). All of them are self-containing stacks and get installed to the /Applications folder. They don't interfere with any original software like Oracle MySQL/PostgreSQL/OS X Server postgres provided you don't use their distinctive ports. All the MAMP stacks are easy to configure to reserve other ports (e.g. mysql/http/https etc).
It's not advised to use the OS X Server PostgreSQL for any of your purposes. It may be unnoticed subject of change by Apple. Download and install PostgreSQL and use that one.
Installing Oracle MySQL Community Edition:
Trying to set-up and get EJBCA working on Yosemite I had to install Oracle MySQL recently and it worked flawlessly.
After downloading the installer, open the image and install MySQL with the default settings using your admin account.
The default settings meanwhile install a plist to /Library/LaunchDaemons to provide the recommended way to start-up services at boot time (with launchd). Older versions used to use the /Library/StartupItems folder.
A proper com.oracle.oss.mysql.mysqld.plist file in /Library/LaunchDaemons looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key> <string>com.oracle.oss.mysql.mysqld</string>
<key>ProcessType</key> <string>Interactive</string>
<key>Disabled</key> <false/>
<key>RunAtLoad</key> <true/>
<key>KeepAlive</key> <true/>
<key>SessionCreate</key> <true/>
<key>LaunchOnlyOnce</key> <false/>
<key>UserName</key> <string>_mysql</string>
<key>GroupName</key> <string>_mysql</string>
<key>ExitTimeOut</key> <integer>600</integer>
<key>Program</key> <string>/usr/local/mysql/bin/mysqld</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld</string>
<string>--user=_mysql</string>
<string>--basedir=/usr/local/mysql</string>
<string>--datadir=/usr/local/mysql/data</string>
<string>--plugin-dir=/usr/local/mysql/lib/plugin</string>
<string>--log-error=/usr/local/mysql/data/mysqld.local.err</string>
<string>--pid-file=/usr/local/mysql/data/mysqld.local.pid</string>
<string>--port=3307</string>
</array>
<key>WorkingDirectory</key> <string>/usr/local/mysql</string>
</dict>
</plist>
Until now I never had a problem to get this running right out-of-the-box. If your MySQL doesn't start properly please check the /Library/LaunchDaemon and the /Library/StartupItems folder for older versions of the plist or conflicting start-up-items.
The only thing indeed you have to do manually, is adding the bin folder of mysql to your path.
You have the following options:
add it to /etc/paths to add it to all paths of your users with:
sudo echo "/usr/local/mysql/bin" >> /etc/paths
add it to your user's path by e.g.:
touch ~/.bash_profile echo "export PATH=/usr/local/mysql/bin:$PATH" >> ~/.bash_profile
/usr/local/mysql/bin instead of /usr/local/mysql-5.6.25-osx10.8-x86_64/bin works even after future updates because a link called mysql is created while installation of MySQL linking to the real mysql-version-osversion-proc_bit folder.
use launchd (question & answer here - you may find some other methods there also)
If you prefer to use a GUI to configure, tweak and work with MySQL, download MySQL Workbench. Please consider to use port 3307 instead of 3306 connecting from your local host to localhost. You may set the root password after connecting the first time.
Best Answer
A DMG can be set to display a license agreement before it will allow you to open it. This is normal and nothing to be alarmed about. Once you accept the license agreement, it will mount and open the normal Finder window showing its contents.
See this thread on Cocoa Builder.
There is no way to disable it and nothing is being auto-run.