标签:
(系统centos6.5)
sudo yum install gcc gcc-c++
(如果已经有了旧版本跳过)sudo yum install svn texinfo-tex flex zip libgcc.i686 glibc-devel.i686
wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz
(可以进链接搜索别的版本)cd gcc-5.3.0
./contrib/download_prerequisites
下载依赖库gmp-4.3.2、mpfr-2.4.2、mpc-0.8.1 (一定要下这版自己的,不要乱下别的版本)cd ..
mkdir gcc-build-5.3.0
../gcc-5.3.0/configure --prefix=/usr/local/gcc --enable-threads=posix --disable-checking --enable-languages=c,c++ --disable-multilib
make
make install
yum remove gcc
yum remove gcc-c++
updatedb
cd /usr/bin
ln -s /usr/local/gcc/bin/gcc gcc
ln -s /usr/local/gcc/bin/g++ g++
vi /etc/man.config
MANPATH /usr/local/gcc/share/man
(其实我们的系统好像并没有man...)wget https://nodejs.org/dist/v4.4.0/node-v4.4.0-linux-x64.tar.gz
tar -xvf node-v4.4.0-linux-x64.tar.gz
mv node-v4.4.0-linux-x64.tar.gz /use/local/node
cp /use/local/node/bin/* /use/bin/
ln -s /usr/local/node/bin/npm /usr/bin/npm
cd /usr/local/node/lib/node_modules/npm
node cli.js install npm -gf
yum install git
npm install -g pm2
如果迟迟不出结果可能是因为npm源在国外,我国局域网出不去,那就配置国内淘宝源,
通过config命令指定: npm config set registry https://registry.npm.taobao.org npm info underscore (如果上面配置正确这个命令会有字符串response)
或者命令行指定: npm --registry https://registry.npm.taobao.org info underscore
或者编辑 ~/.npmrc 加入下面内容: registry = https://registry.npm.taobao.org
然后重新运行安装命令就可以了。
(mysql数据放到单独的磁盘上 挂载点mydata)
yum list installed | grep mysql
(检查有没有安装mysql)
yum -y remove mysql-libs.x86_64
wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum localinstall mysql-community-release-el6-5.noarch.rpm
yum repolist all | grep mysql
yum-config-manager --disable mysql55-community
yum-config-manager --disable mysql56-community
yum-config-manager --enable mysql57-community-dmr
yum repolist enabled | grep mysql
yum install mysql-community-server
vi /etc/my.cnf
datadir=/mydata/mysql/data
(设置数据文件夹)socket=/mydata/mysql/lib/mysql.sock
log-error=/mydata/mysql/log/mysqld.log
(日志文件)pid-file=/var/run/mysqld/mysqld.pid
(pid还是放在默认文件夹)[client]
(设置客户端)socket=/mydata/mysql/lib/mysql.sock
service mysqld start
chkconfig --list | grep mysqld
chkconfig mysqld on
mysql_secure_installation
yum --disablerepo=base,updates --enablerepo=rpmforge-extras install git
(没安装git输入这个)yum --disablerepo=base,updates --enablerepo=rpmforge-extras update git
(已经安装了的输入这个)yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
wget https://www.kernel.org/pub/software/scm/git/git-2.7.3.tar.gz
tar xzf git-2.7.3.tar.gz
cd git-2.7.3
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
git --version
查看版本标签:
原文地址:http://www.cnblogs.com/JohannaFeng/p/5642037.html