Configure Cisco Switch for FreeNAS LACP link aggregation

freenas

Lets configure GigabitEthernet0/31 and GigabitEthernet0/31  switch (SW) for LACP link aggregation

SW>enable
SW#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
SW(config)#interface range GigabitEthernet0/31 - 32
SW(config-if-range)#no shut
SW(config-if-range)#channel-group 1 mode passive
Creating a port-channel interface Port-channel 1
SW(config-if-range)#end
SW#

 

For check the EtherChannel LACP configuration you can use either the show etherchannel summary or show etherchannel detail commands

SW#show etherchannel sum
SW#show etherchannel summary 
Flags:  D - down        P - bundled in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator

        M - not in use, minimum links not met
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port


Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------
1      Po1(SU)         LACP      Gi0/31(P)   Gi0/32(P)

 

Cisco switch initial configuration and setup IP

cisco-catalyst-switch

Here is initial configuration for Cisco switch, setup management IP and configure telnet

switch>enable
Password:
switch#

Enter to configuration mode:

switch#  conf t
switch(config)#

Configure  IP address:

switch(config)#interface vlan 1 (enter to VLAN 1 configuring interface mode)
switch(config-if)#ip address 10.1.1.1 255.255.255.0 (setup IP and netmask)
switch(config-if)#no shutdown (enable interface)
switch(config-if)exit
switch(config)#exit
switch#

Setup password for enable mode:

switch# conf t
switch(config)# enable secret your_password
switch(config)# exit
switch#

Save configuration:

switch# write mem
Building configuration
OK
switch#

 

Or you can edit text below copy and paste in terminal:

conf t
interface vlan 1
ip address 10.1.1.1 255.255.255.0
no shutdown
exit
enable secret password_for_enable_mode
line VTY 0 4
login
password your_pasword
exit
write mem
exit

VestaCP Upgrade MYSQL 5.6 for CentOS6

VestaCP Upgrade MYSQL 5.6 for CentOS6

rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

You can edit file:  /etc/yum.repos.d/mysql-community.repo

yum update mysql-server
service mysqld restart
mysql_upgrade
chkconfig mysqld on

This will update your MySQL to MySQL 5.6

 

See also: Upgrade to PHP 5.6 in VestaCP CentOS

Upgrade to PHP 5.6 in VestaCP CentOS

Default VestaCP instillation for CentOS 6.7 comes with PHP5.4 .

1. Install the REMI and EPEL RPM repositories

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm

2. Edit /etc/yum.repos.d/remi.repo

vi /etc/yum.repos.d/remi.repo

Under the section that looks like [remi] and [remi-php56] change:

from enabled=0 to enabled=1

Save remi.repo and exit

3. Upgrade PHP 5.3 to PHP 5.6

yum -y upgrade php*

 

See also: VestaCP Upgrade MYSQL 5.6

How to Fix error: realpath(): open_basedir restriction in effect

During Magento installation on VestaCP CentOS you may have problem:

[error] PHP Warning:  realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/admin/web/mydomain.com/public_html:/home/admin/tmp) in /home/admin/web/mydomain.com/public_html/vendor/magento/framework/Filesystem/DirectoryList.php on line 99

For fixing that error add /tmp into /home/admin/conf/web/httpd.conf Apache config file open_basedir:

<Directory /home/admin/web/mydomain.com/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir /home/admin/web/mydomain.com/public_html:/home/admin/tmp:/tmp
        php_admin_value upload_tmp_dir /home/admin/tmp
        php_admin_value session.save_path /home/admin/tmp
</Directory>

And then reboot server

 

Create MySQl Database and User

MySQL

1. Login to MySQL with root credentials

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.5.49-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

2. Create database mydb

mysql> create database mydb;
Query OK, 1 row affected (0.00 sec)

3. Create user my_user

mysql> create user 'my_user'@"localhost" identified by "qwP3$5";
Query OK, 0 rows affected (0.00 sec)

4. Give all privileges to user my_user

mysql> grant all privileges on mydb.* to 'my_user' with grant option;
Query OK, 0 rows affected (0.04 sec)

5. And then exit

mysql> exit
Bye