Monday, April 10, 2017

Instalando Elastix 4 no CentOS 7 64 bits

Este tutorial tem como objetivo fazer a instalação do Elastix 4 no CentOS 7 64 bits
O ambiente utilizado na produção deste tutorial é apresentado a seguir:
  • CentOS 7.2 x86_64 release 1511
  • Elastix 4.0 RC3 versão 64 bits
A instalação do CentOS 7 utilizada para validar esse tutorial foi a Minimal-1511. A ISO dessa versão pode ser baixada através desse link.
Todos os comandos executados nesse tutorial foram executados com o usuário root.

Preparar o sistema operacional para a instalação do Elastix

Antes de iniciar a instalação, precisamos instalar os seguintes pacotes:
  1. # yum install epel-release -y

  2. # yum install wget vim -y
Em seguida, verificamos se existem pacotes a serem atualizados com o comando:
  1. # yum update -y
Reinicie o servidor para subir o kernel atualizado.
  1. # reboot

Fazer o download do Elastix

  1. # cd /tmp

  2. # wget https://sourceforge.net/projects/elastix/files/Elastix%20PBX%20Appliance%20Software/4.0.0/Elastix-4.0.74-Stable-x86_64-bin-10Feb2016.iso/download -O Elastix-4.0-x86_64.iso
Reparem que o arquivo que baixamos é uma ISO. Geralmente, a instalação do Elastix é realizada dando um boot no servidor inicializando através de uma ISO (queimada em um DVD ou inserida em um pendrive).
Como este tutorial está abordando a instalação do Elastix em um sistema já instalado, precisamos montar a ISO em nosso sistema para ter acesso aos arquivos de instalação do Elastix.

Montar a ISO

  1. # mkdir /mnt/iso

  2. # mount -o loop /tmp/Elastix-4.0-x86_64.iso /mnt/iso

Criar repositório local com a ISO montada

  1. # cat > /etc/yum.repos.d/elastix-local.repo <<EOF
  2. [elastix]
  3. name=Repositorio local Elastix
  4. baseurl=file:///mnt/iso/
  5. gpgcheck=0
  6. enabled=1
  7. EOF

Instalar e configurar PHP

  1. # yum install php -y
Definir timezone no PHP antes da instalação do Elastix.
  1. # vim /etc/php.ini
Descomentar a linha date.timezone.
  1. ;date.timezone
E adicionar o local conforme exemplo abaixo:
  1. date.timezone = 'Asia/Ho_Chi_Minh'

 Instalar o Elastix

  1. # yum install asterisk -y

  2. # yum install elastix -y

Desabilitar o SELinux

  1. # sed -i 's/enforcing/disabled/' /etc/selinux/config
Reinicie o servidor.
  1. # reboot
After Reboot Run Command to set mysql and Admin Password.
  1. # elastix-admin-passwords --change

Durante a inicialização, será solicitado a senha do usuário root para o MySQL:
boot
Repetir a senha do usuário root:
boot-1
A próxima etapa solicita a senha para o usuário admin do Elastix:
boot-2
Repetir a senha do usuário admin.
boot-3

Acessar interface web

Abra o seu navegador e digite o IP do servidor.
login
Após o login, a tela inicial do Elastix será exibida.
tela_inicial
Acesse no menu lateral System > Preferences > Language e selecione Português (Brasil).
linguagem
Clique em Save.
O sistema estará pronto para receber a configuração do seu ambiente.

Thursday, March 30, 2017

Top phần mềm xây dựng trang web miễn phí tốt nhất năm 2017

1. Wix
Top phần mềm xây dựng trang web miễn phí tốt nhất năm 2017 - 1
Wix là cách đơn giản nhất để xây dựng trang web của riêng bạn, với các thủ thuật nhanh và trình soạn thảo WYSIWYG thông minh.
Wix cung cấp hai phương pháp để xây dựng trang web. Phương pháp đơn giản nhất là sử dụng công cụ xây dựng trang web Wix ADI (Artificial Design Intelligence). Công cụ này sẽ hướng dẫn bạn qua hàng loạt câu hỏi trước khi tự động tạo trang web cho bạn.
Một phương pháp tiếp cận thực tế hơn, có sẵn nếu bạn quyết định sử dụng trình Wix Editor tiêu chuẩn. Có hàng trăm mẫu phong cách để lựa chọn, bạn có thể tinh chỉnh và điều chỉnh cho phù hợp với nhu cầu của bạn bằng cách sử dụng trình biên tập WYSIWYG.
Wix cung cấp cho bạn một mức độ kiểm soát tuyệt vời đối với giao diện của trang web và vị trí của các công cụ. Bạn cũng có thể sử dụng App Market để thêm các tính năng như bản tin và live chat.
2. WordPress
Top phần mềm xây dựng trang web miễn phí tốt nhất năm 2017 - 2
Có hai phiên bản khác nhau của WordPress. WordPress cho phép bạn tạo trang web của riêng mình trên wordpress.com. Bạn có thể tạo mọi thứ từ trang blog hoặc trang ảnh, đến một cửa hàng trực tuyến. Bạn có thể tạo một trang web tĩnh, hoặc một trang web theo phong cách blog với nội dung cập nhật thường xuyên. Nhược điểm duy nhất là giới hạn các plugin và các mẫu được giới hạn so với trình tạo trang web trên máy tính để bàn.
3. CoffeeCup Free HTML Editor
Top phần mềm xây dựng trang web miễn phí tốt nhất năm 2017 - 3
Đây là phần mềm lý tưởng cho việc mã hoá trang web bằng tay, trình chỉnh sửa HTML miễn phí giúp tiết kiệm thời gian.
CoffeeCup Free HTML Editor là một trong những phần mềm xây dựng trang web không có hệ thống quản lý nội dung (CMS). Phần mềm này có khả năng tự hoàn thành mã và sửa lỗi người dùng. Phần mềm có sẵn nhiều chủ đề website dành cho nhiều nhu cầu khác nhau. Trang web sau khi hoàn thành sẽ tương thích với nhiều trình duyệt phổ biến như Internet Explorer, FireFox, Chrome. Tuy nhiên, nhược điểm của phần mềm này là một số tính năng như kiểm tra chính tả và tối ưu hóa mã, chỉ được tích hợp trong phiên bản trả phí của phần mềm.
4. Joomla
Top phần mềm xây dựng trang web miễn phí tốt nhất năm 2017 - 4
Một phần mềm xây dựng trang web miễn phí khác là Joomla. Nó có thể không phổ biến như WordPress, nhưng nó cung cấp hai lựa chọn: xây dựng một trang web bằng cách sử dụng các ứng dụng web tại joomla.com và có nó được lưu trữ trên các máy chủ, hoặc tải phần mềm từ joomla.org và lưu trữ nó cho riêng mình.
Nếu bạn chọn tùy chọn thứ hai, bạn sẽ nhận thấy rằng giao diện dễ tiếp cận hơn WordPress. Nó thích hợp cho người mới bắt đầu. Điểm cộng của Joomla là bộ sưu tập khổng lồ các chủ đề và phần mở rộng, cung cấp nhiều lựa chọn tùy chỉnh cách trang web.
5. SITE123
Top phần mềm xây dựng trang web miễn phí tốt nhất năm 2017 - 5
Như chính tên gọi của nó, ý tưởng của phần mềm SITE123 là tạo trang web đơn giản nhất có thể. Cũng như các phần mềm xây dựng trang web miễn phí trực tuyến khác, bạn bắt đầu bằng cách chọn một định dạng chung - cho dù đó là một blog đơn giản hoặc một cái gì đó phức tạp hơn như một trang web của cửa hàng. Sau khi đã điền vào một vài thông tin cơ bản, bạn sẽ bắt đầu tùy chỉnh nó. Tất cả mọi bước đều được hướng dẫn, chỉ trong vài phút, bạn có thể tạo trang web với số lượng trang không giới hạn, hoàn chỉnh với lưu trữ miễn phí và thậm chí có cả thư viện hình ảnh và biểu tượng miễn phí để sử dụng

Saturday, March 11, 2017

Oracle Recover DB - ORA-01194: file 1 needs more recovery to be consistent

Method 1:
1) Start the database in mount state
SQL> startup mount;
2) Recover the database.
SQL> recover database;
If you come across below error
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
 
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: ‘D:\ORACLE\PRODUCT\10.2.0\ORADATA\DBTEST\SYSTEM01.DBF’
then, do the following
1)
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 766152 generated at 03/16/2013 12:12:04 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/DUPDB/archivelog/2013_03_16/o1_mf_1_14_%u_.arc
ORA-00280: change 766152 for thread 1 is in sequence #14
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_03_14/o1_mf_1_10_8n43no4v_.arc
ORA-00310: archived log contains sequence 10; sequence 14 required
ORA-00334: archived log:
'/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_03_14/o1_mf_1_10_8n43no4v_.arc'
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01195: online backup of file 1 needs more recovery to be consistent
ORA-01110: data file 1:
'/u01/app/oracle/oradata/DUPDB/datafile/o1_mf_system_7qm3ck4o_.dbf'
2)
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 766152 generated at 03/16/2013 12:12:04 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/DUPDB/archivelog/2013_03_16/o1_mf_1_14_%u_.arc
ORA-00280: change 766152 for thread 1 is in sequence #14
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_03_14/o1_mf_1_11_8n43qq5j_.arc
ORA-00310: archived log contains sequence 11; sequence 14 required
ORA-00334: archived log:
'/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_03_14/o1_mf_1_11_8n43qq5j_.arc'
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01195: online backup of file 1 needs more recovery to be consistent
ORA-01110: data file 1:
'/u01/app/oracle/oradata/DUPDB/datafile/o1_mf_system_7qm3ck4o_.dbf'
3)
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 766152 generated at 03/16/2013 12:12:04 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/DUPDB/archivelog/2013_03_16/o1_mf_1_14_%u_.arc
ORA-00280: change 766152 for thread 1 is in sequence #14
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_03_16/o1_mf_1_14_8n875owh_.arc
ORA-00279: change 769526 generated at 03/16/2013 12:48:13 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/DUPDB/archivelog/2013_03_16/o1_mf_1_15_%u_.arc
ORA-00280: change 769526 for thread 1 is in sequence #15
ORA-00278: log file
'/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_03_16/o1_mf_1_14_8n875
owh_.arc' no longer needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
3) Open the database in resetlog mode
SQL> alter database open resetlogs;
4) Check the status
SQL> select instance_name, status from v$instance;
INSTANCE_NAME    STATUS
------------------------   -------------
DUPDB                  OPEN
SQL> select name, open_mode from v$database;
NAME      OPEN_MODE
----------    ------------------
DUPDB     READ WRITE


Method 2:
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area  530288640 bytes
Fixed Size                  2131120 bytes
Variable Size             310381392 bytes
Database Buffers          209715200 bytes
Redo Buffers                8060928 bytes
Database mounted.
SQL> ALTER SYSTEM SET "_allow_resetlogs_corruption"= TRUE SCOPE = SPFILE;
SQL> ALTER SYSTEM SET undo_management=MANUAL SCOPE = SPFILE;
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area  530288640 bytes
Fixed Size                  2131120 bytes
Variable Size             310381392 bytes
Database Buffers          209715200 bytes
Redo Buffers                8060928 bytes
Database mounted.
SQL> alter database open resetlogs;
Database altered.
SQL> CREATE UNDO TABLESPACE undo1 datafile '<ora_data_path>undo1_1.dbf' size 200m autoextend on maxsize unlimited;
Tablespace created.
SQL> ALTER SYSTEM SET undo_tablespace = undo1 SCOPE=spfile;
System altered.
SQL> alter system set undo_management=auto scope=spfile;
System altered.
SQL> shutdown immediate
SQL> startup

Tuesday, March 7, 2017

win 10 explorer cannot search

If that does not work for you, run the built-in search troubleshooter to find out more about it. To run it, do the following:
  1. Tap on the Windows-key, type Control Panel and hit enter.
  2. Alternatively, use the keyboard shortcut Windows-Pause to open the Control Panel if the above does not work. Click on "Control Panel Home" when the window opens.
  3. Select large or small icons under "view by".
  4. Click on Indexing options, and when the menu opens on the Advanced button.
  5. There you need to click on "troubleshoot search and indexing", and follow the instructions 

Monday, February 13, 2017

How to enable sa Account in SQL Server?

When you install the SQL Server using Windows Authentication mode, by default, the “sa” account is disabled. Sometimes, due to users/customers request, you may need to enable the sa account. You need to change the authentication mode for SQL server from Windows Authentication Mode to SQL Server and Windows Authentication Mode to use the sa account.
To Change the Authentication Mode:
Follow the steps mentioned below to change the authentication mode from Windows Authentication to SQL Server and Windows Authentication. You need to remember that, the SQL Server service needs to restart to make this change effective.
1. Login to the SQL server instance using SQL Server Management Studio. Right-click on the database instance, and go to Properties.
image
2. On the Server Properties page, Click on Security. Click on the radio button next to SQL Server and Windows Authentication mode, and click on OK to close the  Server Properties page.
image
3. Once you clicked on the Ok button, we will get the following screen:
image
As discussed earlier, we need to restart the SQL Server service to make this change effective. After restarting the SQL Server, the authentication mode will be changed to SQL Server and Windows Authentication mode.
Enable the sa Login:
1. Connect to the SQL Server instance using SSMS and go to Security. Expand Security, go to Logins.
2.  You can see the sa account is disabled when you install SQL Server using Windows Authentication mode.
image
3. Right-click on the sa account and go to Login Properties. Specify a complex password for the sa account. By default, the Enforce password policy is checked. (if you don’t want to provide a complex password for the sa account, you can uncheck this option. However, this is not recommended.)
image
4. Click on the Status page. By default, the sa account will be disabled. Click on the Enabled button to enable the sa account. Click on Ok to close the sa Login Properties.
image
Thus, sa account is enabled and you will be able to login to the SQL instance using the sa account.
If you want to use a script to enable the sa account, you can use the script mentioned below:
1: USE [master]
2: GO
3: ALTER LOGIN [sa] WITH PASSWORD=N'z43VGYT@Iu*60i'
4: GO
5: ALTER LOGIN [sa] ENABLE
6: GO

Wednesday, February 8, 2017

Khai báo tài khoản IMS của VNPT vào điện thoại IP, tổng đài ip và thiết bị ATA

Khai báo tài khoản SIP IMS của VNPT vào điện thoại IP
1. Khai báo cho các điện thoại IP Grandstream
Khai báo tài khoản IMS VNPT vào điện thoại IP
2. Khai báo cho các thiết bị ATA của Grandstream
a. Khai báo cho frofile
- Primary SIP Server: ims.vnpt.vn
- Outbound Proxy: 113.171.225.6:5062
IMS_ATA2
b. Khai báo tài khoản
- Sip User ID: Số điện thoại người dùng
- Authenticate ID: Số điện thoại kèm đuôi @ims.vnpt.vn (ví dụ: +84432001500@ims.vnpt.vn)
- Password: Mã password của số máy
- Name: Số điện thoại người sử dụng
IMS_ATA1
3. Khai báo tài khoản IMS của VNPT vào tổng đài IP Grandstream
Khai báo Sip Account IMS của VNPT
Vào giao diện web tổng đài -> vào Pbx -> Vào Voip Trunks -> Creat new Sip Trunk và thiết lập các thông số tài khoản tương tự như sau
VNPT_IMS2 VNPT_IMS1

Tuesday, January 24, 2017

Installing MsSQL extension on cPanel/WHM server.

Currently there is no script for installing php mssql extension in cpanel server. You have to install it manually.

You need to install a few modules before installing the MsSQL extension.

1. unixODBC

2. freeTDS

3. mssql.so


Do not use rpms as it will show lots of dependency errors. Better download the source file and compile it.

Install unixODBC package

Download source file and install using following steps.

-------
~]# wget http://www.unixodbc.org/unixODBC-2.2.14-p2.tar.gz
~]# tar -xvf unixODBC-2.2.12.tar.gz
~]# cd unixODBC-2.2.12
~]# ./configure -prefix=/usr/local -enable-gui=no    (make sure you use gui option set as 'no' else it will show error message as it don't have Qt package)
~]# make
~]# make install
------

Install freeTDS package

--------
1. Download from ftp://ftp.freetds.org/pub/freetds/old/0.82/freetds-0.82.tar.gz
2. tar -xvf freetds-0.82.tar.gz

3. ./configure -with-tdsver=8.0 -with-unixODBC=/usr/local

4. make

5. make install
---------

Configure freeTDS

1. Locate the freetds.conf and add the following entries. default location is /usr/local/etc/freetds.conf

[MSHOSTNAME]
host = MSHOSTNAME
port = 1433
tds version = 8.0

In cPanel servers the extensions are located at /home/cpeasyapache/src/php-x.x.x/ext. Navigate to the above directory and then to mssql directory.

cd /home/cpeasyapache/src/php-x.x.x/ext/mssql

phpize
./configure
make
make install 

The above commands will generate a copy of mssql.so in the installed extensions directory. Check and make sure that mssql.so is there and add the following to php.ini

---------
# php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

# vim /usr/local/lib/php.ini
extension=”mssql.so”

-----------
Restart httpd and check the modules using the following command.

~]# php -m | grep mssql
mssql

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Powerade Coupons