diff --git a/README.md b/README.md index f927b4a..4721751 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Elastix4onCentos7vz -###Install Elastix 4 on Centos 7 OpenVZ +###Install Elastix 4 on Centos 7 OpenVZ & Other VPS's Ok, So I wanted to setup Elastix in a cloud. There are some VPS's that are built for VOIP, but if you want it even cheaper than $30 per month, then there are other options out there. If only you could just install it on a VPS with centos 7... I use [Hostmada's OVZ-3](https://hostmada.com/openvz-vps) plan for $5.99 per month. It may not be the fastest, but it works pretty well for me. @@ -9,13 +9,23 @@ I expounded on their instructions, and made scripts that extract the source ISO These scripts also work well if you have a linux server that you want to run Elastix in a openVZ container. -I wrote a couple scripts that do everything for you. It installs everything except for NetworkManager, which breaks the virtual network interfaces and makes it unreachable. If you want to do this on a CentOS 7 that uses other Virtualazation, you can install it by `yum install NetworkManager NetworkManager-glib NetworkManager-tui` when you are finished and have it be the Full Elastix setup. (Not Tested) +I wrote a couple scripts that do everything for you. It installs everything except for NetworkManager, which breaks the virtual network interfaces and makes it unreachable. If you want to do this on a CentOS 7 that uses other Virtualazation, you can install it by `yum install NetworkManager NetworkManager-glib NetworkManager-tui` when you are finished and have it be the Full Elastix setup. --Doesn't seem needed. + +I also setup Elastix on [digitalocean.com](www.digitalocean.com/?refcode=997a8188969b), and it seems to work even better. sign up through me, and you get $10 credit to start and play with. The $5 plan + $1 for backups is an awesome option! ## Instalation To start out, ssh into your host. Then at the command, download the install scripts. If you do not have wget, install it by `yum -y install wget`, then you will just need to run this: wget -O Elastix4onCentos7vz.tar.gz --no-check-certificate https://github.com/thpryrchn/Elastix4onCentos7vz/tarball/master tar zxvf Elastix4onCentos7vz.tar.gz --strip-components=1 + +If you are using the Digital Ocean 512 MB Memory / 20 GB Disk / NYC3 - CentOS 7.2 x64 setup, you will want to create a Swapfile, or else your memory will run out, and the database will crash. to do this, run `./create-swapfile.sh` + +If you are not installing on a VPS, and have hardware you want Elastix to support, then swap *inst2-hardware.txt* with *inst2.txt* + +Then proceed to run the first install script: + + ./elastix-install-p1.sh This will download the Elastix Install DVD, unpack it to /mnt/iso, add it as a source to yum, then install all the files. It also adds Elastix's repo, so that it starts with the latest version. If you already have Elastix-4.0.74-Stable-x86_64-bin-10Feb2016.iso downloaded and in the same place as the install files, It will use it instead. Usefull if you find it on a faster Mirror. @@ -30,4 +40,6 @@ It will also clean off the install files so they won't take up space anymore. After it finishes, it will have you reboot once more. Then you can configure through the Web interface, and however else you work with Elastix. +If you can't access the web interface after the reboot, it is because you may have a firewall that is preventing it. To access it, you can temporarrly disable the firewall by running `systemctl stop iptables` and `systemctl stop firewalld` + ###Be sure to configure the Firewall through Elastix, or however else you choose too, as the install disables it. \ No newline at end of file diff --git a/create-swapfile.sh b/create-swapfile.sh new file mode 100755 index 0000000..630e6eb --- /dev/null +++ b/create-swapfile.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +dd if=/dev/zero of=/swapfile bs=1024 count=1024k +chown root:root /swapfile +chmod 0600 /swapfile +mkswap /swapfile +swapon /swapfile +echo "/swapfile swap swap defaults 0 0" >> /etc/fstab +sysctl vm.swappiness=10 +echo vm.swappiness=10 >> /etc/sysctl.conf +free -h +cat /proc/sys/vm/swappiness diff --git a/elastix-install-p1.sh b/elastix-install-p1.sh index a56204f..4aa0dc7 100755 --- a/elastix-install-p1.sh +++ b/elastix-install-p1.sh @@ -104,21 +104,24 @@ yum -y update sleep 3 yum -y --nogpg install $(cat inst1.txt) sleep 3 +yum -y install asterisk +yum -y install elastix #Run a 2nd time in case it missed something yum -y --nogpg install $(cat inst2.txt) +yum -clean all yum -y update #Shut off SElinux and Firewall. Be sure to configure it in Elastix! setenforce 0 sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config cp -a /etc/sysconfig/iptables /etc/sysconfig/iptables.org-elastix-"$(/bin/date "+%Y-%m-%d-%H-%M-%S")" -systemctl stop chronyd -systemctl stop firewalld -systemctl stop iptables -systemctl disable chronyd -systemctl disable firewalld -systemctl disable iptables -systemctl disable elastix-firstboot +# systemctl stop chronyd +# systemctl stop firewalld +# systemctl stop iptables +# systemctl disable chronyd +# systemctl disable firewalld +# systemctl disable iptables +# systemctl disable elastix-firstboot #Fix for "/bin/df: '/etc/fstab': No such file or directory" touch /etc/fstab diff --git a/elastix-install-p2.sh b/elastix-install-p2.sh index 7c5a315..2cad8c3 100755 --- a/elastix-install-p2.sh +++ b/elastix-install-p2.sh @@ -9,11 +9,6 @@ echo "Now we are running some cleanup, and making sure everything is up to date" rm -rf /etc/yum.repos.d/elastix-cd.repo /mnt/iso/ Elastix-4.0.74-Stable-x86_64-bin-10Feb2016.iso mv /etc/yum.repos.d/elastix.repo.rpmnew /etc/yum.repos.d/elastix.repo yum clean all -mkdir .poop -cd .poop -yum -y reinstall elastix* -cd .. -rm -rf .poop yum -y update echo " " echo " " diff --git a/inst1.txt b/inst1.txt old mode 100644 new mode 100755 index 439abae..9a8555a --- a/inst1.txt +++ b/inst1.txt @@ -71,7 +71,6 @@ firewalld flac-libs fontconfig fontpackages-filesystem -freePBX freetype fxload gawk @@ -130,13 +129,10 @@ kexec-tools keyutils-libs kpartx krb5-libs -lcdelastix -lcdproc lcms2 less libacl libaio -liballogsmat libao libassuan libasyncns @@ -144,7 +140,6 @@ libattr libblkid libcap libcap-ng -libc-client libcom_err libcroco libcurl @@ -161,12 +156,10 @@ libgcc libgcrypt libgomp libgpg-error -libgsmat libgudev1 libICE libidn libjpeg-turbo -libmcrypt libmnl libmodman libmount @@ -176,12 +169,10 @@ libnfnetlink libnl3 libnl3-cli libogg -libopenr2 libpcap libpciaccess libpipeline libpng -libpri libproxy libpwquality libreport-filesystem @@ -193,15 +184,12 @@ libsepol libSM libsndfile libsoup -libsrtp libss -libss7 libssh2 libstdc++ libsysfs libtasn1 libteam -libtidy libtiff libtiff-devel libtiff-tools @@ -214,7 +202,6 @@ libutempter libuuid libverto libvorbis -libwat libX11 libX11-common libXau @@ -253,7 +240,6 @@ mokutil mozjs17 mtools MySQL-python -mysql-to-mariadb-server ncurses ncurses-base ncurses-libs @@ -275,7 +261,6 @@ nss-util ntp ntpdate numactl-libs -openfire openldap openssh openssh-clients @@ -301,7 +286,6 @@ perl-CGI perl-Compress-Raw-Bzip2 perl-Compress-Raw-Zlib perl-constant -perl-Convert-BinHex perl-Crypt-OpenSSL-Bignum perl-Crypt-OpenSSL-Random perl-Crypt-OpenSSL-RSA @@ -352,7 +336,6 @@ perl-Mail-DKIM perl-Mail-IMAPClient perl-Mail-SPF perl-MailTools -perl-MIME-tools perl-NetAddr-IP perl-Net-Daemon perl-Net-DNS @@ -390,20 +373,13 @@ php-bcmath php-cli php-common php-gd -php-IDNA_Convert php-imap -php-jpgraph -php-magpierss php-mbstring php-mcrypt php-mysql php-pdo php-pear -php-pear-DB -php-PHPMailer php-process -php-simplepie -php-Smarty php-soap php-tcpdf php-tidy @@ -427,7 +403,6 @@ procps-ng psmisc pth pulseaudio-libs -py-Asterisk pygobject3-base pygpgme pyliblzma @@ -435,18 +410,13 @@ pyOpenSSL python python-backports python-backports-ssl_match_hostname -python-cjson python-configobj python-crypto -python-daemon python-decorator python-ecdsa -python-eventlet -python-greenlet python-iniparse python-libs python-lockfile -python-paramiko python-pycurl python-pyudev python-setuptools @@ -509,7 +479,6 @@ vim-filesystem vim-minimal virt-what vsftpd -wanpipe-util wavpack which wpa_supplicant diff --git a/inst2-hardware.txt b/inst2-hardware.txt new file mode 100755 index 0000000..eb85eab --- /dev/null +++ b/inst2-hardware.txt @@ -0,0 +1,592 @@ +acl +aic94xx-firmware +alsa-firmware +alsa-lib +alsa-tools-firmware +apr +apr-util +asterisk +asterisk-addons +asterisk-devel +asterisk-perl +asterisk-sounds-es +asterisk-sounds-fr +audit +audit-libs +authconfig +autogen-libopts +avahi +avahi-autoipd +avahi-libs +basesystem +bash +bind-libs-lite +bind-license +binutils +biosdevname +btrfs-progs +bzip2-libs +ca-certificates +centos-logos +centos-release +chkconfig +chrony +compat-libtiff3 +coreutils +cpio +cracklib +cracklib-dicts +cronie +cronie-noanacron +crontabs +cryptsetup-libs +cups-libs +curl +cyrus-imapd +cyrus-imapd-utils +cyrus-sasl +cyrus-sasl-lib +cyrus-sasl-plain +dahdi +dbus +dbus-glib +dbus-libs +dbus-python +device-mapper +device-mapper-event +device-mapper-event-libs +device-mapper-libs +device-mapper-persistent-data +dhclient +dhcp +dhcp-common +dhcp-libs +dialog +diffutils +dmidecode +dnsmasq +dracut +dracut-config-rescue +dracut-network +e2fsprogs +e2fsprogs-libs +ebtables +elastix +elastix-a2billing +elastix-a2billing-callback_daemon +elastix-addons +elastix-agenda +elastix-asterisk-sounds +elastix-email_admin +elastix-endpointconfig2 +elastix-extras +elastix-fax +elastix-firstboot +elastix-framework +elastix-im +elastix-my_extension +elastix-pbx +elastix-portknock +elastix-reports +elastix-security +elastix-system +elfutils-libelf +elfutils-libs +epel-release +ethtool +expat +festival +festival-lib +festival-speechtools-libs +festvox-slt-arctic-hts +file +file-libs +filesystem +findutils +fipscheck +fipscheck-lib +firewalld +flac-libs +fontconfig +fontpackages-filesystem +freePBX +freetype +fxload +gawk +gdbm +gdbm-devel +gettext +gettext-libs +ghostscript +ghostscript-fonts +glib2 +glibc +glibc-common +glibc-devel +glibc-headers +glib-networking +gmp +gnupg2 +gnutls +gobject-introspection +gpgme +gpm-libs +grep +groff-base +grub2 +grub2-efi +grub2-tools +grubby +gsettings-desktop-schemas +gsm +gzip +hardlink +hdparm +hostname +httpd +httpd-tools +hwdata +hylafax +iaxmodem +iksemel +info +initscripts +iproute +iprutils +iptables +iptables-services +iputils +irqbalance +ivtv-firmware +iwl1000-firmware +iwl100-firmware +iwl105-firmware +iwl135-firmware +iwl2000-firmware +iwl2030-firmware +iwl3160-firmware +iwl3945-firmware +iwl4965-firmware +iwl5000-firmware +iwl5150-firmware +iwl6000-firmware +iwl6000g2a-firmware +iwl6000g2b-firmware +iwl6050-firmware +iwl7260-firmware +jansson +jbigkit-libs +json-c +kbd +kbd-misc +kernel +kernel-devel +kernel-headers +kernel-tools +kernel-tools-libs +kexec-tools +keyutils-libs +kmod +kmod-dahdi +kmod-libs +kmod-rhino +kmod-wanpipe +kpartx +krb5-libs +lcdelastix +lcdproc +lcms2 +less +libacl +libaio +liballogsmat +libao +libassuan +libasyncns +libattr +libblkid +libcap +libcap-ng +libc-client +libcom_err +libcroco +libcurl +libdaemon +libdb +libdb-devel +libdb-utils +libdrm +libedit +libertas-sd8686-firmware +libertas-sd8787-firmware +libertas-usb8388-firmware +libestr +libffi +libfontenc +libgcc +libgcrypt +libgomp +libgpg-error +libgsmat +libgudev1 +libICE +libidn +libjpeg-turbo +libmcrypt +libmnl +libmodman +libmount +libndp +libnetfilter_conntrack +libnfnetlink +libnl3 +libnl3-cli +libogg +libopenr2 +libpcap +libpciaccess +libpipeline +libpng +libpri +libproxy +libpwquality +libreport-filesystem +libselinux +libselinux-python +libselinux-utils +libsemanage +libsepol +libSM +libsndfile +libsoup +libsrtp +libss +libss7 +libssh2 +libstdc++ +libsysfs +libtasn1 +libteam +libtidy +libtiff +libtiff-devel +libtiff-tools +libtool-ltdl +libunistring +libusb +libusbx +libuser +libutempter +libuuid +libverto +libvorbis +libwat +libX11 +libX11-common +libXau +libxcb +libXext +libXfont +libXi +libxml2 +libXpm +libxslt +libXt +libXtst +libzip +linux-firmware +lm_sensors-libs +lockdev +logrotate +lua +lvm2 +lvm2-libs +lzo +mailcap +mailman +make +man-db +mariadb +mariadb-libs +mariadb-server +mdadm +memtest86+ +mgetty +microcode_ctl +ModemManager-glib +mod_ssl +mokutil +mozjs17 +mtools +MySQL-python +mysql-to-mariadb-server +ncurses +ncurses-base +ncurses-libs +net-snmp-agent-libs +net-snmp-libs +nettle +net-tools +newt +newt-python +nmap +nmap-ncat +nspr +nss +nss-softokn +nss-softokn-freebl +nss-sysinit +nss-tools +nss-util +ntp +ntpdate +numactl-libs +openfire +openldap +openssh +openssh-clients +openssh-server +openssl +openssl-libs +opus +os-prober +p11-kit +p11-kit-trust +pam +parted +passwd +pciutils +pciutils-libs +pcre +perl +perl-Archive-Tar +perl-Business-ISBN +perl-Business-ISBN-Data +perl-Carp +perl-CGI +perl-Compress-Raw-Bzip2 +perl-Compress-Raw-Zlib +perl-constant +perl-Convert-BinHex +perl-Crypt-OpenSSL-Bignum +perl-Crypt-OpenSSL-Random +perl-Crypt-OpenSSL-RSA +perl-Data-Dumper +perl-Date-Manip +perl-DBD-MySQL +perl-DB_File +perl-DBI +perl-devel +perl-Digest +perl-Digest-HMAC +perl-Digest-MD5 +perl-Digest-SHA +perl-Encode +perl-Encode-Detect +perl-Encode-Locale +perl-Error +perl-Exporter +perl-ExtUtils-Install +perl-ExtUtils-MakeMaker +perl-ExtUtils-Manifest +perl-ExtUtils-ParseXS +perl-FCGI +perl-File-Listing +perl-File-Path +perl-File-Temp +perl-Filter +perl-Getopt-Long +perl-HTML-Parser +perl-HTML-Tagset +perl-HTTP-Cookies +perl-HTTP-Daemon +perl-HTTP-Date +perl-HTTP-Message +perl-HTTP-Negotiate +perl-HTTP-Tiny +perl-IO-Compress +perl-IO-HTML +perl-IO-Socket-INET6 +perl-IO-Socket-IP +perl-IO-Socket-SSL +perl-IO-Zlib +perl-libs +perl-libwww-perl +perl-LWP-MediaTypes +perl-macros +perl-Mail-DKIM +perl-Mail-IMAPClient +perl-Mail-SPF +perl-MailTools +perl-MIME-tools +perl-NetAddr-IP +perl-Net-Daemon +perl-Net-DNS +perl-Net-HTTP +perl-Net-LibIDN +perl-Net-SMTP-SSL +perl-Net-SSLeay +perl-Package-Constants +perl-parent +perl-Parse-RecDescent +perl-PathTools +perl-PlRPC +perl-Pod-Escapes +perl-podlators +perl-Pod-Perldoc +perl-Pod-Simple +perl-Pod-Usage +perl-Scalar-List-Utils +perl-Socket +perl-Socket6 +perl-Storable +perl-Sys-Syslog +perl-Test-Harness +perl-Text-ParseWords +perl-threads +perl-threads-shared +perl-TimeDate +perl-Time-HiRes +perl-Time-Local +perl-URI +perl-version +perl-WWW-RobotRules +php +php-bcmath +php-cli +php-common +php-gd +php-IDNA_Convert +php-imap +php-jpgraph +php-magpierss +php-mbstring +php-mcrypt +php-mysql +php-pdo +php-pear +php-pear-DB +php-PHPMailer +php-process +php-simplepie +php-Smarty +php-soap +php-tcpdf +php-tidy +php-xml +pinentry +pkgconfig +plymouth +plymouth-core-libs +plymouth-scripts +policycoreutils +polkit +polkit-pkla-compat +poppler-data +popt +portreserve +postfix +postgresql-libs +ppp +procmail +procps-ng +psmisc +pth +pulseaudio-libs +py-Asterisk +pygobject3-base +pygpgme +pyliblzma +pyOpenSSL +python +python-backports +python-backports-ssl_match_hostname +python-cjson +python-configobj +python-crypto +python-daemon +python-decorator +python-ecdsa +python-eventlet +python-greenlet +python-iniparse +python-libs +python-lockfile +python-paramiko +python-pycurl +python-pyudev +python-setuptools +python-six +python-slip +python-slip-dbus +python-sqlalchemy +python-tempita +python-urlgrabber +pytz +pyxattr +qrencode-libs +readline +rhino +rootfiles +RoundCubeMail +rpm +rpm-build-libs +rpm-libs +rpm-python +rsyslog +sed +selinux-policy +selinux-policy-targeted +setup +shadow-utils +shared-mime-info +sharutils +shim +shim-unsigned +slang +snappy +sox +spamassassin +spandsp +spandsp-devel +speex +sqlite +sudo +syslinux +systemd +systemd-libs +systemd-sysv +systemtap-sdt-devel +sysvinit-tools +t1lib +tar +tcp_wrappers-libs +teamd +tftp-server +tuned +tzdata +unixODBC +urw-fonts +ustr +util-linux +uuid +uuid-perl +vim-common +vim-enhanced +vim-filesystem +vim-minimal +virt-what +vsftpd +wanpipe-util +wavpack +which +wpa_supplicant +xfsprogs +xinetd +xorg-x11-font-utils +xz +xz-libs +yum +yum-metadata-parser +yum-plugin-fastestmirror +zlib diff --git a/inst2.txt b/inst2.txt old mode 100644 new mode 100755 index eb85eab..bbf9510 --- a/inst2.txt +++ b/inst2.txt @@ -186,12 +186,7 @@ kernel-tools kernel-tools-libs kexec-tools keyutils-libs -kmod -kmod-dahdi -kmod-libs -kmod-rhino -kmod-wanpipe -kpartx +partx krb5-libs lcdelastix lcdproc