Installation problems [Ubuntu 13.04, FreePBX 2.11.0rc1]

Hi guys,

I am trying to install FreePBX on my system, using thw following guide for Ubuntu 12.04:

There have been some issues I was able to resolve by myself, so the commands I have used are a bit different than the tutorial.

I have used this:


sudo apt-get -y -q update
sudo apt-get -y -q upgrade

sudo apt-get -y -q install openssh-server apache2 mysql-server mysql-client bison flex php5 php5-curl php5-mysql
php-pear php-db php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev
libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool git subversion uuid uuid-dev libiksemel3 dahdi
libpri1.4 asterisk
sudo apt-get -y -q clean
sudo apt-get -y -q autoclean

sudo wget
sudo tar -xf freepbx-2.11.0rc1.tar.gz
sudo mv -v -t /usr/src freepbx-2.11.0rc1
sudo rm -rf freepbx-2.11.0rc1.tar.gz

sudo adduser asterisk --disabled-password --no-create-home --gecos "Asterisk User"
sudo chown asterisk. /var/run/asterisk
sudo chown -R asterisk. /etc/asterisk
sudo chown -R asterisk. /var/lib/asterisk
sudo chown -R asterisk. /var/log/asterisk
sudo chown -R asterisk. /var/spool/asterisk
sudo chown -R asterisk. /usr/lib/asterisk
sudo mkdir /var/www/html
sudo chown -R asterisk. /var/www
sudo mkdir -p /etc/asterisk/astrundir
sudo chown -R asterisk. /etc/asterisk/astrundir

sudo sed -i ‘s/(^upload_max_filesize = )./\120M/’ /etc/php5/apache2/php.ini
sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
sudo sed -i 's/^(User\Group).
/\1 asterisk/’ /etc/apache2/apache2.conf
service apache2 restart

mysqladmin -u root create asterisk -p
mysqladmin -u root create asteriskcdrdb -p
mysql -D asterisk -u root -p < /usr/src/freepbx-2.11.0rc1/SQL/newinstall.sql
mysql -D asteriskcdrdb -u root -p < /usr/src/freepbx-2.11.0rc1/SQL/cdr_mysql_table.sql
mysql -u root -p -e "GRANT ALL PRIVILEGES ON asterisk.* TO [email protected] IDENTIFIED BY ‘${ASTERISK_DB_PW}’;"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO [email protected] IDENTIFIED BY ‘${ASTERISK_DB_PW}’;"
mysql -u root -p -e "flush privileges;"
mysqladmin -u root -p password “${MYSQL_ROOT_PW}”

sudo cp /usr/src/freepbx-2.11.0rc1/amp_conf/bin/* /var/lib/asterisk/bin
sudo cp /usr/src/freepbx-2.11.0rc1/amp_conf/sbin/* /usr/local/sbin
sudo /usr/src/freepbx-2.11.0rc1/start_asterisk start
sudo /usr/src/freepbx-2.11.0rc1/install_amp --username=asteriskuser --password=$ASTERISK_DB_PW --webroot /var/www/freepbx
sudo /usr/src/freepbx-2.11.0rc1/amp_conf/sbin/amportal a ma installall
sudo /usr/src/freepbx-2.11.0rc1/amp_conf/sbin/amportal a reload

sudo ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
sudo /usr/src/freepbx-2.11.0rc1/amp_conf/sbin/amportal start

It worked all fine until the following line:
sudo /usr/src/freepbx-2.11.0rc1/amp_conf/sbin/amportal a ma installall

There I get the following error message:

astrundir in ‘/etc/asterisk’ is set to but the directory does not exists. Attempting to create it with: ‘mkdir -p’

mkdir: missing parameter
Attempt to execute ‘mkdir -p’ failed with an exit code of 1
You must create this directory and then try again.

When I look at my asterisk.conf, it says that my astrundir is set to /var/run/asterisk. It seems to not read it correctly or maybe look on a different config file?

I also tried to remove the (!) after [directories] in the first line of the config, but that did not change anything, too.

Thanks for your help.

Almost forgot:

As you can see from the shell commands above, I installed asterisk with apt-get. The version displayed by ubuntu is 1:1.8.13~dfsg-1ubuntu2.