Skip to content

Instantly share code, notes, and snippets.

@ismailakbudak
Last active April 28, 2016 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ismailakbudak/26a7d97a0604a732411091d0dea23588 to your computer and use it in GitHub Desktop.
Save ismailakbudak/26a7d97a0604a732411091d0dea23588 to your computer and use it in GitHub Desktop.
Server side commands
# Change ssh port
sudo vi /etc/ssh/sshd_config
port 22
sudo service ssh restart
# Language problem solution
sudo vi /etc/environment
LC_ALL="en_US.utf8"
LANGUAGE="en_US.utf8"
sudo dpkg-reconfigure locales
# After language problem you should create postgresql cluster
pg_createcluster 9.3 main --start
/etc/init.d/postgresql start
# Install Redis Server
sudo apt-get -y install redis-server
sudo service redis-server status
sudo netstat -naptu
# Find command
find /home/deploy/ -type d -name "*searched_text*" -print
# Scp remote to local
scp -P 22 -r root@example.com:/home/root/file.txt /Users/user/Desktop
# Postgresql db import
psql database_name < PostgreSQL.sql
pg_dumpall -f PostgreSQL.sql
psql -f PostgreSQL.sql postgres
# On psql terminal
drop schema public cascade;
create schema public;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment