“CentOS”的版本间的差异
第39行: | 第39行: | ||
# yum remove php-common # 再次执行 | # yum remove php-common # 再次执行 | ||
# yum -y install php70w-devel | # yum -y install php70w-devel | ||
+ | |||
+ | =phpmyadmin 提示没有安装mbstring的问题解决= | ||
+ | # yum install php-mbstring # 如果是remi,则yum --enablerepo=remi install php-mbstring | ||
+ | # vim /etc/php.ini # 打开mbstring相关的选项。 | ||
+ | [mbstring] | ||
+ | language for internal character representation. | ||
+ | http://php.net/mbstring.language | ||
+ | mbstring.language = Chinese | ||
+ | |||
+ | internal/script encoding. | ||
+ | Some encoding cannot work as internal encoding. | ||
+ | (e.g. SJIS, BIG5, ISO-2022-*) | ||
+ | http://php.net/mbstring.internal-encoding | ||
+ | mbstring.internal_encoding = UTF-8 | ||
+ | |||
+ | http input encoding. | ||
+ | http://php.net/mbstring.http-input | ||
+ | mbstring.http_input = auto | ||
+ | |||
+ | http output encoding. mb_output_handler must be | ||
+ | registered as output buffer to function | ||
+ | http://php.net/mbstring.http-output | ||
+ | |||
+ | mbstring.http_output = UTF-8 | ||
+ | |||
+ | enable automatic encoding translation according to | ||
+ | mbstring.internal_encoding setting. Input chars are | ||
+ | converted to internal encoding by setting this to On. | ||
+ | Note: Do _not_ use automatic encoding translation for | ||
+ | portable libs/applications. | ||
+ | http://php.net/mbstring.encoding-translation | ||
+ | mbstring.encoding_translation = On |
2019年9月12日 (四) 08:54的版本
基于CentOS7.4的服务器搭建笔记,记录起始于:2019/9/10 @ 浙江嘉兴
目录
GUI切换Terminal
- Ctrl+alt+F1~F6 从图形登陆界面切换到dos界面;
- 界面切换到命令行界面输入 init 3 命令;
- 命令行界面切换到图形界面输入 init 5 命令;
centos下修改文件后如何保存退出
保存命令,按ESC键 跳到命令模式,然后:
- :w 保存文件但不退出vi
- :w file 将修改另外保存到file中,不退出vi
- :w! 强制保存,不推出vi
- :wq 保存文件并退出vi
- :wq! 强制保存文件,并退出vi
- :q 不保存文件,退出vi
- :q! 不保存文件,强制退出vi
- :e! 放弃所有修改,从上次保存文件开始再编辑
yum clean all大坑解决
- 在Centos7系统中执行yum clean all 之后,发现yum的其他执行都报错了;要解决,关键在这里:
- 把/var/cache/yum/ 下面的文件删除了
- 接下来,如果执行yum repolist all,结果为0;执行yum list正常的话,那就是/etc/yum.repos.d/*.repo 这货有问题啦,解决这货的问题
- 执行 yum makecache 然后再执行yum update
- OK
- yum仓库的命令:
- yum repolist 列出yum仓库
- yum clean all 清理yum 缓存
- yum makecache 缓存yum仓库
php70w-common-7.0.33-1.w7.x86_64 与 php-common < 7.0的冲突
- PHP 7 极大地改进了性能,在一些WordPress基准测试当中,性能可以达到PHP 5.6的3倍。
- 使用Yum安装PHP 7:php 7.0有两个源可以选择,一个是webtatic提供的,也就是php70w,那个w指得就是webtatic,另一个可以使用remi源。
- yum install epel-release
- rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
- yum update
- yum list | grep php7
- 另一种做法,移除php-common
- yum remove php-common # 再次执行
- yum -y install php70w-devel
phpmyadmin 提示没有安装mbstring的问题解决
- yum install php-mbstring # 如果是remi,则yum --enablerepo=remi install php-mbstring
- vim /etc/php.ini # 打开mbstring相关的选项。
[mbstring] language for internal character representation. http://php.net/mbstring.language mbstring.language = Chinese
internal/script encoding. Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) http://php.net/mbstring.internal-encoding mbstring.internal_encoding = UTF-8
http input encoding. http://php.net/mbstring.http-input mbstring.http_input = auto
http output encoding. mb_output_handler must be registered as output buffer to function http://php.net/mbstring.http-output
mbstring.http_output = UTF-8
enable automatic encoding translation according to mbstring.internal_encoding setting. Input chars are converted to internal encoding by setting this to On. Note: Do _not_ use automatic encoding translation for portable libs/applications. http://php.net/mbstring.encoding-translation mbstring.encoding_translation = On