CentOS 7系统从零开始部署

升级所有包
yum -y upgrade
升级所有包和系统
yum -y update

安装apache
yum install httpd
开机启动apache 
chkconfig httpd on
安装php
yum install php
重启apache
service httpd restart
关闭防火墙
service firewalld stop
chkconfig firewalld off

添加对中文的支持,推荐直接看英文
vi /etc/locale.conf
将
LANG="en_US.UTF-8"
修改为
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"

修改vi/vim支持UTF-8
vi /etc/virc
vi /etc/vimrc
文件头部添加
set termencoding=euc-cn encoding=utf8

设置tab键为4空格
set ts=4
set expandtab
set autoindent
exit

安装influxdb
https://influxdata.com/downloads/#influxdb
wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0.x86_64.rpm
sudo yum localinstall influxdb-0.13.0.x86_64.rpm
启动influxdb
service influxdb start
打开web管理界面测试是否安装成功
http://xx.xx.xx.xx:8083/

php安装新版本
参考
http://blog.csdn.net/ysydao/article/details/51388397
http://blog.csdn.net/haitun312366/article/details/8511412#
http://my.oschina.net/u/573270/blog/423238
http://www.jianshu.com/p/febdc7c6ef90
检查当前安装的PHP包
yum list installed | grep php
如果有已安装的PHP包,先删除
yum remove 

yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

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

安装composer
安装git
yum install composer
yum install git

使用composer中国镜像
http://pkg.phpcomposer.com/

安装influxdb-php
composer require influxdb/influxdb-php
http://www.php100.com/html/it/biancheng/2016/0112/8983.html
安装1.1.*版本

安装gcc编译器
yum install gcc
yum install php-devel

支持HTTPS
sudo apt-get install certbot -t jessie-backports
https://github.com/xenolf/lego
https://letsencrypt.org/

安装golang
Yum list golang
Yum install golang –y
vi .bash_profileexport 
添加
export GOPATH=$HOME/go
PATH=$PATH:$GOPATH/bin
export PATH

yum install git


发表于:2014-10-13 10:11:57

原文链接(转载请保留): http://www.multisilicon.com/blog/a25271941.html

友情链接: MICROIC
首页