vagrant centos lamp small note

Update package

sudo yum -y update

vagrant centos default language like German, not read, need to replace en_US

[vagrant@localhost ~]$ locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
sudo vim /etc/sysconfig/i18n

Will be LANG="de_DE.UTF-8"replaced LANG="en_US.UTF-8"and press the Esckey, enter :wqto save and exit vim editor

  1. centos of Chinese switched to English! After modifying the language, after the restart, to be replaced
  2. CentOS / English context switching tutorial (CentOS6.8) learn to see the local language
[vagrant@localhost ~]$ sudo yum upgrade
Loaded plugins: fastestmirror
Setting up Upgrade Process
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
No Packages marked for Update

Reference problem: with yum install docker, yum when updating storage, reported the following error, resulting in broken yum

Because I was centos6, and reference is centos7, need to enter the mirror station, looking for the same application, different versions of files

sudo rpm -qa|grep yum|sudo xargs rpm -e --nodeps  
rpm -qa |grep yum
wget http://centos.ustc.edu.cn/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://centos.ustc.edu.cn/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://centos.ustc.edu.cn/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
sudo rpm -ivh yum-*
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
sudo yum makecache

The final effect

[vagrant@localhost ~]$ sudo rpm -ivh yum-*
Preparing...                ########################################### [100%]
   1:yum-metadata-parser    ########################################### [ 33%]
   2:yum-plugin-fastestmirro########################################### [ 67%]
   3:yum                    ########################################### [100%]
[vagrant@localhost ~]$ grep "password" /var/log/mysqld.log
2018-08-08T02:59:58.687152Z 1 [Note] A temporary password is generated for root@localhost: 3fF4?tujHrfl
2018-08-08T03:00:04.204111Z 2 [Note] Access denied for user 'UNKNOWN_MYSQL_USER'@'localhost' (using password: NO)
[vagrant@localhost ~]$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
warning: /var/tmp/rpm-tmp.L2KczI: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
error: Failed dependencies:
    epel-release = 6 is needed by remi-release-6.9-3.el6.remi.noarch

In 180803.mdexperiencing the same problems, use sudo yum install epel-releasecan be solved

sudo yum install php php-fpm php-cli php-pdo php-mysql php-gd php-bcmath php-xml php-mbstring php-mcrypt php-redis

Guess you like

Origin www.cnblogs.com/fsong/p/11260217.html