Ubuntu 16.04安装Asterisk-13.7.5方法及获取下载链接求助
Hey there! I’ve walked through this process plenty of times, so let’s break down how to get Asterisk 13.7.5 up and running on your Ubuntu 16.04 system, including how to grab the source package you asked about.
Step 1: Update Your System
First, always start with updating your package lists and upgrading existing packages to avoid dependency conflicts:
sudo apt update && sudo apt upgrade -y
Step 2: Install Required Build Dependencies
Asterisk needs a handful of libraries and tools to compile successfully. Install them all with this command:
sudo apt install -y build-essential libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev uuid-dev libjansson-dev
Step 3: Download Asterisk 13.7.5 Source
You can directly pull the source tarball from Asterisk’s official archives using wget in your terminal—no need to navigate external sites manually:
wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13.7.5.tar.gz
Once downloaded, extract the archive and move into the source directory:
tar xvf asterisk-13.7.5.tar.gz cd asterisk-13.7.5
Step 4: Configure the Build
Run the configuration script to set up Asterisk with default settings (you can customize this later if needed):
./configure --prefix=/usr/local/asterisk
If you see errors about missing dependencies here, go back to Step 2 and install any missing packages the script mentions.
Step 5: Compile and Install
Now compile the source code—this might take a few minutes depending on your system’s resources:
make
Once compilation completes, install Asterisk to your system:
sudo make install
For a full setup, install sample configs, systemd service files, and logrotate rules:
sudo make samples sudo make config sudo make install-logrotate
Step 6: Set Up a Dedicated Asterisk User
For security, create a dedicated user to run Asterisk instead of using root:
sudo useradd -m asterisk sudo chown -R asterisk:asterisk /usr/local/asterisk sudo chmod -R 755 /usr/local/asterisk
Step 7: Start and Enable the Asterisk Service
Enable Asterisk to start automatically on boot:
sudo systemctl enable asterisk
Start the service right away:
sudo systemctl start asterisk
Verify everything’s running smoothly:
sudo systemctl status asterisk
You can also connect to the Asterisk CLI to confirm functionality:
asterisk -rvv
Quick Troubleshooting Notes
- If compilation fails, double-check that all dependencies from Step 2 are installed. Some Ubuntu 16.04 systems might need additional packages like
libedit-dev—if the config script mentions it, install it withsudo apt install libedit-dev. - If the service won’t start, check the logs at
/var/log/asterisk/messagesfor detailed error messages. - Ensure you have at least 2GB of free disk space for the build process—Asterisk’s source and compiled files take up a fair amount of space.
内容的提问来源于stack exchange,提问作者Nura Girls




