yum clean all
yum makecache
gcc c++编译器安装
再debian下直接apt-get install gcc g++就可以了。按照类似的逻辑,再Fedora下yum install gcc g++ 报告无法找到g++包。
查了一下,原来这个包的名字叫做gcc-c++。完整的应该是yum install gcc gcc-c++。
安装phpize:
yum install php-devel然后就会安装上phpize了
报错:
The GPG keys listed for the "CentOS / Red Hat Enterprise Linux 6 -atomicrocketturtle.com" repository are already installed but theyare not correct for this package.
Check that the correct key URLs are configured for thisrepository.
此时只要加上“--nogpgcheck”就可以了,即去掉gpg检查,
如“yum install php-mcrypt --nogpgcheck”
最后还得重启一下服务器
service nginx restart
5、bash:xx command not found
环境变量的原因:
修改/etc/profile或者 修改用户主目录下的.bashrc文件
vi /etc/profile
添加用到的命令所在目录 如: export PATH=/sbin:$PATH
注销账户,重新登录。
最后,echo $PATH查看修改结果
6、创建和删除软连接
创建 ln -sf /usr/local/xxx /usr/local/bin/xxx
删除 rm usr/local/bin/xxx
7、清除linux日志
1.删除所有的日志:find /var -type f -exec rm -v {} \;
启动php-fpm service php-fpm start
8、yum 安装软件时出错,错误信息如下
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again