Skip to content

Instantly share code, notes, and snippets.

@JustinSencion
Last active May 22, 2017 22:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JustinSencion/38cbd9ed75095615de821af79850b5a5 to your computer and use it in GitHub Desktop.
Save JustinSencion/38cbd9ed75095615de821af79850b5a5 to your computer and use it in GitHub Desktop.
Usefull commands

CentOS 7 Fails to Boot - XFS Corrupt - Enters Emergency Mode

bash xfs_repair -L /dev/mapper/centos-root

Networking Issues

Stop NetworkManager.

bash service NetworkManager stop

Disable NetworkManager from starting when CentOS boots.

bash systemctl disable NetworkManager.service

Go to the network-scripts folder.

bash cd /etc/sysconfig/network-scripts

Create a file for each of the available devices with the following information:

BOOTPROTO=static
IPADDR=your_IP
NETMASK=your_network_mask
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no

Restart the network.

bash service network restart

Upgrade to PHP 7.1

Update php7 to php7.1

  1. bash wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
  2. bash wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  3. bash rpm -Uvh remi-release-7.rpm
  4. bash rpm -Uvh epel-release-latest-7.noarch.rpm
  5. bash yum-config-manager --enable remi-php71

If step 5 present errors use this: yum install yum-utils

  1. bash yum remove php70w-pecl-imagick-devel.x86_64 php70w-pecl-apcu-devel.x86_64
  2. bash yum update

if phalcon or memcache has warning, be calm, that's normal.

after update finish go to your phalcon.ini and memcache.ini and erase them

  1. bash yum install php-phalcon3 php-pecl-memcache php-pecl-memcached

Before continue verify if phalcon and memcache are installed with this: php -m | grep 'phalcon|memcache'

  1. bash systemctl enable php-fpm
  2. bash service php-fpm start
MariaDB 10.1
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

bash sudo yum install MariaDB-server MariaDB-client -y bash mysql_upgrade -u root -p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment