0安装环境
yum -y install gcc
yum -y install gcc-c++
yum -y install make
yum -y install kernel-devel
yum -y install ncurses-devel
1安装数据库mysql5.6
需要检测系统是否自带安装mysql
yum list installed | grep mysql
发现有系统自带mysql,果断这么干
yum -y remove mysql-libs.x86_64
yum install wget -y
wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
rpm -ivh mysql-community-release-el6-5.noarch.rpm
yum repolist all | grep mysql
yum install mysql-community-server -y
service mysqld start
my.cnf 配置;创建mysql用户 加载 4个库sql
2安装nginx+php
配置CentOS 第三方yum源
yum clean all
wget http://www.atomicorp.com/installers/atomic
sh ./atomic
yum check-update
yum install nginx #安装nginx,根据提示,输入Y安装即可成功安装
service nginx start #启动
chkconfig nginx on #设为开机启动
/etc/init.d/nginx restart #重启
安装PHP
yum install php -y
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel php-fpm -y
/etc/init.d/nginx restart #重启nginx
/etc/rc.d/init.d/php-fpm start #启动php-fpm
chkconfig php-fpm on #设置开机启动
配置nginx支持php
cp /etc/nginx/nginx.conf /etc/nginx/nginx.confbak
把nginx.conf和vhost 替换 /etc/nginx
update 为更新目录 80端口
gulong_gmtool 为后台 999端口(费除)
4编译boost1.6
boost_1_61_0.tar.bz2 文件上传到 root 目录下
tar -xf boost_1_61_0.tar.bz2
cd /root/boost_1_61_0
./bootstrap.sh
./b2 --without-python stage debug
sudo cp -rf boost /usr/include
sudo cp -rf stage/lib/* /usr/lib64
5编译protobuf2.4
protobuf-2.4.1 文件上传到 root 目录下
cd /root/protobuf-2.4.1
./configure
make
make check
make install
配置 so 索引文件
ld.so.conf 替换到 /etc/ld.so.conf
执行 ldconfig
ldconfig -p //查询是否加载list中有 /opt/Server/gulong_server/lib
网友评论