Ubuntu12.04 install opensips and basic configuration
Source: Internet
Author: User
General steps for Environment installation: 1. Operating System installation (Omitted) 2. Use SVN to down the code for opensips download
svn co https://opensips.svn.sourceforge.net/svnroot/opensips/branches/1.9 opensips_1_9III. For MySQL installation, see http://blog.csdn.net/ximen1224/article/details/84572224.opensipsinstallation tips: 1. It is best to use the root role during installation, because there are many places to use sudo and Su. If you are used to adding sudo to the command, you can ignore this prompt. 2. up and down buttons: pointer Up, down; left and right keys: Back to the upper directory, enter the lower directory, left-click always can return to the command input interface, then return to the graphical interface input: FG; CTRL-Z: exit to the command interface 1. go to the opensips directory root @ Ubuntu: CD/home/Amaryllis/work/project/opensips/root @ Ubuntu: make menuconfig enter the above command to go to the selection box mode and run the following command: select the MySQL database module installation directory, for example, the red part is the pointer selection, and the blue part is the installation directory of the specified program. The following message is displayed: it is best to specify the installation directory of the program to the public file directory. If the program is tested and put into the user directory, the startup may fail, and a bug may occur. Therefore, you need to save the configuration after the configuration is complete, if the "db_mysql" module is faulty, you need to install apt-Get install libmysqlclient-Dev.
After installation, go to the graphical interface for installation, as shown in figure
The installation page is as follows: the content section indicates that the installation has been completed successfully. Proceed to the next step: Configure. Tip: if the following content appears, congratulations, you have won the prize:
MySQL/MySQL. h: the file or directory does not exist. In this case, you need to install apt-Get install libmysqlclient-Dev to solve this problem. V. opensips file configuration: 1.9 is a bit more difficult to configure than 1.7 or earlier versions, but it still feels safer and more informative than the above versions. 1. modify the configuration file opensipsctlrc root @ Ubuntu: gedit/usr/local/opensips_proxy/etc/opensips/opensipsctlrc. The prompt is: if you are not familiar with vim, use vim. This is not required. This document uses gedit to modify the configuration file. The modification is as follows: # Your sip domain sip_domain = 192.168.99.103 # this parameter. dbengine = MySQL # Database Host dbhost = localhost # Database Name (for Oracle this is TNS name) dbname = opensips # Database read/write user dbrwuser = opensips # password for database read/write user dbrwpw = "opensipsrw" # database super user (for Oracle this is 'scheme- creator 'user) dbrootuser = "root" 2. install database root @ Ubuntu: CD/us R/local/opensips_proxy/sbin/root @ Ubuntu :. /opensipsdbctl create the next step is to create a database, for example, 3. check whether apt-Get install M4 is installed in M4. If not, you know... 4. generate opensips_residential_2013-3-10_22: 52: 46. cfg file root @ Ubuntu: CD/usr/local/opensips_proxy/sbin/root @ Ubuntu :. /osipconfig enter the preceding command to enter the graphical interface. For example, if you select the following items, the pointer prompt item is to generate a configuration file based on the above selection. Next is to modify the file, for example, find the file according to the following directory: root @ Ubuntu: CD/usr/local/opensips_proxy/etc/opensips/root @ Ubuntu: gedit opensips_residential_2013-3-10_22: 52: 46.cfg: after opening, modify the properties. The point to be modified is to modify the address of the signaling link established between TCP and UDP, the IP address on the machine where your Ubuntu is located, and view the command: if ifconfig is used to set the position of the module, the absolute path must be used to specify the path where the image content is braked. If you need to print logs to a separate file for ease of management, you need to modify the following attributes: log_facility = log_local0 to log_facility = log_local1 and then root @ Ubuntu: gedit/etc/rsylog. add the code local1. *-/var/log/opensips at the end of conf. log the last restart log root @ Ubuntu:/etc/init. d/rsyslog restart logs are configured. Next, return to the original configuration file: #### URI module loadmodule "URI. so "modparam (" Uri "," use_uri_table ", 0) modparam (" Uri "," db_url "," MYSQL: // opensips: opensipsrw @ localhost/opensips ") # customize me
Add the red code here. Otherwise, an error will be reported during running. This configuration file has come to an end. 5. set the startup Item: root @ Ubuntu: CD/home/Amaryllis/work/project/opensips/packaging/Debian root @ Ubuntu: CP opensips. init/etc/init. d/opensips root @ Ubuntu: chmod + x/etc/init. d/opensips root @ Ubuntu: gedit/etc/init. d/opensips open the last modification configuration file, for example, the red part is the part to be deleted "-f... "Create a configuration file for the Program. This file is specified only here and can be read through this path at startup. Otherwise, the configuration file is not read. 6. set the default opensips. default Root @ Ubuntu: CD/home/Amaryllis/work/project/opensips/packaging/Debian root @ Ubuntu: CP opensips. default/etc/default/root @ Ubuntu: CD/etc/default/root @ Ubuntu: MV opensips. default opensips root @ Ubuntu: gedit opensips after it is opened, modify the configuration file, for example: 6: Start opensips root @ Ubuntu:/etc/init. d/opensips restart (restart) or root @ Ubuntu:/etc/init. d/opensips start (start) 7: view process: root @ Ubuntu: PS aux | grep opensips result as follows: View UDP link status View TCP link status if the result is different from the above, it can only be said that your configuration is wrong, you need to carefully troubleshoot. So far, the installation has come to an end. The rest is that you need to test whether the installation can pass.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.