Talk:Moebooru

Bloo's Steps
yum install git sudo git clone https://github.com/moebooru/moebooru.git /var/www/mybooru.com sudo useradd -s /bin/bash -d /var/www/mybooru.com -r moebooru sudo chown -R moebooru:moebooru /var/www/mybooru.com

sudo rpm -ivh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm sudo yum install postgresql95 postgresql95-devel postgresql95-server libpqxx libpqxx-devel /usr/pgsql-9.5/bin/postgresql95-setup initdb systemctl start postgresql-9.5 systemctl enable postgresql-9.5 su - postgres psql postgres# create user mybooru_user with password 'os23' createdb;

edit /var/lib/pgsql/9.5/data/pg_hba.conf, changing all from ident to md5 except for the UNIX socket line

[uninstall ruby if pre-installed] curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - sudo yum gcc-c++ make -y sudo yum install -y nodejs -y

nano /etc/yum.repos.d/zonio.rep [zonio] name=Zonio $releasever - $basearch baseurl=https://zonio.net/repos/epel/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=https://zonio.net/repos/GPG-Key-Zonio priority=5 ^only to here

sudo yum install rubinius rubinius-devel -y ruby -v

sudo yum install gcc gcc-c++ ImageMagick jhead libxslt-devel git libyaml-devel openssl-devel pcre-devel readline-devel nginx -y

cd /var/www/mybooru.com su - moebooru nano /var/www/mybooru.com/.profile PATH=$PATH:/var/www/mybooru.com/.gem/rbx/2.2/bin relog gem install bundler --user-install gem update

bundle config build.pg --with-pg-config=/usr/pgsql-9.5/bin/pg_config bundle install --path vendor/bundle cp /var/www/mybooru.com/config/database.yml.example /var/www/mybooru.com/config/database.yml cp /var/www/mybooru.com/config//local_config.rb.example /var/www/mybooru.com/config//local_config.rb chmod 700 /var/www/mybooru.com/config/database.yml chmod 700 /var/www/mybooru.com/config//local_config.rb edit the values ^

bundle exec rake db:reset bundle exec rake db:migrate


 * 1) sudo chsh -s /bin/false moebooru #sets moebooru to a non login user

sudo yum install memcached -y Edit /etc/sysconfig/memcached and set CACHESIZE=2048 (2GB RAM) if possible.

RAILS_ENV=production bundle exec rake db:reset RAILS_ENV=production bundle exec rake assets:precompile

chmod 755 /var/www/mybooru.com/public

TCP: MB_MEMCACHED_SERVERS='127.0.0.1:11211' RAILS_ENV=production bundle exec puma -e production or UNIX Socket: MB_MEMCACHED_SERVERS='127.0.0.1:11211' RAILS_ENV=production bundle exec puma -C shared/puma.rb
 * 1) Running the server:

altetnative to rubinius: sudo yum install centos-release-scl sudo yum install rh-ruby23 sudo yum install rh-ruby23-rubygem-bundler -y sudo yum install rh-ruby23-rubygem-rake -y sudo yum install rh-ruby23-ruby-devel -y scl enable rh-ruby23 bash gem install bundler bundle config build.pg --with-pg-config=/usr/pgsql-9.5/bin/pg_config bundle install --path vendor/bundle RAILS_ENV=production bundle exec rake db:reset RAILS_ENV=production bundle exec rake db:migrate MB_MEMCACHED_SERVERS='127.0.0.1:11211' RAILS_ENV=production bundle exec unicorn -p 9292== Bloo's Steps ==

yum install git sudo git clone https://github.com/moebooru/moebooru.git /var/www/mybooru.com sudo useradd -s /bin/bash -d /var/www/mybooru.com -r moebooru sudo chown -R moebooru:moebooru /var/www/mybooru.com

sudo rpm -ivh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm sudo yum install postgresql95 postgresql95-devel postgresql95-server libpqxx libpqxx-devel /usr/pgsql-9.5/bin/postgresql95-setup initdb systemctl start postgresql-9.5 systemctl enable postgresql-9.5 su - postgres psql postgres# create user mybooru_user with password 'os23' createdb;

edit /var/lib/pgsql/9.5/data/pg_hba.conf, changing all from ident to md5 except for the UNIX socket line

[uninstall ruby if pre-installed] curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - sudo yum gcc-c++ make -y sudo yum install -y nodejs -y

nano /etc/yum.repos.d/zonio.rep [zonio] name=Zonio $releasever - $basearch baseurl=https://zonio.net/repos/epel/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=https://zonio.net/repos/GPG-Key-Zonio priority=5 ^only to here

sudo yum install rubinius rubinius-devel -y ruby -v

sudo yum install gcc gcc-c++ ImageMagick jhead libxslt-devel git libyaml-devel openssl-devel pcre-devel readline-devel nginx -y

cd /var/www/mybooru.com su - moebooru nano /var/www/mybooru.com/.profile PATH=$PATH:/var/www/mybooru.com/.gem/rbx/2.2/bin relog gem install bundler --user-install gem update

bundle config build.pg --with-pg-config=/usr/pgsql-9.5/bin/pg_config bundle install --path vendor/bundle cp /var/www/mybooru.com/config/database.yml.example /var/www/mybooru.com/config/database.yml cp /var/www/mybooru.com/config//local_config.rb.example /var/www/mybooru.com/config//local_config.rb chmod 700 /var/www/mybooru.com/config/database.yml chmod 700 /var/www/mybooru.com/config//local_config.rb edit the values ^

bundle exec rake db:reset bundle exec rake db:migrate


 * 1) sudo chsh -s /bin/false moebooru #sets moebooru to a non login user

sudo yum install memcached -y Edit /etc/sysconfig/memcached and set CACHESIZE=2048 (2GB RAM) if possible.

RAILS_ENV=production bundle exec rake db:reset RAILS_ENV=production bundle exec rake assets:precompile

chmod 755 /var/www/mybooru.com/public

TCP: MB_MEMCACHED_SERVERS='127.0.0.1:11211' RAILS_ENV=production bundle exec puma -e production or UNIX Socket: MB_MEMCACHED_SERVERS='127.0.0.1:11211' RAILS_ENV=production bundle exec puma -C shared/puma.rb
 * 1) Running the server:

altetnative to rubinius: sudo yum install centos-release-scl sudo yum install rh-ruby23 sudo yum install rh-ruby23-rubygem-bundler -y sudo yum install rh-ruby23-rubygem-rake -y sudo yum install rh-ruby23-ruby-devel -y scl enable rh-ruby23 bash gem install bundler bundle config build.pg --with-pg-config=/usr/pgsql-9.5/bin/pg_config bundle install --path vendor/bundle RAILS_ENV=production bundle exec rake db:reset RAILS_ENV=production bundle exec rake db:migrate MB_MEMCACHED_SERVERS='127.0.0.1:11211' RAILS_ENV=production bundle exec unicorn -p 9292