Last active
December 3, 2018 19:43
-
-
Save myun2/b1e29b3b631a1cb0fb7f to your computer and use it in GitHub Desktop.
setup2.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Authorized Keys | |
curl https://gist.githubusercontent.com/myun2/519ca5caf97273f0b590/raw/6709fb4098f254ad0ea6e10052d599885f466b7a/ak.sh | bash | |
ssh-keygen -f ~/.ssh/id_rsa -t rsa -N "" | |
# Install Packages | |
sudo yum update | |
sudo yum -y install gcc gcc-c++ g++ wget | |
sudo yum -y install git tmux | |
sudo yum -y install openssl-devel gem lv ruby-devel libxml2-devel libxslt-devel | |
sudo yum -y install libyaml-devel readline-devel libffi-devel sqlite-devel | |
sudo yum -y install perl-ExtUtils-MakeMaker | |
sudo yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel | |
echo 'export CPPFLAGS="$CPPFLAGS -I$HOME/include"' >> ~/.profile | |
echo 'export LDFLAGS="$LDFLAGS -L$HOME/lib"' >> ~/.profile | |
echo 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/lib"' >> ~/.profile | |
echo 'alias configure=./configure --prefix=$HOME' >> ~/.profile | |
source ~/.profile | |
# Install RVM | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\curl -sSL https://get.rvm.io | bash | |
source ~/.profile | |
rvm install ruby --latest | |
# Install typecal Gems | |
gem install bundle rails devise | |
# Install vim | |
cd | |
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 | |
bzip2 -d vim-7.4.tar.bz2 | |
tar xvf vim-7.4.tar | |
rm vim-7.4.tar | |
cd vim74 | |
./configure --prefix=$HOME | |
make install | |
cd .. | |
rm -rf vim74 | |
# My environments | |
cd | |
git clone https://github.com/myun2/my_env.git | |
cd my_env | |
./install.sh | |
./vim-bundles-install.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install lv | |
wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/lv-4.51-1.el6.rf.x86_64.rpm | |
sudo rpm -ivh lv-4.51-1.el6.rf.x86_64.rpm | |
rm lv-4.51-1.el6.rf.x86_64.rpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install MarinaDB | |
sudo yum -y install mariadb-server mariadb | |
systemctl start mariadb | |
systemctl enable mariadb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum localinstall http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm | |
sudo yum install postgresql94-server postgresql94-devel postgresql94-contrib | |
sudo service postgresql-9.4 initdb | |
sudo vi /var/lib/pgsql/9.4/data/pg_hba.conf | |
sudo service postgresql-9.4 start | |
sudo chkconfig postgresql-9.4 on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firewall-cmd --zone=public --add-port=3001/tcp --permanent | |
systemctl restart firewalld |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'export CPPFLAGS="$CPPFLAGS -I$HOME/include"' >> ~/.profile | |
echo 'export LDFLAGS="$LDFLAGS -L$HOME/lib"' >> ~/.profile | |
echo 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/lib"' >> ~/.profile | |
echo 'alias configure=./configure --prefix=$HOME' >> ~/.profile | |
source ~/.profile | |
# Install vim | |
cd | |
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 | |
bzip2 -d vim-7.4.tar.bz2 | |
tar xvf vim-7.4.tar | |
rm vim-7.4.tar | |
cd vim74 | |
./configure --prefix=$HOME | |
make install | |
# Install libevent (for tmux) | |
cd | |
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz --no-check-certificate | |
tar -zxvf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable/ | |
./configure --prefix=$HOME | |
make install | |
cd | |
rm -rf libevent-2.0.21-stable | |
rm libevent-2.0.21-stable.tar.gz | |
# Install Tmux | |
cd | |
wget http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz | |
tar -zxvf tmux-1.9a.tar.gz | |
cd tmux-1.9a/ | |
./configure --prefix=$HOME | |
make install | |
cd | |
rm -rf tmux-1.9a | |
rm tmux-1.9a.tar.gz | |
# Install git | |
sudo yum -y install perl-ExtUtils-MakeMaker | |
sudo yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel | |
cd | |
wget https://git-core.googlecode.com/files/git-1.9.0.tar.gz | |
tar -zxvf git-1.9.0.tar.gz | |
cd git-1.9.0 | |
./configure --prefix=$HOME --with-curl --with-expat | |
make install | |
cd | |
rm -rf git-1.9.0 | |
rm git-1.9.0.tar.gz | |
# curl | |
./configure --prefix=$HOME --with-ca-bundle=/virtual/nwhite/bin/ca-bundle.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fuck