Homebrew Restart Mysql

There are several ways to install ejabberd:

  • Quick Start with Binary Installers – recommended when starting development on localhost
  • Install from Source Code – recommended for advanced users and developers
  • Install with Operating System specific packages – recommended for sysops

Sep 05, 2017 If your program expects the MySQL server to be up and running, you should add. When you configure Restart=always as we did. So chances are that your server is ready to host your homebrew. 使用图形界面管理工具Navicat for MySQL连接Mysql数据库时提示错误:Can't connect to MySQL server (10060)问题原因:导致些问题可能有以下几个原因:1、网络不通;2、服务未启动;3、防火墙端口未开放;解决方法:启动服务:service mysqld start;经过分析,我遇到的这个问题是防火墙导致的!. If it's a Windows system, you can find it in the MySQL installation directory, usually something like C: Program Files MySQL MySQL Server 5.5 and the filename will be my.ini. Bind-address = 127.0.0.1 to. #bind-address = 127.0.0.1 And restart the MySQL server (Unix/OSX, and Windows) for the changes to take effect. MySQL PostgreSQL. Minishift openshift restart minishift openshift service minishift openshift service list. 使用图形界面管理工具Navicat for MySQL连接Mysql数据库时提示错误:Can't connect to MySQL server (10060)问题原因:导致些问题可能有以下几个原因:1、网络不通;2、服务未启动;3、防火墙端口未开放;解决方法:启动服务:service mysqld start;经过分析,我遇到的这个问题是防火墙导致的!.

Additionally, this section covers other topics:

  • Starting ejabberd – manual and automatically
  • Post-install operations – register users, admin, and setting database

Quick Start

The Binary Installer will deploy and configure a full featuredejabberd server and does not require any extra dependencies. Itincludes a stripped down version of Erlang. As such, when usingejabberd installer, you do not need to install Erlang separately.

These tutorials assume installation on localhost for development purposes.In this document, when mentioning ejabberd-YY.MM, we assume YY.MMis the release number, for example 18.01. Also note that the installerscripts support many options useful for production or unattended, scripted installation.You can read more on installer options on unattended installation.

Install on Windows

  1. Go to ejabberd official download page on ProcessOne website.
  2. Download the installer for Windows 7 / 2008 64-bits or newer: 'Windows Installer'.
  3. Double-click the ejabberd-YY.MM-installer.exe to start the installer.
  4. On the Windows Security dialog, Allow this application to install.
  5. Select the installer language you prefer, then click 'Next' to go through necessary installation steps:
    • accepting the license agreement,
    • selecting the installation directory,
    • defining the XMPP domain: by default, it's set to the name of your computer on the local network. if unsure, type localhost here,
    • setting the administrator username,
    • setting the administrator password,
    • selecting if this ejabberd instance will be part of a cluster: for simple local install, just select 'No',
    • start the installation,
    • when asked by the Windows Firewall prompt, you can both times click 'Cancel',
  6. After successful install, you should see on your Desktop two new shortcuts: 'Start ejabberd' and 'Stop ejabberd'. To start or stop ejabberd, righ-click on each shortcut and select 'Run as Administrator', then confirm the Windows dialog by clicking 'Yes'.
  7. After starting ejabberd, a welcome screen should open in your default browser. You can go to the web dashboard at http://localhost:5280/admin/ and fill the username field with the full account JID, for example [email protected] (or [email protected] as above). Then fill the password field with that account's password. The next step is to get to know how to configure ejabberd.
  8. If something goes wrong during the installation, and you would like to start from scratch, you will find the ejabberd uninstall.exe in the directory where it was installed. By default, that's Program Filesejabberd-YY.MMuninstall.app. The uninstaller will stop your ejabberd server and remove all its files. Log files may be left behind, so to completely remove ejabberd, just delete its main folder.

Install on Linux

  1. Go to ejabberd official download page on ProcessOne website.
  2. Download the 'Linux x86 64-bits Installer'.
  3. Right-click on the downloaded file and select 'Properties'. Click on the 'Permissions' tab and tick the box that says 'Allow executing file as program'.
  4. Now you are able to double-click the file to execute it and start the installer.You can also set the installer as executable and start it using the command line:

  5. Select the installer language you prefer, then click 'Forward' to go through necessary installation steps:

    • accepting the license agreement,
    • selecting the installation directory,
    • defining the XMPP domain: by default, it's set to the name of your computer on the local network. if unsure, type localhost here,
    • setting the administrator username,
    • setting the administrator password,
    • selecting if this ejabberd instance will be part of a cluster: for simple local install, just select 'No',
    • start the installation,
  6. After successful installation, let's launch ejabberd using the Terminal. In the command line, go to the installation folder and execute ./bin/ejabberdctl live. This will start ejabberd in an interactive live mode with some useful messages printed in the Terminal.

  7. Now you can go to the web dashboard at http://localhost:5280/admin/ and fill the username field with the full account JID, for example [email protected] (or [email protected] as above). Then fill the password field with that account's password. The next step is to get to know how to configure ejabberd.

  8. If something goes wrong during the installation, and you would like to start from scratch, you will find the ejabberd uninstall in the directory where it was installed.

Install on macOS

Using Binary Installer

Before you begin installing ejabberd, make sure your Mac allows apps from identified developers. To do this, go to your Mac Preferences, Security & Privacy and select 'Allow apps downloaded from: App Store and identified developers'. Then you can download ejabberd and proceed with installation:

  1. Go to ejabberd official download page on ProcessOne website.
  2. Download the 'Mac OS X Intel Installer'. If your system is older than the minimal requirements specified, search the ejabberd Download Archive for an appropriate version.
  3. Double-click the ejabberd-YY.MM-osx-installer.app.zip to unpack the archive.
  4. Double-click the ejabberd-YY.MM-osx-installer.app to start the installer.
  5. Confirm the security dialog by clicking 'Open'.
  6. If you see a dialog titled 'App is not optimized for your Mac' you can safely discard it – it only applies to the installer, not ejabberd itself.
  7. Select the installer language you prefer, then click 'Next' to go through necessary installation steps:
    • accepting the license agreement,
    • selecting the installation directory,
    • defining the XMPP domain: by default, it's set to the name of your computer on the local network. if unsure, type localhost here,
    • setting the administrator username,
    • setting the administrator password,
    • selecting if this ejabberd instance will be part of a cluster: for simple local install, just select 'No',
    • start the installation,
  8. Once the installation script finishes, it attempts to start ejabberd. You may see a prompt asking to allow incoming connections to beam.smp. Unless you allow, the installation cannot finish successfully.
  9. If something goes wrong during the installation, and you would like to start from scratch, you will find the ejabberd uninstall.app in the directory where it was installed. By default, that's /Apllications/ejabberd-YY.MM/uninstall.app. The uninstaller will stop your ejabberd server and remove all its files. Log files are left behind, so to completely remove ejabberd, just delete its main folder.

Binary Installers of ejabberd prior to version 18.01 did not have an Apple Developer signature.If macOS complains when you try to install ejabberd older than 18.01 with binary installer withmessage 'ejabberd-installer is damaged and can’t be opened' – then you need to temporarilydisable gatekeeper to be able to install ejabberd:

Using Homebrew

Homebrew is a package manager for macOS that aims to port the many Unix & Linux software that is not easily available or compatible. Homebrew installation is simple and the instruction is available on its website.

  1. Once you have Homebrew installed, open Terminal. Run brew install ejabberd. This should install the latest or at most the one-before-latest version of ejabberd. The installation directory should be reported at the end of this process, but usually the main executable is stored at /usr/local/sbin/ejabberdctl.
  2. Start your ejabberd by running /usr/local/sbin/ejabberdctl live. This interactive mode prints useful messages in the Terminal. The default domain used by Homebrew's ejabberd is localhost.
  3. Create an admin account by running /usr/local/sbin/ejabberdctl register admin localhost password. This creates an account [email protected] with the specified password.
  4. Now you can go to the web dashboard at http://localhost:5280/admin/ and fill the username field with the full account JID, for example [email protected], then fill the password field with that account's password. Without configuration there's not much to see here, therefore the next step is to get to know how to configure ejabberd.

Install from Source Code

The canonical form for distribution of ejabberd stable releases isthe source code package. Compiling ejabberd from source code isquite easy in *nix systems, as long as your system have all thedependencies.

Requirements

To compile ejabberd on a ‘Unix-like’ operating system, you need:

  • GNU Make
  • GCC
  • Libexpat 1.95 or higher
  • Libyaml 0.1.4 or higher
  • Erlang/OTP 19.3 or higher. We recommend using Erlang OTP 21.2.
  • OpenSSL 1.0.0 or higher, for STARTTLS, SASL and SSL encryption.
  • Zlib 1.2.3 or higher, for Stream Compression support (XEP-0138). Optional.
  • PAM library. Optional. For Pluggable Authentication Modules (PAM). See PAM Authentication section.
  • ImageMagick’s Convert program and Ghostscript fonts. Optional. For CAPTCHA challenges. See section CAPTCHA.

Downloading

Released versions of ejabberd are available on ProcessOneejabberd official download page.

Alternatively, the latest development source code can be retrievedfrom the Git repository using the commands:

Compilation

To compile ejabberd execute the commands:

This tells the configuration to prepare the installed programto run with a user called ejabberd, so please create that useror tell to use another local user.It isn't recommended to run ejabberd with root user.

Homebrew restart mysql command

Note: To build ejabberd, you will need Internet access, as dependencies will be downloaded depending on the selected options.

The build configuration script allows several options. To get the fulllist run the command:

Options

There are many options to modify the default compilation behaviour:

  • -–bindir=/: Specify the path to the user executables(where epmd and iex are available).

  • -–prefix=/: Specify the path prefix where the files will becopied when running the make install command.

  • -–enable-user[=USER]: Allow this normal system user to executethe ejabberdctl script (see section ejabberdctl), read theconfiguration files, read and write in the spool directory, read andwrite in the log directory. The account user and group must exist inthe machine before running make install. This account doesn't needan explicit HOME directory, because /var/lib/ejabberd/ will beused by default.

  • -–enable-group[=GROUP]: Similar to the previous option, but forsystem groups.

  • –-enable-all: Enable many of the database and dependenciesoptions described here, this is useful for Dialyzer checks:--enable-debug --enable-elixir --enable-mysql --enable-odbc--enable-pam --enable-pgsql --enable-redis --enable-sip--enable-sqlite --enable-stun --enable-tools --enable-zlib

  • –-disable-debug: Compile without +debug_info.

  • –-enable-elixir: Build ejabberd with Elixir extension support.

  • –-disable-erlang-version-check: Don't check Erlang/OTP version.

  • -–enable-full-xml: Use XML features in XMPP stream (ex:CDATA). This requires XML compliant clients).

  • –-enable-hipe: Compile natively with HiPE. This is anexperimental feature, and not recommended.

  • -–enable-lager: Use lager Erlang logging tool instead ofstandard error logger.

  • --enable-latest-deps: Makes rebar use latest versions ofdependencies developed alongside ejabberd instead of versionspecified in rebar.config. Should be only used when developingejabberd.

  • -–enable-mssql: Enable Microsoft SQL Server support, thisoption requires --enable-odbc (see [Supported storages][18]).

  • -–enable-mysql: Enable MySQL support (see [Supported storages][18]).

  • -–enable-new-sql-schema: Use new SQL schema.

  • -–enable-odbc: Enable pure ODBC support.

  • -–enable-pam: Enable the PAM authentication method (see PAM Authentication section).

  • -–enable-pgsql: Enable PostgreSQL support (see [Supported storages][18]).

  • -–enable-redis: Enable Redis support to use for externalsession storage.

  • -–enable-roster-gateway-workaround: Turn on workaround forprocessing gateway subscriptions.

  • -–enable-sip: Enable SIP support.

  • -–enable-sqlite: Enable SQLite support (see [Supported storages][18]).

  • -–disable-stun: Disable STUN/TURN support.

  • --enable-system-deps: Makes rebar use locally installeddependencies instead of downloading them.

  • -–enable-tools: Enable the use of development tools.

  • -–disable-zlib: Disable Stream Compression (XEP-0138) using zlib.

Installation

To install ejabberd in the destination directories, run the command make install.

Note that you probably need administrative privileges in the system toinstall ejabberd.

Server

Homebrew Restart Mysql Server

The files and directories created are, by default:

  • /etc/ejabberd/: Configuration directory:

    • ejabberd.yml: ejabberd configuration file
    • ejabberdctl.cfg: Configuration file of the administration script
    • inetrc: Network DNS configuration file for Erlang
  • /lib/ejabberd/:

    • ebin/: Erlang binary files (*.beam)
    • include/: Erlang header files (*.hrl)
    • priv/: Additional files required at runtime
    • bin/: Executable programs
    • lib/: Binary system libraries (*.so)
    • msgs/: Translation files (*.msgs)
  • /sbin/ejabberdctl: Administration script (see section ejabberdctl).

  • /share/doc/ejabberd/: Documentation of ejabberd

  • /var/lib/ejabberd/: Spool directory:

    • .erlang.cookie: Erlang cookie file (see section cookie)
    • acl.DCD, ..: Mnesia database spool files (*.DCD, *.DCL, *.DAT)
  • /var/log/ejabberd/: Log directory (see section [logfiles]):

    • ejabberd.log: ejabberd service log
    • erlang.log: Erlang/OTP system log

Specific notes

BSD

The command to compile ejabberd in BSD systems is gmake.

macOS

If compiling from sources on macOS, you must configure ejabberd to use custom OpenSSL, Yaml, iconv.The best approach is to use Homebrew to install your dependencies, thenexports your custom path to let configure and make be aware of them.

Install with OS specific packages

Some Operating Systems provide a specific ejabberd package adaptedto the system architecture and libraries. It usually also checksdependencies and performs basic configuration tasks like creating theinitial administrator account. Some examples are Debian andGentoo. Consult the resources provided by your Operating System formore information.

ProcessOne now provides RPM and DEB all in one packages as well, sinceejabberd version 15.06. This is self-sufficient packages alsocontaining a minimal Erlang distribution. It ensures that it does notinterfere with your existing Erlang version. This is also a good wayto make sure ejabberd will run with the latest Erlang version. You candownload the packages from theejabberd official download page.

Starting ejabberd

ejabberd can be started manually at any time, or automatically bythe operating system at system boot time.

To start and stop ejabberd manually, use the desktop shortcutscreated by the installer. If the machine doesn't have a graphicalsystem, use the scripts ’start’ and ’stop’ in the ’bin’ directorywhere ejabberd is installed.

You can also use the ejabberdctl command line administration script tostart and stop ejabberd. If you provided the configure option–enable-user=USER (see compilation options), you can execute ejabberdctlwith either that system account or root.

Usage example:

If ejabberd doesn't start correctly and a crash dump file isgenerated, there was a severe problem. You can try starting ejabberdwith the script bin/live.bat in Windows, or with the commandbin/ejabberdctl live in other Operating Systems. This way you seethe error message provided by Erlang and can identify what is exactlythe problem.

The ejabberdctl administration script is included in the bindirectory. Please refer to the sectionejabberdctlfor detailsabout ejabberdctl, and configurable options to fine tune the Erlangruntime system.

Autostart on Linux

On a *nix system, create a system user called 'ejabberd', give it write accessto the directories database/ and logs/, and set that as home.

If you want ejabberd to be started as daemon at boot time with that user,copy ejabberd.init from the bin directory to something like /etc/init.d/ejabberd.Then you can call /etc/inid.d/ejabberd start to start the server.

Or if you have a systemd distribution:

  1. copy ejabberd.service to /etc/systemd/system/
  2. run systemctl daemon-reload
  3. run systemctl enable ejabberd.service
  4. To start the server, you can run systemctl start ejabberd

When ejabberd is started, the processes that are started in the systemare beam or beam.smp, and also epmd. For more informationregarding epmd consult the section relating toepmd.

Autostart on Windows

The Windows installer also adds ejabberd as a system service, and ashortcut to a debug console for experienced administrators. If youwant ejabberd to be started automatically at boot time, go to theWindows service settings and set ejabberd to be automaticallystarted. Note that the Windows service is a feature still indevelopment, and for example it doesn't read the fileejabberdctl.cfg.

On Microsoft Windows, the Erlang processes for ejabberd are namederl.exe and epmd.exe.

Homebrew Restart Mysql Server

Post-install operations

Homebrew Restart Mysql App

Administration account

ejabberd binary installer prompts you for an admin account, so in that case,you can probably skip this step.

However, if you use another way of installing ejabberd you may need to create anadmin XMPP account.

Restart Mysql In Windows

You need an XMPP account with administrative privileges toenter the ejabberd Web Admin. Here are the steps to create it:

  1. Register an XMPP account on your ejabberd server, for example[email protected]. There are two ways to register an XMPPaccount:

    1. Using an XMPP client and In-Band Registration (see section (/admin/configuration/modules/#mod-register)).

    2. Using ejabberdctl (see section ejabberdctl):

  2. Edit the ejabberd configuration file to give administrationrights to the XMPP account you created:

    You can grant administrative privileges to many XMPP accounts, andalso to accounts in other XMPP servers.

  3. Restart ejabberd to load the new configuration.

  4. Open the Web Admin (usually http://localhost:5280/admin/) in your favouritebrowser. Make sure to enter the full JID as username (in thisexample: [email protected]). The reason that you also need toenter the suffix is due to ejabberd’s virtual hosting support. You canmanage several XMPP domains on a single instance.

Backend database

By default, ejabberd uses its own database to store runtime data. In many casesyou may need to let ejabberd use an external SQL database.Supported SQL backends are MySQL, PostgreSQL, SQlite, MS SQL. Upgrade from snow leopard to el capitan.

When using external database backend, ejabberd does not create schema and tablesby itself. You must create the schema before you run ejabberd.

  • If installing ejabberd from sources, you will find sql script for your backendin the installation directory. By default: /usr/local/lib/ejabberd/priv/sql

  • If installing ejabberd from Process-One installer, the init scripts are locatedin the ejabberd's installation path under <base>/lib/ejabberd*/priv/sql

See ejabberd SQL Database Schemafor details on database schemas.